2 Replies Latest reply on Apr 4, 2005 11:36 AM by shanker

    Unable to display servlet page in jboss Please help

    shanker

      PLEASE HELP ME Thanks in advance.

      my package of java file is

      package ums;

      My ear files contains following

      output.jar
      output.war
      application.xml
      manifest.mf

      my jar file contains following

      all class files with package path

      manifest.mf

      my war files contains following

      all html files

      web.xml

      all classfiles with package under web-inf


      *** My application.xml is listed below

      <?xml version="1.0" encoding="ISO-8859-1"?>


      <display-name>Jboss_Tomcat</display-name>



      <web-uri>output.war</web-uri>
      <context-root>/ums</context-root>





      **** my web.xml is listed below

      <?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-name>EmployeeSelectServlet</servlet-name>
      <servlet-class>ums/EmployeeSelectServlet</servlet-class>



      <servlet-mapping>
      <servlet-name>EmployeeSelectServlet</servlet-name>
      <url-pattern>/ums</url-pattern>
      </servlet-mapping>



      </web-app>

      ******

      if i run my application under jboss i get following error message

      1) i invoked Internet explorer with http://localhost:8080/ums
      html files are displayed

      2) when I select a html file and click submit

      It gives following error message.



      ***** Error message *****


      HTTP Status 404 - /ums/EmployeeSelectServlet

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

      type Status report

      message /ums/EmployeeSelectServlet

      description The requested resource (/ums/EmployeeSelectServlet) is not available.


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

      Apache Tomcat/4.1.24-LE-jdk14


      ****

      Thanks again in advance.

        • 1. Re: Unable to display servlet page in jboss Please help
          raja05

          You might want to replace
          <servlet-mapping>
          <servlet-name>EmployeeSelectServlet</servlet-name>
          <url-pattern>/ums</url-pattern>
          </servlet-mapping>

          with
          <servlet-mapping>
          <servlet-name>EmployeeSelectServlet</servlet-name>
          <url-pattern>/EmployeeSelectServlet</url-pattern>
          </servlet-mapping>

          From ur description, it looks like the HTML is posting to EmployeeSElectServlet and there is no resource found for that. Since /ums is part of the context path, you just have to map the rest of it, which is EmployeeSelectServlet. Mapping that to a servlet name should solve ur issue.

          -Raja

          • 2. Re: Unable to display servlet page in jboss Please help
            shanker

            Thanks a lot. I will try. Thankyou once again.

            Shanker.