struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Frank W. Zammetti" <>
Subject Re: [OT ]Re: obtaining server URL (or ip and port) from plugin
Date Thu, 16 Mar 2006 18:13:10 GMT
On Thu, March 16, 2006 1:07 pm, Leon Rosenberg said:
> a bit crazy suggestion. Why don't you just parse the server.xml at
> startup to determine the port?

I'll one-up your crazyness Leon...

How about having a servlet as part of your webapp that starts up before
Struts does... then, from your plugin, you scan the local machine by
sending a request to every port from 1 to 10000, and whichever you get the
appropriate reply from is your port.  Since we already know you can get
the hostname and the context name in the plugin, as long as you can assume
HTTP vs. HTTPS, this should work.  Might delay startup, dunno how much.

Yeah, yeah, I know, I know... NUTS! ;) LOL

> regards
> Leon


Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
AIM: fzammetti
Yahoo: fzammetti
Java Web Parts -
Supplying the wheel, so you don't have to reinvent it!

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message