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 trying to make is that you should send the correct URL > the *first* time, rather than sending one that doesn't comply with the HTTP > spec and letting Tomcat correct it for you. > Thanks , Chunk. 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" resource in root context or a request url for the default page in foo context. Server side has that information and can judge it . If there is a foo context , it will reply the redirect response. httpunit can help that. Actually I want to know if there is second option(configure tomcat to support that ) .