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 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 "http://localhost:8080/foo/"; to get what I want . I see web browser
>> can
>> automcatically resend the request to redirected location but httpclient
>> can not.  Is there  configurations for that ?   Could anyone shed  some
>> lights ?
>>
>
> I usually use httpunit, not httpclient. The advantage is that it does all
> the cookies, 302 responses and lord knows what else in the HTTP protocol,
> allowing me to focus on the logic instead of the protocol.
>
> Maybe that's an alternative route for you, if Tomcat cannot be stopped from
> redirecting your app.
> --
> Kees Jan
>
> http://java-monitor.com/forum/
> [EMAIL PROTECTED]
> 06-51838192
>
> Rule 1 for being in a hole: stop digging.
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to