2 Replies Latest reply on Mar 18, 2006 6:14 AM by Andrew Wallace

    Calling Servlet from JSP

    Andrew Wallace Newbie

      Hi all,

      I would greatly appreciate a response. I am reasonably new to JBoss, and I am having difficulty calling a servlet from my JSP files. I have searched google for a couple of hours, and not found anything specific to this problem and JBoss, so here goes:


      package com.enterprise.servlet;

      import ........etc

      * Servlet Class
      * @web.servlet name="SaveRequirementDetail"
      * display-name="SaveRequirementDetail"
      * description="Description for SaveRequirementDetail"
      * @web.servlet-mapping url-pattern="/SaveRequirementDetail"
      * @web.servlet-init-param name="A parameter"
      * value="A value"
      * name="ejb/Project"
      * type="Session"
      * home="enterprise.interfaces.ProjectHome"
      * remote="enterprise.interfaces.Project"
      * description="Reference to the Project EJB"
      * @jboss.ejb-ref-jndi
      * ref-name="ejb/Project"
      * jndi-name="ejb/Project"
      public class SaveRequirementDetail extends HttpServlet {


      <![CDATA[Description for SaveRequirementDetail]]>

      <param-name>A parameter</param-name>
      <param-value>A value</param-value>






      Once deplyed, I can access the servlet by going to the url defined in servlet-mapping i.e.:


      However, when I try and access it from the JSP page with the following line:

      it returns the message that it is not available.

      So what do I have to put in here to get at it?

      The servlet itself is deployed into WEB-INF/classes/com/enterprise/servlet
      The JSP is deployed in the root (outside WEB-INF).

      Hope you can help