2 Replies Latest reply on Nov 11, 2002 1:47 PM by Shafique

    How to deploy JSP

    Fabrizio Boco Newbie

      Hi,

      I am new to JBoss.

      I am using jboss-3.0.0_tomcat-4.0.3

      I have succesfully deployed many EJB and I can call them from a Java Client.

      Now I would call them from a JSP page.

      Can anyone tell me the procedure to deploy the JSP page and how to call it from the browser ?

      Many Thanks.


      Fabrizio

        • 1. Re: How to deploy JSP
          koltar Newbie

          I had this same problem when I started what you do is create a war file of your website. Such as one you have created in tomcat under webapps.

          Assuming your running JBoss Default.
          War the application up and move it to default/deploy then jboss should immediately auto deploy the new war file.

          Assuming no special config changes your URL should be something like http://localhost:8080/mywebapp/index.jsp

          Koltar

          • 2. Re: How to deploy JSP
            Shafique Newbie

            Here is a simply approach (assuming you are using all default Jboss3.x configuration).

            1.You can develop your source code in the following directory structure:

            ---Root
            -----|__hello.jsp
            -----|__WEB-INF
            ------------|__web.xml

            2.Jar the contents of the Root directory ( meaning everything below the Root dir) in a file Hello.war
            3.Deploy the Hello.war file, by placing it in your jboss-3.X\server\default\deploy directory.
            4.Start your Jboss3.x server using default mode.
            5.Point your browser to http://127.0.0.1:8080/Hello/hello.jsp
            6.Just to double check; the (basic) content of your WEB-INF/web.xml file should be as follows:
            <web-app>
            <display-name>HelloJSP</display-name>

            This is a simple web application.



            <servlet-name>hello</servlet-name>
            <display-name>hello</display-name>
            <jsp-file>/hello.jsp</jsp-file>


            <session-config>
            <session-timeout>30</session-timeout>
            </session-config>
            </web-app>


            Good luck, this should help.
            Cheers,
            Shafique Razzaque.
            Singapore.