This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
Weird behaviour when calling a jsp page thinks its a servlet
Tony Evans
Ranch Hand
Joined: Jun 29, 2002
Posts: 521
posted
0
I have a JSP Page PageC which calls another jsp page displayRow.jsp through the use of a form.
<FORM action="displayRow.jsp" method="post">
When I directly call pageC, it calls displayRow.jsp with no problems.
but when I use another route
PageA calls ServletA which forwards to PageB which calls ServletB which forwards to PageC which calls displayRow.jsp i get the error message
The requested resource (/servlet/displayRow.jsp) is not available.
Has anyone got an idea of what might be going on under the hood.
Thanks for any help Tony
William Brogden
Author and all-around good cowpoke
Rancher
Joined: Mar 22, 2000
Posts: 12268
1
posted
0
Because of the way you write
<FORM action="displayRow.jsp" method="post">
the browser requests the jsp from the same base it used to get the servlet. Thats why it is looking for "/servlet/displayRow.jsp" You should specify the action URL more completely. You should also read about why using the invoker servlet (implied by "/servlet") is a bad idea here at the ranch FAQ. Bill