-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Alejandro,

On 7/31/12 10:07 AM, Alejandro Mehring wrote:
> Digging a bit more into the system, I came to a part where it's
> building the link based on the original servlet request.
> 
> If I have this URL: 
> http://host/app/servlet/FrontController?arg1=yes&arg2=target.jsp&arg3=something
>
>  Java 1.4's getRequestURL() returns
> 'http://host/app/servlet/FrontController' whereas Java 1.6's
> getRequestURL() returns 'http://host/app/target.jsp'
> 
> I found someone reporting this same issue on JBoss community page,
> but got no answer. I'll try to find another way to get the same
> behaviour in Java 1.6 as of getRequestURL in 1.4.

If getRequestURL (from the servlet API, not from the Java API) returns
something different, then something must have changed in your webapp.
The original request (what the client sent) looks like what? Are there
any forwards involved? It looks like you are forwarding from
/servlet/FrontController to /target.jsp. When you do that, the request
URI changes. If you want the original request URI, then you have to
look in the request attributes. I'll point you to the servlet spec to
find out the name(s) of the attribute(s) to fetch if that's what you want.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAlAX+jQACgkQ9CaO5/Lv0PDWvgCfZ9zqYwtST79UxQ8sO6sYY4Nb
mB4An37ynSb3YxEaKrTBukFXeVf6ylg1
=32Zy
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to