• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Weird behaviour when calling a jsp page thinks its a servlet

 
Ranch Hand
Posts: 681
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 681
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic