You're very welcome. I've run into this problem before and though I'm 
not too familiar with the inner workings with tomcat and how its 
redirect work (I should read the source code .. it is open source 
after all ;-) 

One suggestion is if you could write a custom tag to do redirects like 
this so that in essence you are just editing one thing. So in essence 
you can do something like:

<mytag:redirect="url?query_string"/>

and define everything in the custom tag. Another thing is to print out 
the headers of the sendRedirect to see what's its actually sending out 
or do some sort of snoop on it. Not sure what it would buy you .. but 
it might help understand Tomcat's internal behavior.

In any case, good luck and if I run into more info I'll keep this list 
posted.

Regards,

Jan-Michael


----- Original Message -----
From: "Neginder Singh" <[EMAIL PROTECTED]>
Date: Monday, January 13, 2003 11:05 pm
Subject: Re: Tomcat 4.1.18: Problems redirecting the page

> 
> Dear Jan
> 
> Many thanks for your quick fix. It worked. But does it mean that 
> Tomcat 
> 4.1.18 has some different way of defining the path. Do you have an 
> idea if 
> there is any documentation which i could look into.
> 
> Thanks.
> Best Wishes.
> Neginder.
> 
> 
> 
> 
> 
> 
> >From: Jan-Michael Ong <[EMAIL PROTECTED]>
> >Reply-To: "Tomcat Users List" <[EMAIL PROTECTED]>
> >To: "Tomcat Users List" <[EMAIL PROTECTED]>
> >Subject: Re: Tomcat 4.1.18: Problems redirecting the page
> >Date: Mon, 13 Jan 2003 12:54:53 -0800
> >
> >Try the following
> >
> >modify
> >
> >   
> response.sendRedirect("intermediateForm.jsp?errMsg="+sbuf.toString()
+>
> >to
> >
> >   
> >response.sendRedirect(>
> >and see if that helps
> >
> >
> >Jan-Michael
> >
> >At 09:15 PM 1/13/2003 +0530, Neginder Singh wrote:
> >
> >>Dear All
> >>
> >>I am using the Tomcat Version 4.1.18. I am trying to run and 
> application 
> >>which was running fine on Tomcat3.2.1 Version.
> >>
> >>The aaplication is installed under tomcat as follows:
> >>
> >>C:/tomcat4.1.18/webapp>>uses app2 (also under 
> c:/tomcat4.1.18/webapp>>soap. The jar required to access this soap 
> application i.e app2.jar are 
> >>put under C:/jakarta-tomcat-4.1.18/common/lib.
> >>
> >>app1 has three jsp page firstPage.jsp, secondPage.jsp and 
> finalPage.jsp>>all located under C:/tomcat4.1.18/webapp>>
> >>When i try accessing the app1 using the following:
> >>http://localhost:908 (OK-success in accessing). The 
> >>application is such that it uses the parameters in app1 to 
> calculate the 
> >>tax Percent using the app2 and display the results in 
> finalPAge.jsp. And 
> >>if the application accesses this page and calculates the right 
> tax values 
> >>using the app2 then it reaches the finalPage. But in case if the 
> app1 
> >>fails to access app2, in that case the request is redirected to 
> >>secondPage.jsp
> >>
> >>I use the following code in finalPage.jsp to redirect it to 
> secondPage>>
> >>   
> response.sendRedirect("intermediateForm.jsp?errMsg="+sbuf.toString()
+>>               "&firstName="+firstName+"&lastName="+lastName+
> >>               "&codeSex="+codeSex+
> >>               "&age="+age+"&churchTax="+churchTax+
> >>               "&borderCrosser="+borderCrosser+
> >>               "&numberDependent="+numberDependent+
> >>               "&rateCode="+rateCode+
> >>               
> "&kanton="+kanton+"&unitRateInterval="+unitRateInterval+>>         
>      "&unitRate="+unitRate+"&unitNr="+unitNr+
> >>               "&pensionPreference="+pensionPreference+
> >>               "&employerMonthlyExpenses="+employerMonthlyExpenses+
> >>               "&estimateInterval="+estimateInterval+"");
> >>        }
> >>
> >>But the problem is when the page is redirected to 
> secondPage.jsp, i get 
> >>the following error:
> >>HTTP Status 404 - /secondpage.jsp
> >>
> >>type Status report
> >>
> >>message /secondpage.jsp
> >>
> >>description The requested resource (/secondpage.jsp) is not 
> available.>>
> >>But if i rename the secondPage.jsp to secondpage.jsp, it 
> accesses the page 
> >>but then doesnot display the error message which i want to 
> display on the 
> >>secondPage.jsp.
> >>
> >>http://localhost:9080/revenueestimate/intermediateForm.jsp?
errmsg=error:?errMsg=Error:%20No%20entry%20was%20found%20for%
20request!!
&firstName=&lastName=&codeSex=Male&age=32&churchTax=N&borderCrosser=&nu
mberDependent=2&rateCode=A&kanton=AG&unitRateInterval=1&unitRate=150.0&
unitNr=200.0&pensionPreference=Minimum%20Pension%
20Plan&employerMonthlyExpenses=1500.0&estimateInterval=1.
> >>
> >>I have no idea why i am getting the errmsg=error:?(extra bit )in 
> the url. 
> >>Obviously when i remove the errmsg=error:?, i am able to display 
> the 
> >>message "No entry was found" in the jsp page.
> >>
> >>Could any one help me in explaining as to what is going on .
> >>1.Why the redirect doesnot work to redirect the page to 
> secondPage.jsp but 
> >>instead looks for secondpage.jsp.
> >>2. Also could any one explain how the extra bit errmsg=error:? 
> is inserted 
> >>due to which the error Message is not displayed.
> >>
> >>How could i fix this bug.
> >>
> >>I would really appreciate any kind of help.
> >>
> >>Thanks.
> >>Neginder
> >>
> >>_________________________________________________________________
> >>MSN 8 with e-mail virus protection service: 2 months FREE* 
> >>http://join.msn.com/?page=features/virus
> >>
> >>
> >>--
> >>To unsubscribe, e-mail:   
> >><mailto:[EMAIL PROTECTED]>
> >>For additional commands, e-mail: 
> >><mailto:[EMAIL PROTECTED]>
> >
> >
> >--
> >To unsubscribe, e-mail:   
> ><mailto:[EMAIL PROTECTED]>
> >For additional commands, e-mail: 
> ><mailto:[EMAIL PROTECTED]>
> 
> 
> _________________________________________________________________
> MSN 8 with e-mail virus protection service: 2 months FREE* 
> http://join.msn.com/?page=features/virus
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:tomcat-user-
> [EMAIL PROTECTED]>For additional commands, e-mail: 
> <mailto:[EMAIL PROTECTED]>
> 
> 


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to