Results 1 to 9 of 9
  1. #1
    Eimo is offline Member
    Join Date
    Oct 2010
    Posts
    26
    Rep Power
    0

    Default Apache tomcat help please :(

    Hi,
    I'm trying to do a program using Apache Tomcat, using cookie servlet. I don't know what is the problem. I tried everything to display my webpage. But it keeps giving me this error, in catalina.out file.... PLEASE any help would be appreciated.

    Nov 24, 2010 12:36:10 PM org.apache.catalina.startup.ContextConfig applicationWebConfig
    SEVERE: Parse error in application web.xml file at jndi:/localhost/eman/WEB-INF/web.xml
    org.xml.sax.SAXParseException: The processing instruction target matching "[xX][mM][lL]" is not allowed.
    at com.sun.org.apache.xerces.internal.parsers.Abstrac tSAXParser.parse(AbstractSAXParser.java:1269)
    at org.apache.tomcat.util.digester.Digester.parse(Dig ester.java:1562)
    at org.apache.catalina.startup.ContextConfig.applicat ionWebConfig(ContextConfig.java:369)
    at org.apache.catalina.startup.ContextConfig.start(Co ntextConfig.java:1062)
    at org.apache.catalina.startup.ContextConfig.lifecycl eEvent(ContextConfig.java:261)
    at org.apache.catalina.util.LifecycleSupport.fireLife cycleEvent(LifecycleSupport.java:117)
    at org.apache.catalina.core.StandardContext.start(Sta ndardContext.java:4239)
    at org.apache.catalina.core.ContainerBase.start(Conta inerBase.java:1045)
    at org.apache.catalina.core.StandardHost.start(Standa rdHost.java:719)
    at org.apache.catalina.core.ContainerBase.start(Conta inerBase.java:1045)
    at org.apache.catalina.core.StandardEngine.start(Stan dardEngine.java:443)
    at org.apache.catalina.core.StandardService.start(Sta ndardService.java:516)
    at org.apache.catalina.core.StandardServer.start(Stan dardServer.java:710)
    at org.apache.catalina.startup.Catalina.start(Catalin a.java:566)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.apache.catalina.startup.Bootstrap.start(Bootst rap.java:288)
    at org.apache.catalina.startup.Bootstrap.main(Bootstr ap.java:413)
    Nov 24, 2010 12:36:10 PM org.apache.catalina.startup.ContextConfig applicationWebConfig
    SEVERE: Occurred at line 2 column 6
    Nov 24, 2010 12:36:10 PM org.apache.catalina.startup.ContextConfig start
    SEVERE: Marking this application unavailable due to previous error(s)
    Nov 24, 2010 12:36:10 PM org.apache.catalina.core.StandardContext start
    SEVERE: Error getConfigured
    Nov 24, 2010 12:36:10 PM org.apache.catalina.core.StandardContext start
    SEVERE: Context [/eman] startup failed due to previous errors
    Nov 24, 2010 12:36:10 PM org.apache.coyote.http11.Http11Protocol start
    INFO: Starting Coyote HTTP/1.1 on http-8407
    Nov 24, 2010 12:36:10 PM org.apache.catalina.startup.Catalina start
    INFO: Server startup in 652 ms
    Nov 24, 2010 12:54:53 PM org.apache.coyote.http11.Http11Protocol pause
    INFO: Pausing Coyote HTTP/1.1 on http-8407
    Nov 24, 2010 12:54:54 PM org.apache.catalina.core.StandardService stop
    INFO: Stopping service Catalina
    Nov 24, 2010 12:54:54 PM org.apache.catalina.core.StandardContext stop
    INFO: Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/eman] has not been started
    Nov 24, 2010 12:54:54 PM org.apache.coyote.http11.Http11Protocol destroy
    INFO: Stopping Coyote HTTP/1.1 on http-8407

    I don't know what is the problem, and I already checked my web.xml file.

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,044
    Rep Power
    20

    Default

    What does you web.xml look like?
    Because that's what it's complaining about.

  3. #3
    Eimo is offline Member
    Join Date
    Oct 2010
    Posts
    26
    Rep Power
    0

    Default

    Quote Originally Posted by Tolls View Post
    What does you web.xml look like?
    Because that's what it's complaining about.
    That is web.xml, I wish you can find me a problem to fix it. Otherwise, I'm so desperate I don't know other solutions....


    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5">
    <display-name>Welcome to Tomcat</display-name>
    <description>Welcome to Tomcat</description>

    <servlet>
    <servlet-name>cookie</servlet-name>
    <servlet-class>CookieServlet</servlet-class>
    </servlet>

    <servlet-mapping>
    <servlet-name>cookie</servlet-name>
    <url-pattern>/cookie</url-pattern>
    </servlet-mapping>

    <servlet>
    <servlet-name>cookieorder</servlet-name>
    <servlet-class>CookieOrderServlet</servlet-class>
    </servlet>

    <servlet-mapping>
    <servlet-name>cookieorder</servlet-name>
    <url-pattern>/cookieorder</url-pattern>
    </servlet-mapping>
    </web-app>

    Please advice me if there is a mistake in my web.xml file. Other students in my class did the same but it's not working with me. Even I cannot view the first page :(

  4. #4
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,044
    Rep Power
    20

    Default

    And that's the xml file located at:
    jndi:/localhost/eman/WEB-INF/web.xml
    ?

    Because that looks fine to me.

  5. #5
    Eimo is offline Member
    Join Date
    Oct 2010
    Posts
    26
    Rep Power
    0

    Default

    Quote Originally Posted by Tolls View Post
    And that's the xml file located at:
    jndi:/localhost/eman/WEB-INF/web.xml
    ?

    Because that looks fine to me.
    No it's not located there, how should I change the path? the project folder under:
    web/eman/webapp
    then the xml become underneath:
    project/WEB-INF/web.xml

  6. #6
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,044
    Rep Power
    20

    Default

    Well, that looks correct.
    As in:
    <Tomcat directory>/webapps/<your project>/WEB-INF/web.xml

    I really can't say what's up I'm afraid.

  7. #7
    Join Date
    Jul 2010
    Location
    India
    Posts
    58
    Rep Power
    0

    Default

    Hi ,
    Just a suggestion ... have you checked if there is any space before <?xml version="1.0" encoding="ISO-8859-1" ?> ...... "<?xml version" should be at the start of the file any spaces will throw error.

    warm regards
    Vinod M
    ____________________________
    Give me beans .........

  8. #8
    Eimo is offline Member
    Join Date
    Oct 2010
    Posts
    26
    Rep Power
    0

    Default

    Quote Originally Posted by Tolls View Post
    Well, that looks correct.
    As in:
    <Tomcat directory>/webapps/<your project>/WEB-INF/web.xml

    I really can't say what's up I'm afraid.
    Thank you so much for trying, at last I put my project under Tomcat examples and it worked very well..:)

  9. #9
    Eimo is offline Member
    Join Date
    Oct 2010
    Posts
    26
    Rep Power
    0

Similar Threads

  1. apache tomcat
    By niteangell21 in forum New To Java
    Replies: 0
    Last Post: 10-23-2010, 07:13 PM
  2. Apache-tomcat
    By rakesh1983 in forum NetBeans
    Replies: 1
    Last Post: 09-28-2009, 07:44 AM
  3. What d u use, Apache Tomcat or GlassFish? Why
    By thom_ in forum New To Java
    Replies: 0
    Last Post: 03-05-2009, 11:14 PM
  4. Apache Tomcat 6.0.16
    By Java Tip in forum Java Software
    Replies: 0
    Last Post: 07-29-2008, 04:22 PM
  5. Tomcat and apache
    By Daniel in forum Enterprise JavaBeans (EJB)
    Replies: 1
    Last Post: 07-06-2007, 05:10 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •