Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Weird behaviour when calling a jsp page thinks its a servlet

 
Tony Evans
Ranch Hand
Posts: 598
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13074
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Tony Evans
Ranch Hand
Posts: 598
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks William,

I kind of guessed that may have been the problem, pages are working fine now.

Thanks again.

Tony
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic