On 7/13/06, Craig McClanahan <[EMAIL PROTECTED]> wrote:
On 7/13/06, Michael Jouravlev <[EMAIL PROTECTED]> wrote:
>
> Say I want to redirectto to a same action that has been posted to from
> a browser. I don't have a hardcoded action name that I want to call. I
> need to obtain this name (with context and such) from the request.
> What do I do?
>
> I can get request.getRequestURI(), request.getRequestURL(),
> request.getContextPath() but obviously they display information about
> request that was generated by a load balancer. Is there a standard, or
> non-standard but common way to obtain original address that was used
> by a browser for initial request? Of course I can create my own
> balancing application and send original address to a cluster member as
> parameter, but I am looking for less proprietary solution.
>
> Seems that Tomcat performs redirection through browser, or is it just
> the sample that I am running? Can a load balancer call managed server
> directly, without involving browser?
>
> Are there clustering solutions out there, that provide full server
> transparency including URL that a browser sent a request to?
>
> What happens with tools like mod_rewrite? If I have Apache in front of
> Tomcat this is kind of the same as having load balancer in front of
> Tomcat, is it? So the original URL is lost as well?
>
> Seems that automatic action/page reloading from the same address works
> only in non-clustered environment which really limits the
> applicability of this technique.


If you are using Tomcat, you can set some configuration options in the
<Connector> element (I think it is) so that the application sees the same
URLs that the browser submits to, instead of ones pointing back at the load
balancer.  Check out the server configuration docs[1] for more info.
Settings like proxyName and proxyPort are probably what you are looking for.

For other servers, you'll want to look for similar sorts of capabilities,
but it's clearly going to be server specific.

Michael.


Craig

[1]  http://tomcat.apache.org/tomcat-5.5-doc/config/http.html

Cool, thanks! Seems to be what doctor has ordered.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to