0 Replies Latest reply on May 18, 2005 6:41 PM by Kumaravel Anand

    problem with web.xml during Apache startup

    Kumaravel Anand Newbie

      Hi
      I am trying to run Budi Kurniawan's Tassie Book store on JBoss 2.4.2 and Tomcat 4.1.

      I have my web.xml file under C:\tomcatj\webapps\bookstore\WEB-INF
      and the contents of this file are as under:
      ?xml version="1.0" encoding="ISO-8859-1"?>
      <!DOCTYPE web-app SYSTEM "http://java.sun.com/dtd/web-app_2_3.dtd" [
      ]>


      <web-app>

      <servlet-name>Search</servlet-name>
      <servlet-class>com.brainysoftware.tassie.servlet.SearchServlet</servlet-class>


      <servlet-name>BookDetails</servlet-name>
      <servlet-class>com.brainysoftware.tassie.servlet.BookDetailsServlet</servlet-class>


      <servlet-name>AddToCart</servlet-name>
      <servlet-class>com.brainysoftware.tassie.servlet.AddToCartServlet</servlet-class>


      <servlet-name>CheckCart</servlet-name>
      <servlet-class>com.brainysoftware.tassie.servlet.CheckCartServlet</servlet-class>



      <servlet-mapping>
      <servlet-name>Search</servlet-name>
      <url-pattern>Seek</url-pattern>
      </servlet-mapping>

      <servlet-mapping>
      <servlet-name>BookDetails</servlet-name>
      <url-pattern>BookD</url-pattern>
      </servlet-mapping>

      <servlet-mapping>
      <servlet-name>AddToCart</servlet-name>
      <url-pattern>AddToC</url-pattern>
      </servlet-mapping>

      <servlet-mapping>
      <servlet-name>CheckCart</servlet-name>
      <url-pattern>CheckC</url-pattern>
      </servlet-mapping>
      </web-app>

      ------------------------------

      When I run Tomcat with the Servlet class files in their places ( i hope i got this right), I get the following errors from Tomcat
      May 18, 2005 3:07:32 PM org.apache.coyote.http11.Http11Protocol init
      INFO: Initializing Coyote HTTP/1.1 on http-8080
      Starting service Tomcat-Standalone
      Apache Tomcat/4.1.31
      May 18, 2005 3:07:36 PM org.apache.struts.util.PropertyMessageResources
      INFO: Initializing, config='org.apache.struts.util.LocalStrings', returnNull=tru
      e
      May 18, 2005 3:07:36 PM org.apache.struts.util.PropertyMessageResources
      INFO: Initializing, config='org.apache.struts.action.ActionResources', returnNul
      l=true
      May 18, 2005 3:07:38 PM org.apache.struts.util.PropertyMessageResources
      INFO: Initializing, config='org.apache.webapp.admin.ApplicationResources', retur
      nNull=true
      May 18, 2005 3:07:41 PM org.apache.commons.digester.Digester endElement
      SEVERE: End event threw exception
      java.lang.reflect.InvocationTargetException
      at sun.reflect.GeneratedMethodAccessor37.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.jav
      a:252)
      at org.apache.commons.digester.CallMethodRule.end(CallMethodRule.java:50
      5)
      at org.apache.commons.digester.Rule.end(Rule.java:276)
      at org.apache.commons.digester.Digester.endElement(Digester.java:1058)
      at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source
      )
      at org.apache.xerces.impl.dtd.XMLDTDValidator.endNamespaceScope(Unknown
      Source)
      at org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(Unknown S
      ource)
      at org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(Unknown Source)

      at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(
      Unknown Source)
      at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContent
      Dispatcher.dispatch(Unknown Source)
      at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Un
      known Source)
      at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
      at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
      at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
      at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
      at org.apache.commons.digester.Digester.parse(Digester.java:1548)
      at org.apache.catalina.startup.ContextConfig.applicationConfig(ContextCo
      nfig.java:220)
      at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:57
      9)
      at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfi
      g.java:181)
      at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
      eSupport.java:119)
      at org.apache.catalina.core.StandardContext.start(StandardContext.java:3
      523)
      at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase
      .java:774)
      at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:76
      0)
      at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:548)

      at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDep
      loyer.java:260)
      at org.apache.catalina.core.StandardHost.install(StandardHost.java:741)
      at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.j
      ava:512)
      at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:354
      )
      at org.apache.catalina.startup.HostConfig.start(HostConfig.java:671)
      at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java
      :311)
      at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
      eSupport.java:119)
      at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1149)

      at org.apache.catalina.core.StandardHost.start(StandardHost.java:707)
      at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1141)

      at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:316
      )
      at org.apache.catalina.core.StandardService.start(StandardService.java:4
      50)
      at org.apache.catalina.core.StandardServer.start(StandardServer.java:214
      3)
      at org.apache.catalina.startup.Catalina.start(Catalina.java:463)
      at org.apache.catalina.startup.Catalina.execute(Catalina.java:350)
      at org.apache.catalina.startup.Catalina.process(Catalina.java:129)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
      java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:156)
      Caused by: java.lang.IllegalArgumentException: Invalid <url-pattern> Seek in servlet mapping at org.apache.catalina.core.StandardContext.addServletMapping(StandardCo
      ntext.java:1633)

      ... 48 more
      May 18, 2005 3:07:42 PM org.apache.coyote.http11.Http11Protocol start
      INFO: Starting Coyote HTTP/1.1 on http-8080
      May 18, 2005 3:07:42 PM org.apache.jk.common.ChannelSocket init
      INFO: JK2: ajp13 listening on /0.0.0.0:8009
      May 18, 2005 3:07:42 PM org.apache.jk.server.JkMain start
      INFO: Jk running ID=0 time=0/111 config=C:\tomcatj\conf\jk2.properties


      I am wondering why it is pointing out an invalid" <url-pattern> Seek". am probably making some very stupid mistake.

      Could anybody see what the problem is and enlighten me?

      All help is appreciated. Thanks in advance