BaseTag

2002-01-09 Thread Martin Renner

Hi.

We have several Apache servers in our network. Just one of them sits in
front of all the others, is listening to port 80 and is acting as a
proxy server for all other web servers, which are running on different
machines on different ports. The Apache proxy server is using named
virtual hosts to forward requests to the correct internal web server.

In a struts application the "base" tag is being used, which causes a
problem: BaseTag.java always uses "request.getServerName" and
"request.getServerPort". So the corresponding HTML page contains

http://invisible-internal-server.foo.bar:12345/test/test.jsp";>

This name is not known on the internet and port 12345 will never pass
our firewall. Instead, this line should look like

http://external-name.domain.com:80/test/test.jsp";>

The Apache proxy server will automatically map
"external-name.domain.com" to our internal server
"invisible-internal-server.foo.bar:12345".

IMHO there should be a possibility to override "getServerName" and
"getServerPort" with some user-defined strings. Exactly as it is
possible in Tomcat 4.0 (see
http://jakarta.apache.org/tomcat/tomcat-4.0-doc/proxy-howto.html, item
#4).


Martin

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




Re: BaseTag

2002-01-09 Thread Andras Balogh

Hi,

I don't understand something. What kind of internal web server do you
have that runs struts? 
Is it not Tomcat?
If it is Tomcat you can set in the server.xml config file the proxyName
and proxyPort attributes on the Connector tag.


Best wishes,

Andras.


On Wed, 2002-01-09 at 15:54, Martin Renner wrote:
> Hi.
> 
> We have several Apache servers in our network. Just one of them sits in
> front of all the others, is listening to port 80 and is acting as a
> proxy server for all other web servers, which are running on different
> machines on different ports. The Apache proxy server is using named
> virtual hosts to forward requests to the correct internal web server.
> 
> In a struts application the "base" tag is being used, which causes a
> problem: BaseTag.java always uses "request.getServerName" and
> "request.getServerPort". So the corresponding HTML page contains
> 
>  href="http://invisible-internal-server.foo.bar:12345/test/test.jsp";>
> 
> This name is not known on the internet and port 12345 will never pass
> our firewall. Instead, this line should look like
> 
> http://external-name.domain.com:80/test/test.jsp";>
> 
> The Apache proxy server will automatically map
> "external-name.domain.com" to our internal server
> "invisible-internal-server.foo.bar:12345".
> 
> IMHO there should be a possibility to override "getServerName" and
> "getServerPort" with some user-defined strings. Exactly as it is
> possible in Tomcat 4.0 (see
> http://jakarta.apache.org/tomcat/tomcat-4.0-doc/proxy-howto.html, item
> #4).
> 
> 
> Martin
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 



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




Re: BaseTag

2002-01-09 Thread Martin Renner

Hi.

> I don't understand something. What kind of internal web server do you
> have that runs struts?
> Is it not Tomcat?
> If it is Tomcat you can set in the server.xml config file the proxyName
> and proxyPort attributes on the Connector tag.

The internal server is Apache + mod_jk + Tomcat 3.3 (which doesn't have
this "Connector proxy" feature).

I am sure that there are more configurations like mine out there in the
web and that struts is used in different servlet/jsp containers. That's
why I was asking about such a feature in struts.


Martin

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