struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Frank W. Zammetti" <fzli...@omnytex.com>
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

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: fzammetti@hotmail.com
Java Web Parts -
http://javawebparts.sourceforge.net
Supplying the wheel, so you don't have to reinvent it!

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message