You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by david <ym...@yahoo.com> on 2000/09/13 01:36:21 UTC

JSPs work but not servlets

Thanks for the help attempts.
I can get .jsp files to run, but not servlets!!!!  Help!  This Servlet ran fine under JServe...

I have my stuff in /webapps/tasp  with the appropriate dir structure
I have a web.xml file under /webapps/tasp/web-inf:
  <?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>
       <servlet>
        <servlet-name>ServletTest</servlet-name>
          <servlet-class>ServletTest</servlet-class>
       <servlet-mapping>
           <servlet-name>ServletTest</servlet-name>
           <url-pattern>ServletTest</url-pattern>
       </servlet-mapping>
       </servlet>
  </web-app>
my servlet ServletTest.java and ServletTest.class are under /webapps/tasp/web-inf/

the .jsp that runs is just under /webapps/tasp

the server.xml has an added context:

        <Context path="/tasp" docBase="webapps/tasp" debug="9" reloadable="true" > 
        </Context>

the tomcat.log file is saying:
  Context log: path="/tasp" In error handler 404 null / R( /tasp +  + /ServletTest)
  Context log: path="/tasp" Error: Calling servlet Wrapper(tomcat.errorPage S:org.apache.tomcat.servlets.DefaultErrorPage)
Any ideas what I'm missing to serve my servlets???  I have tried with "demo" servlets with no difference...


Also, am I correct in understanding then that when Tomcat runs alone, it only needss the server.xml and various web.xml files
or does it still use the tomcat.properties and zone.properties files????
Are all the properties files for working with Apache only??

TIA,
-- david

tomcat administration tools

Posted by Osvaldo Brito <os...@laplace.inesc.pt>.
Hi developers world. I was browsing in my tomcat directories (downloaded
from the web) and i found a index file

(file://jakarta-tomcat/webapps/admin/ index.html)

about tomcat administration tools.
Does anyone knows anything about the web location of this precious tools?

Thank you in advance.

PS: I send the html file.


                                


Re: JSPs work but not servlets

Posted by Nizam Mohideen <mo...@hotmail.com>.
>my servlet ServletTest.java and ServletTest.class are under /webapps/tasp/web-inf/
Your class files should go under webapps/tasp/WEB-INF/classes. I can't comment about the rest of the stuff unless I look at my own tomcat settings :-(

--Nizam
  ----- Original Message ----- 
  From: david 
  To: tomcat-user@jakarta.apache.org 
  Sent: Tuesday, September 12, 2000 4:36 PM
  Subject: JSPs work but not servlets


  Thanks for the help attempts.
  I can get .jsp files to run, but not servlets!!!!  Help!  This Servlet ran fine under JServe...

  I have my stuff in /webapps/tasp  with the appropriate dir structure
  I have a web.xml file under /webapps/tasp/web-inf:
    <?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>
         <servlet>
          <servlet-name>ServletTest</servlet-name>
            <servlet-class>ServletTest</servlet-class>
         <servlet-mapping>
             <servlet-name>ServletTest</servlet-name>
             <url-pattern>ServletTest</url-pattern>
         </servlet-mapping>
         </servlet>
    </web-app>
  my servlet ServletTest.java and ServletTest.class are under /webapps/tasp/web-inf/

  the .jsp that runs is just under /webapps/tasp

  the server.xml has an added context:

          <Context path="/tasp" docBase="webapps/tasp" debug="9" reloadable="true" > 
          </Context>

  the tomcat.log file is saying:
    Context log: path="/tasp" In error handler 404 null / R( /tasp +  + /ServletTest)
    Context log: path="/tasp" Error: Calling servlet Wrapper(tomcat.errorPage S:org.apache.tomcat.servlets.DefaultErrorPage)
  Any ideas what I'm missing to serve my servlets???  I have tried with "demo" servlets with no difference...


  Also, am I correct in understanding then that when Tomcat runs alone, it only needss the server.xml and various web.xml files
  or does it still use the tomcat.properties and zone.properties files????
  Are all the properties files for working with Apache only??

  TIA,
  -- david