I think <session-config> should come after <servlet>. An exception is probably being thrown, so the web.xml isn't fully read. Try checking the log.
Larry > -----Original Message----- > From: Richard Troy [mailto:[EMAIL PROTECTED]] > Sent: Thursday, November 15, 2001 3:01 PM > To: Tomcat-user > Subject: Figuring out why Tomcat isn't serving a servlet (fwd) > > > Date: 18 Oct 2001 01:06:18 -0000 > From: Dr. Evil <[EMAIL PROTECTED]> > Reply-To: [EMAIL PROTECTED] > To: [EMAIL PROTECTED] > Subject: Figuring out why Tomcat isn't serving a servlet > > > I am completely stumped by a seemingly simple problem. I have created > a very simple servlet: > > import java.io.*; > import javax.servlet.*; > import javax.servlet.http.*; > > public class hello extends HttpServlet { > > public void doGet(HttpServletRequest request, > HttpServletResponse response) > throws ServletException, IOException { > > response.setContentType("text/plain"); > PrintWriter out = response.getWriter(); > > out.println("Hello"); > } > } > > I place compile and place it in > /usr/local/jakarta-tomcat-4.0/webapps/test/WEB-INF/classes/hel > lo.class. > > Then, with no problem, I can access it by going to > localhost:8080/test/servlet/hello. > > That's good. Now I tried to add a web.xml file that will load up > another class which will create the database connection pool for me. > Here's what the web.xml file looks like: > > <?xml version="1.0" encoding="ISO-8859-1"?> > > <!DOCTYPE web-app > PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" > "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd"> > > <web-app> > <session-config> > <session-timeout>120</session-timeout> > </session-config> > <servlet> > <servlet-name>makepool</servlet-name> > <servlet-class>makepool</servlet-class> > <load-on-startup>1</load-on-startup> > </servlet> > </web-app> > > Now with that file in place, I can no longer access servlet/hello. I > tried putting in lines for the servlet: > > <servlet> > <servlet-name>hello</servlet-name> > <servlet-class>hello</servlet-class> > </servlet> > > but that didn't help either. Is there a way to get this to work? > Connection pools aren't too useful if they're the only class you can > have on your server... > > It seems that figuring out paths is a chronic difficulty with Tomcat. > Is there any way to debug what Tomcat is trying to do with a > particular request? > > Thanks > > > -- > To unsubscribe: <mailto:[EMAIL PROTECTED]> > For additional commands: <mailto:[EMAIL PROTECTED]> > Troubles with the list: <mailto:[EMAIL PROTECTED]> > -- To unsubscribe: <mailto:[EMAIL PROTECTED]> For additional commands: <mailto:[EMAIL PROTECTED]> Troubles with the list: <mailto:[EMAIL PROTECTED]>