• 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

JSP INCLUDE TO SERVLET

 
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
We are attempting to include a Servlet from a jsp with the jsp:include action running withing the Visualage Websphere test environment. Our directory structure is
...default_app
servlets
zcaz
LittleServlet
web
FormJSP.jsp
The include statement in FormJSP.jsp is
<jsp:include page="/zcaz.LittleServlet" flush="true"/>
LittleServlet is in the package zcaz. When we invoke the jsp everything works except the include which gives a Error 404 file not found on the LittleServlet. We've read that the relative URL on the include is relative to the Web application to which the jsp belongs and that the base URL can be found using the JSP's ServletContext object.
How is this done and could anyone help in what the relative URL should be with this configuration
TIA Graham

 
Graham Mead
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Oops directory structure is
...default_app/servlets/zcaz/LittleServlet
...default_app/web/FormJSP.jsp
 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i haven't worked with websphere, but based on my knowledge of servlets, here are my thoughts:
did you define the servlet and servlet-mapping elements appropriately in your web.xml file? something like this..Then, in FormJSP.jsp, try "<jsp:include page="/LittleServlet" flush="true"/>"
Good luck.

------------------
Miftah Khan
- Sun Certified Programmer for the Java� 2 Platform
- Sun Certified Web Component Developer for the Java� 2 Platform, Enterprise Edition
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic