struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Pratt" <thechrispr...@gmail.com>
Subject Re: problems with request.getRequestURL() after migrating to Tomcat 5.5
Date Wed, 20 Sep 2006 03:45:31 GMT
In Resin (and I think the spec), request.getRequestURL() should give you
back the URL (minus the query arguments) that was used.  You can build the
query String using request.getParameterNames() & getParameterValues() and
rebuild it yourself, but since HttpUtils.getRequestURL has been deprecated,
I think that's the only choice.
  (*Chris*)

On 9/19/06, Otmar Manuela <otmar@caribmedia.com> wrote:
>
> Hi,
>
> I know this was asked a while ago in this mailing list, but I couldn't
> find the answer.  My problem is that I want a generic way to get the
> client URL in my action class.  In Tomcat 5.0, I was able to do so by
> calling request.getRequestURL(), but apparently I was just lucky,
> because it wasn't supposed to work this way and now that they have fixed
> it in Tomcat 5.5, my application breaks.  I see some people solved this
> by using mapping.getPath(), but this doesn't work well with tiles,
> because it returns the action url of the tile and not the url of the
> client request.
>
> So far I know how to get the scheme, host, context path, and query
> string, but I'm missing the path, which mapping.getPath() provides if
> you're not using tiles.
>
> Anyone knows how to get this to work without having to use
> request.getRequestURL()?
>
> Thanks,
>
> --
> Otmar Manuela
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message