P
pwfarwell
I am seeing a problem with the ServletRequest getServerName() method.
On JBoss and Weblogic, this method returns the host name exactly as it
was specified in the request.
If the original request was:
http://fooHost/dir1/dir2/some.html
getServerName() returns "fooHost" as the server name for JBoss and
Weblogic.
But on Oracle Application Server, getServerName() returns the fully
qualified host name, e.g. "fooHost.acme.com". This causes problems with
an AJAX call that attempts to match "fooHost" with "fooHost.acme.com",
and fails because the two strings don't match (even though they point
to the same server).
Does any one know a more reliable way to get the host name (in a form
that matches the original request)? Is there a better option than
getServerName()?
On JBoss and Weblogic, this method returns the host name exactly as it
was specified in the request.
If the original request was:
http://fooHost/dir1/dir2/some.html
getServerName() returns "fooHost" as the server name for JBoss and
Weblogic.
But on Oracle Application Server, getServerName() returns the fully
qualified host name, e.g. "fooHost.acme.com". This causes problems with
an AJAX call that attempts to match "fooHost" with "fooHost.acme.com",
and fails because the two strings don't match (even though they point
to the same server).
Does any one know a more reliable way to get the host name (in a form
that matches the original request)? Is there a better option than
getServerName()?