Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » Run on server for jsp
Run on server for jsp [message #199702] Thu, 13 September 2007 16:59
Steve Bulick is currently offline Steve Bulick
Messages: 2
Registered: July 2009
Junior Member
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.
Previous Topic:Struts Plugin for Eclipse 3.3
Next Topic:Setting the default value of an element in the xsd schema editor
Goto Forum:
  


Current Time: Fri Oct 24 19:04:32 GMT 2014

Powered by FUDForum. Page generated in 0.08199 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software