Run on server for jsp [message #199702] |
Thu, 13 September 2007 12:59 |
Eclipse User |
|
|
|
I have a project that requires starting an app server, publishing a jsp to
that server, then launching a browser to access the jsp. Pretty
straight-forward web project that works fine except for one thing: I seem
unable to supply a fully-qualified host name in the URL handed to the
browser instead of "localhost". The place where the browser is launched is
buried fairly deep in WST classes, so I tried configuring the server, Tomcat
5.5, by the way, so that its default host is a fully-qualified name. When I
create it inside Eclipse it shows up with its full name and I can start and
stop it without difficulty. When I select my jsp and then "run->run on
server" the server starts normally as expected, the jsp get's published to
it, and the browser launches with a URL using "localhost" instead of the
fqhn.
The browser is launched from inside WebLaunchableClient.launch(), which
calls openURL on the newly-instantiated browser object. The argument to
openURL is a URL, but that URL is obtained by casting a passed in Object
"launchable" to an HttpLaunchable and calling its getURL() method. I
figured the launchable was getting its host name form the server
configuration somewhere but that doesn't seem to be the case. So where does
the host name part of the URL come from? It seems to default to "localhost"
no matter what I do. Is there some way to get a fqhn into the URL string,
short of subclassing WebLaunchableClient and creating my own launch method
that edits the URL before launching the browser? I feel as though I'm
missing something easy and obvious here, but I've been prowling around in
the WST code for a couple of days on and off and reading documentation to
find an answer. Any insight would be greatly appreciated. Thanks in
advance.
Steve Bulick
sbulick@sandcherry.com
SandCherry, Inc.
|
|
|
Powered by
FUDForum. Page generated in 0.02627 seconds