Re: How to prevent Tomcat redirect my request

2008-11-21 Thread André Warnier
jim ma wrote: On Thu, Nov 20, 2008 at 10:24 PM, André Warnier [EMAIL PROTECTED] wrote: jim ma wrote: On Thu, Nov 20, 2008 at 6:48 PM, André Warnier [EMAIL PROTECTED] wrote: Mikolaj Rydzewski wrote: jim ma wrote: I still want to know if it is possible to stop Tomcat from redirecting.

Re: How to prevent Tomcat redirect my request

2008-11-21 Thread jim ma
On Fri, Nov 21, 2008 at 10:53 AM, Caldarale, Charles R [EMAIL PROTECTED] wrote: From: jim ma [mailto:[EMAIL PROTECTED] Subject: Re: How to prevent Tomcat redirect my request If I get 302 response and write some code to resend quest to the redirected location The point everyone's

Re: How to prevent Tomcat redirect my request

2008-11-21 Thread Mikolaj Rydzewski
jim ma wrote: The problem is that I can not simply correct that URL and send it for the f first time. The request url is generated by other application or in some condition sometimes provided by user . The client side can not judge http://localhost:8080/foo; is a request for foo

Re: How to prevent Tomcat redirect my request

2008-11-21 Thread jim ma
Tell your clients to generate URLs like: http://host/your_servlet?url=url_to_fetch In other words you should implemet proxy that will handle redirects itself. Finally, your clients will not see any 302 redirects. I like this idea. It is greatly helpful , I think it works for my problem.

Re: How to prevent Tomcat redirect my request

2008-11-21 Thread André Warnier
jim ma wrote: Tell your clients to generate URLs like: http://host/your_servlet?url=url_to_fetch In other words you should implemet proxy that will handle redirects itself. Finally, your clients will not see any 302 redirects. I like this idea. It is greatly helpful , I think it works for

How to prevent Tomcat redirect my request

2008-11-20 Thread jim ma
Hi all, I deployed a web application foo.war into tomcat 5.x . When I used httpclient to send post request to http://localhost:8080/foo;, I always get the http 302 redirect response . How can I prevent Tomcat to reply redirect response and directly adding the slash to my request url

Re: How to prevent Tomcat redirect my request

2008-11-20 Thread Kees Jan Koster
Dear Jim, I deployed a web application foo.war into tomcat 5.x . When I used httpclient to send post request to http://localhost:8080/foo;, I always get the http 302 redirect response . How can I prevent Tomcat to reply redirect response and directly adding the slash to my request url

Re: How to prevent Tomcat redirect my request

2008-11-20 Thread jim ma
Great thanks , Kees. I will try httpunit . I still want to know if it is possible to stop Tomcat from redirecting. If yes, that will be zero code effort for our current implementation. Thanks Jim On Thu, Nov 20, 2008 at 5:51 PM, Kees Jan Koster [EMAIL PROTECTED] wrote: Dear Jim, I

Re: How to prevent Tomcat redirect my request

2008-11-20 Thread Mikolaj Rydzewski
jim ma wrote: I still want to know if it is possible to stop Tomcat from redirecting. If yes, that will be zero code effort for our current implementation. Why is it a problem for you to use http://localhost:8080/foo/ URL? -- Mikolaj Rydzewski [EMAIL PROTECTED]

Re: How to prevent Tomcat redirect my request

2008-11-20 Thread André Warnier
Mikolaj Rydzewski wrote: jim ma wrote: I still want to know if it is possible to stop Tomcat from redirecting. If yes, that will be zero code effort for our current implementation. Why is it a problem for you to use http://localhost:8080/foo/ URL? I agree with the above, but in case it

Re: How to prevent Tomcat redirect my request

2008-11-20 Thread jim ma
On Thu, Nov 20, 2008 at 6:19 PM, Mikolaj Rydzewski [EMAIL PROTECTED] wrote: jim ma wrote: I still want to know if it is possible to stop Tomcat from redirecting. If yes, that will be zero code effort for our current implementation. Why is it a problem for you to use

Re: How to prevent Tomcat redirect my request

2008-11-20 Thread jim ma
On Thu, Nov 20, 2008 at 6:48 PM, André Warnier [EMAIL PROTECTED] wrote: Mikolaj Rydzewski wrote: jim ma wrote: I still want to know if it is possible to stop Tomcat from redirecting. If yes, that will be zero code effort for our current implementation. Why is it a problem for you to

Re: How to prevent Tomcat redirect my request

2008-11-20 Thread jim ma
On Thu, Nov 20, 2008 at 6:48 PM, André Warnier [EMAIL PROTECTED] wrote: Mikolaj Rydzewski wrote: jim ma wrote: I still want to know if it is possible to stop Tomcat from redirecting. If yes, that will be zero code effort for our current implementation. Why is it a problem for you to

Re: How to prevent Tomcat redirect my request

2008-11-20 Thread André Warnier
jim ma wrote: On Thu, Nov 20, 2008 at 6:48 PM, André Warnier [EMAIL PROTECTED] wrote: Mikolaj Rydzewski wrote: jim ma wrote: I still want to know if it is possible to stop Tomcat from redirecting. If yes, that will be zero code effort for our current implementation. Why is it a problem

Re: How to prevent Tomcat redirect my request

2008-11-20 Thread jim ma
On Thu, Nov 20, 2008 at 10:24 PM, André Warnier [EMAIL PROTECTED] wrote: jim ma wrote: On Thu, Nov 20, 2008 at 6:48 PM, André Warnier [EMAIL PROTECTED] wrote: Mikolaj Rydzewski wrote: jim ma wrote: I still want to know if it is possible to stop Tomcat from redirecting. If yes,

RE: How to prevent Tomcat redirect my request

2008-11-20 Thread Caldarale, Charles R
From: jim ma [mailto:[EMAIL PROTECTED] Subject: Re: How to prevent Tomcat redirect my request If I get 302 response and write some code to resend quest to the redirected location The point everyone's trying to make is that you should send the correct URL the *first* time, rather than