5 Replies Latest reply on Oct 24, 2002 10:27 AM by Sandeep Dixit

    jsp not in war - JBoss 3.X ?

    Sandeep Dixit Newbie

      Is it possible to deploy a jsp page (at runtime) without packaging it into a war? I used to do this in earlier versions of JBoss, by putting it under catalina\work\localhost\MyContextRoot\

      - Sandeep

        • 1. Re: jsp not in war - JBoss 3.X ?
          Joel Vogt Master

          make a directory in deploy named app.war. Put your jsp in here.

          • 2. Re: jsp not in war - JBoss 3.X ?
            Sandeep Dixit Newbie

            Under what context would the jsp page be available?
            "/" or "appl/"

            To rephrase the question, what would be the URL?
            http://server:8080/localHost/myjsp.jsp or http://server:8080/localHost/appl/myjsp.jsp

            Also could you please explain the logic behind creating appl.war in the deploy directory?

            Thanks a bunch,

            • 3. Re: jsp not in war - JBoss 3.X ?
              Sandeep Dixit Newbie

              This is very frustrating... My original .war is deployed under context SalesContextRoot. The jsp created at runtime also needs to be available under SalesContextRoot. Per your suggestion, I tried to put the runtime-created jsp under default\deploy\SalesContextRoot.war directory. It didn't work. It is obvisous since the SalesContextRoot directory already exists under tomcat\...\work\...\localhost. The thing that amazes me is if I put runtime-created jsp directly under tomcat....\localhost\SalesContextRoot directory, the abstract containter fails to see it. Why?


              Below is the error message:-

              13:07:11,085 INFO [MainDeployer] Starting deployment of package: file:/C:/jboss
              13:07:11,085 INFO [STDOUT] 999377 [ScannerThread] INFO org.jboss.deployment.Mai
              nDeployer - Starting deployment of package: file:/C:/jboss-3.0.3_tomcat-4.1.12/
              13:07:11,095 INFO [EmbeddedCatalinaService41] deploy, ctxPath=/SalesContextRoot
              , warUrl=file:/C:/jboss-3.0.3_tomcat-4.1.12/server/default/deploy/SalesContextRo
              13:07:11,105 INFO [STDOUT] 999387 [ScannerThread] INFO org.jboss.web.catalina.E
              mbeddedCatalinaService41 - deploy, ctxPath=/SalesContextRoot, warUrl=file:/C:/j
              13:07:11,125 ERROR [URLDeploymentScanner] Failed to deploy: org.jboss.deployment
              .scanner.URLDeploymentScanner$DeployedURL@e2d270eb{ url=file:/C:/jboss-3.0.3_tom
              cat-4.1.12/server/default/deploy/SalesContextRoot.war/, deployedLastModified=0 }

              org.jboss.deployment.DeploymentException: Error during deploy; - nested throwabl
              e: (java.lang.IllegalArgumentException: addChild: Child name '/SalesContextRoot
              ' is not unique)
              at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:30

              • 4. Re: jsp not in war - JBoss 3.X ?
                Joel Vogt Master

                okay. If you create the directory foo.war in deploy. Then you can see this at


                I'm not sure what you mean by having both a war and a jsp directory. You can just unzip your war and have the one thing to work on.
                The logic behind it is that it works. You will not be able to see anything in general under the tomcat directory as jboss will not look there.

                • 5. Re: jsp not in war - JBoss 3.X ?
                  Sandeep Dixit Newbie

                  The solution you proposed won't work as a new Context is being created. Per Servlet 2.3 specs, there is exactly one ServletContext per webapp. What I want to do it put a jsp file in the root where app.war is already deployed. The idea is to have this jsp available under the ServletContext of app.war.