1 Reply Latest reply on Apr 17, 2004 8:34 PM by jonlee

    Ask for help about jboss-tomcat bundled package again!

    calffin

      I can get a WebModule.war file in %JBOSS_HOME%\server\all\deploy directory and I can get the class file in the directory designated by the lomboz for eclipse. My web.xml is below:

      <servlet-name>accountlet</servlet-name>
      <servlet-class>server.web.Accountlet</servlet-class>
      <servlet-mapping>
      <servlet-name>accountlet</servlet-name>
      <url-pattern>/*.account</url-pattern>
      </servlet-mapping>
      <welcome-file-list>
      <welcome-file>index.jsp</welcome-file>
      </welcome-file-list>
      <error-page>
      <error-code>404</error-code>
      /error.jsp
      </error-page>
      </web-app>


      when I start the jboss server in the eclipse. The jboss can automatically deploy the WebModule.war in the last few steps of the start proccess. after the server is invoked, I open the browser and type the url:" http://localhost:8080/WebModule ", the default string "Welcome" can be seen and the url changed to "http://127.0.0.1:8080/WebModule/index.jsp". But If I type the url:"http://127.0.0.1:8080/WebModule/accountlet" or "http://127.0.0.1:8080/WebModule/edit.account" , the browser said it can't find the server.And the error information emerged on the eclipse console:
      ERROR [Engine] ErrorDispatcherValve[localhost]: Exception Processing ErrorPage[errorCode=404, location=/error.jsp]
      It seemed that the problem resides in the url. I viewed some posts in the forum .It seemed that the jboss-tomcat bundled package disable the configuration file of tomcat . It's different from the situation only with TomCat alone. So I don't know where I can edit to solve this problem.
      Please give me some sugesstion !Any idea would be highly appreciated.
      Thank you a lot!
      Best regards.

        • 1. Re: Ask for help about jboss-tomcat bundled package again!
          jonlee

          Trying to call "/accountlet" will never work because there is no pattern match for it - for security reasons, anonymous servlets are not supported: a servlet is not accessible by its servlet name. A servlet may have zero or more url patterns associated with it. I'm not sure whether the pattern match you are providing is valid either, or at least interpreted in the way you think - that is not a pattern form I've ever tried. In order to test things, I would put a concrete pattern in its place. You can try some fancy stuff later.

          <url-pattern>/accountlet</url-pattern>


          http://localhost:8080/WebModule/accountlet should then work.

          I would also check http://localhost:8080/web-console to make sure the servlet mapping is as you expect.