1 Reply Latest reply on Mar 12, 2004 2:47 AM by Chris Lamprecht

    Problem accessing Servlets using JBOSS 3.2.3(200311301445)

    cosmin_wondrous Newbie

      Hi,

      I have deployed an EAR application. I am getting no errors during the deployment. I am able to access the JSP's, but am not able to access the Servlets. The following error comes on my web-page.

      The requested resource (/example/servlet/testServlet) is not available.

      It says that the Servlet is not found, but the servlet exists in the Web-Inf/Classes folder of the .War .

      Pls reply ASAP.

      Thanks in advance

        • 1. Re: Problem accessing Servlets using JBOSS 3.2.3(20031130144
          Chris Lamprecht Newbie

          Have you defined the server and its mapping in your web.xml? Make sure you have an entry similar to this:

          <servlet>
           <servlet-name>PayPalNotificationServlet</servlet-name>
           <servlet-class>com.mycompany.web.servlet.PayPalNotificationServlet</servlet-class>
           <load-on-startup/>
          </servlet>
           ...
          <servlet-mapping>
           <servlet-name>PayPalNotificationServlet</servlet-name>
           <url-pattern>/paypal</url-pattern>
          </servlet-mapping>
          


          This means whenever someone hits /yourcontext/paypal, it maps to the servlet defined.

          Alternatively, to access the servlet using the /example/servlet/* URL, I believe you need to use the full classname, i.e., /example/servlet/com.foo.testServlet