Tomcat startup error

From: devu (devusmail_at_rediffmail.com)
Date: 12/24/03

  • Next message: billbou: "First steps in Java"
    Date: 23 Dec 2003 22:37:13 -0800
    
    

    Hello,

    I'm getting the following error when trying to start Apache Tomcat.The
    version shows up in the snapshot. I can't figure out why this is
    happening. It is aparently the <context-param> tag. If I remove it
    tomcat starts properly. I have pasted web.xml below with the error.

    WEB.XML
    ?xml version="1.0" encoding="ISO-8859-1"?>

    <!DOCTYPE web-app
        PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
        "http://java.sun.com/dtd/web-app_2_3.dtd">

    <web-app>
    <servlet>
            <servlet-name>rooms</servlet-name>
            <servlet-class>ListRooms</servlet-class>
    </servlet>

    <context-param>
            <param-name>listroom_path</param-name>
            <param-value>context_chat</param-value>
    </context-param>
    </web-app>

    ERROR:
    Starting service Tomcat-Standalone
    Apache Tomcat/4.0.5
    PARSE error at line 17 column 11
    org.xml.sax.SAXParseException: The content of element type "web-app"
    must match
    "(icon?,display-name?,description?,distributable?,context-param*,filter*,filter-
    mapping*,listener*,servlet*,servlet-mapping*,session-config?,mime-mapping*,welco
    me-file-list?,error-page*,taglib*,resource-env-ref*,resource-ref*,security-const
    raint*,login-config?,security-role*,env-entry*,ejb-ref*,ejb-local-ref*)".
    Starting service Tomcat-Apache
    Apache Tomcat/4.0.5

    Also posting a previous question which went unanswered:

    In the case of servlets, if the SingleThreadModel interface is "NOT"
    implemented, can we assume that the container will create only one
    Instance of the servlet ?? Or is this container dependent.

    Thanks in advance,

    Devu.


  • Next message: billbou: "First steps in Java"

    Relevant Pages

    • tomcat error....
      ... <!DOCTYPE web-app ... Starting service Tomcat-Standalone ... Instance of the servlet ?? ... Or is this container dependent. ...
      (comp.lang.java.softwaretools)
    • Re: Resource not available error in servlet
      ... Now i run my servlet in browser ashttp://localhost:8080/vsg/myservlet ... it gives me error that resource is not available.... ...
      (comp.lang.java.programmer)
    • Re: servelt newbie question
      ... Now I'm ready to have fun! ... recompile the servlet. ... I can write a simple bash script ...
      (comp.lang.java.programmer)
    • Re: how to run servlet using tomcat 5.5
      ... your servlet class placed relatively like this: ... Place the war file in the webapps directory in Tomcat. ... Then you will invoke it using /YourApp/YourServlet ...
      (comp.lang.java.help)