Two Laptop Bag
The moose likes Tomcat and the fly likes Re: Running JSP in Tomcat Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Reply Bookmark "Re: Running JSP in Tomcat" Watch "Re: Running JSP in Tomcat" New topic
Author

Re: Running JSP in Tomcat

Joe Cheung
Ranch Hand

Joined: Oct 18, 2002
Posts: 104
Dear all,
I tried to run a simple JSP that didn't call other servlet and it worked. However, when I run the JSP files that did call servlet, it failed. Do I need to place the servlet class files into a special directory other than /webapps/WEBINF/classes and make some modification to web.xml in order run the JSP files that have to call other servlet class.
The JSP files was using


Joe
Tim Baker
Ranch Hand

Joined: Oct 04, 2003
Posts: 541
please show us the code that makes the call
also its WEB-INF as im sure you know really
you can call a servlet without making entries to web.xml most of the time if you do it in the format
/mycontext/servlet/blah
if you want another format then you can add a servlet mapping


Kim Jong II (North Korea's Dear Leader) said:Nuclear weapons don't kill people, people kill people.
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 11863
you can call a servlet without making entries to web.xml most of the time if you do it in the format
/mycontext/servlet/blah

This also requires that the invoker servlet be turned on in that context.
Anyway, we need to know exactly how your JSP calls the servlet. Also, can you address the servlet directly from a browser and get the expected response?
Bill


Java Resources at www.wbrogden.com
 
 
subject: Re: Running JSP in Tomcat
 
Threads others viewed
problems running jsp1.2 ...
problems after the move to tomcat 4.0/jsp1.2
Servlet Multithreading
Problem running servlets in tomcat 4.0.1
Call a Java Class on Server start-up
jQuery in Action, 2nd edition