0 Replies Latest reply on Sep 28, 2009 4:31 AM by Steam s

    web.xml + jsp deployment problem on Jboss

    Steam s Newbie

      Hi people,
      I have an eclipse project that has 1 servlet and 1 jsp page. I'm having problem in deployment on Jboss. The servlet works fine but jsp is not accessible. The structure of my web.xml file is as follows:

      <?xml version="1.0" encoding="UTF-8"?>
      <web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
       <display-name>IBNSubscriberServlet</display-name>
       <servlet>
       <description></description>
       <display-name>SubscriberServlet</display-name>
       <servlet-name>SubscriberServlet</servlet-name>
       <servlet-class>com.ibn.servlets.SubscriberServlet</servlet-class>
       </servlet>
       <servlet-mapping>
       <servlet-name>SubscriberServlet</servlet-name>
       <url-pattern>/SubscriberServlet</url-pattern>
       </servlet-mapping>
      
       <welcome-file-list>
       <welcome-file>index.html</welcome-file>
       <welcome-file>index.htm</welcome-file>
       <welcome-file>index.jsp</welcome-file>
       <welcome-file>default.html</welcome-file>
       <welcome-file>default.htm</welcome-file>
       <welcome-file>default.jsp</welcome-file>
       </welcome-file-list>
      </web-app>


      Do I need to define mappings for the JSP as well? Infact i did that too, like the following :

      <?xml version="1.0" encoding="UTF-8"?>
      <web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
       <display-name>IBNSubscriberServlet</display-name>
       <servlet>
       <description></description>
       <display-name>SubscriberServlet</display-name>
       <servlet-name>SubscriberServlet</servlet-name>
       <servlet-class>com.ibn.servlets.SubscriberServlet</servlet-class>
       </servlet>
       <servlet-mapping>
       <servlet-name>SubscriberServlet</servlet-name>
       <url-pattern>/SubscriberServlet</url-pattern>
       </servlet-mapping>
      
      
       <servlet>
       <servlet-name>MonitoringG7</servlet-name>
       <jsp-file>/com.ibn.view.MonitoringG7.jsp</jsp-file>
       </servlet>
       <servlet-mapping>
       <servlet-name>MonitoringG7</servlet-name>
       <url-pattern>/*</url-pattern>
       </servlet-mapping>
      
       <welcome-file-list>
       <welcome-file>index.html</welcome-file>
       <welcome-file>index.htm</welcome-file>
       <welcome-file>index.jsp</welcome-file>
       <welcome-file>default.html</welcome-file>
       <welcome-file>default.htm</welcome-file>
       <welcome-file>default.jsp</welcome-file>
       </welcome-file-list>
      </web-app>
      


      but still no success.

      The strange thing is that the Servlet and JSP both work when i run the project in Tomcat (without any JSP specific mappings in web.xml), but on deploying the .war file on JBoss the JSP is not accessible, servlet works fine.



      I get this error on accessing
      http://192.168.77.200:8080/IBNSubscriberServlet/view/MonitoringG7.jsp
      the JSP:

      HTTP Status 404 - /IBNSubscriberServlet/view/MonitoringG7.jsp
      
      type Status report
      
      message /IBNSubscriberServlet/view/MonitoringG7.jsp
      
      description The requested resource (/IBNSubscriberServlet/view/MonitoringG7.jsp) is not available.



      I looked into Jboss log file as well:

      \\\Secure FTP Connections\DevServer\opt\integra\middleware\jboss-4.2.3.GA\server\default\log\
      


      but nothing there about my JSP.

      My JSP is under /view folder inside WebContent (eclipse project).

      I have also unwar the file and it has the same directory structure as my Tomcat/Eclipse project shows.

      So could anybody guide me where things are going wrong in this very simple scenario?

      Thanks.