You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Kamal <ka...@gmail.com> on 2008/09/04 06:02:57 UTC
response.sendRedirect and request.getQueryString
Hi All,
I am running two web apps (one in Tomcat 5.0.30 and another in Tomcat
5.5). The app running in Tomcat 5.0.30 calls the app in Tomcat 5.5
(uses Form Authentication ). We have a JSP page in Tomcat 5.0.30 app
that authenticates and generates the jsessionid for the app running
in Tomcat 5.5.25.
Once the jsessionid is obtained, the JSP page in Tomcat 5.0.30 calls
the other app (in tomcat 5.5.25) using the authenticated jsessionid.
Now, we have a filter that intercepts the request from Tomcat 5.0.30
which receives the querystring as null
i.e. let us say my JSP in tomcat 5.0.30 calls the page result.jsp in
Tomcat 5.5.25
page1.jsp
http://localhost:8080/tomcat5525;jsessionid=?view=jsp/result.jsp&parm1=value&parm2=value2
public class MyFilter implements Filter {
public void doFilter(ServletRequest request, ServletResponse response) {
HttpServletRequest hreq = (HttpServletRequest) request;
System.Out.println(" request QueryString : " + hreq.getQueryString());
}
}
Please note that when I run the second app also under different Tomcat
5.0.30 server, I get the getQueryString() that has both parm1 and
parm2 in it.
Did anyone of you faced and solved similar problem?. please let me know.
--
Best Regards
Kamal
"Every old idea will be proposed again with a different name and a
different presentation, regardless of whether it works. - RFC 1925"
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: response.sendRedirect and request.getQueryString
Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Kamal,
Kamal wrote:
> I am running two web apps (one in Tomcat 5.0.30 and another in Tomcat
> 5.5). The app running in Tomcat 5.0.30 calls the app in Tomcat 5.5
> (uses Form Authentication ). We have a JSP page in Tomcat 5.0.30 app
> that authenticates and generates the jsessionid for the app running
> in Tomcat 5.5.25.
>
> Once the jsessionid is obtained, the JSP page in Tomcat 5.0.30 calls
> the other app (in tomcat 5.5.25) using the authenticated jsessionid.
> Now, we have a filter that intercepts the request from Tomcat 5.0.30
> which receives the querystring as null
How, specifically, are you calling the JSP? URLConnection? commons-net?
Something else? Post some code so we can see. I suspect you are not
copying the query string from the incoming request to the outgoing
request (to the other webapp).
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkjJOpYACgkQ9CaO5/Lv0PBzJgCfWRdpuzUnyWT1foCkIJJ1TsZ3
MjAAn3HCwjz1lFZPc/g1pASrWkLgK58J
=YIm1
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org