7 Replies Latest reply on Jun 15, 2003 6:53 PM by Jon Barnett

    jboss-3.0.4_tomcat-4.1.12 not serving JSP's, but HTML

    iam Newbie

      Hello,

      I'm trying to deploy this simple war application into JBoss:

      The directory structure:

      /index.html (Wellcome html file)
      /index.jsp (Wellcome jsp file)
      /WEB-INF/web.xml (Deployment descriptor file)

      You can take the files from the .war attached.

      When I deploy the war, the deployment runs correctly, and i can access http://localhost:8080/prova/index.html perfectly, but if I try
      http://localhost:8080/prova/index.jsp then I got the next error:
      ---------------------------------------------------------------------------------
      type Exception report

      message Internal Server Error

      description The server encountered an internal error (Internal Server Error) that prevented it from fulfilling this request.

      exception

      org.apache.jasper.JasperException: Unable to compile class for JSP
      ---------------------------------------------------------------------------------

      I attached the entire error output.

      Any ideas on what's wrong?

        • 1. Re: jboss-3.0.4_tomcat-4.1.12 not serving JSP's, but HTML
          iam Newbie

          If I put the same application, without making the .war file, in the single running tomcat, it runs perfectly without error. I think it may be a JBoss configuration error, but don't know what is wrong.

          Help me please!!!

          bye

          • 2. Re: jboss-3.0.4_tomcat-4.1.12 not serving JSP's, but HTML
            Jon Barnett Master

            The WAR deploys and the JSP excecutes correctly with an embedded Jetty and Tomcat service. The indication from your error log is that the intermediate Java source from the JSP is not able to be found. Most likely this is a permission problem. That is, JBoss is unable to find the index_jsp.java file to compile the servlet that services the /simple/index.jsp URI. Ensure that JBoss has permission to create the file in the necessary directory. In Unix, this will most likely be in the /tmp directory.

            • 3. Re: jboss-3.0.4_tomcat-4.1.12 not serving JSP's, but HTML
              iam Newbie

              funny!!!

              I've tested the permissions running JBoss as root and it works perfectly. I'm going to make the correct user permissions now.

              Thanks jonlee.

              • 4. Re: jboss-3.0.4_tomcat-4.1.12 not serving JSP's, but HTML
                iam Newbie

                That's so strange

                I've shutted down the PC where I tested the application, and where it was running perfectly the simple application above, and now, running JBoss as root (and so, with all file access permission), I have the same first problem. I don't know what happens.

                The server output (not HTML response) is the following:

                --------------------------------------------------------------------------------
                21:34:00,504 INFO [Engine] Error compiling file: /home/ivan/urv/DissenyAplicacionsInternetIntranet/jboss-3.0.4_tomcat-4.1.12/tomcat-4.1.x/work/MainEngine/localhost/simple/index_jsp.java [javac] Compiling 1 source file


                21:34:00,505 ERROR [Engine] StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception
                org.apache.jasper.JasperException: Unable to compile class for JSP

                An error occurred at line: -1 in the jsp file: null

                Generated servlet error:
                [javac] Compiling 1 source file
                -------------------------------------------------------------------------------

                This tell me that the JBoss tmp directory is "/home/ivan/urv/DissenyAplicacionsInternetIntranet/jboss-3.0.4_tomcat-4.1.12/tomcat-4.1.x/work/MainEngine/localhost/".
                Is sure that root has permissions enough to create and access the file index_jsp.java.

                When the application is deployed, that file does not exist. I supose it's created when the index.jsp is requested, because from that moment it exist.

                I don't know what is happening, but is sure that is not a permission problem, because JBoss has root permissions.

                Any ideas?

                • 5. Re: jboss-3.0.4_tomcat-4.1.12 not serving JSP's, but HTML
                  iam Newbie

                  I've forgotten the first line of the error message. Here goes:
                  ------------------------------------------------------------------------------------
                  21:49:47,750 INFO [Engine] StandardHost[localhost]: MAPPING configuration error for request URI /
                  21:49:58,800 INFO [Engine] Error compiling file: /home/ivan/urv/DissenyAplicacionsInternetIntranet/jboss-3.0.4_tomcat-4.1.12/tomcat-4.1.x/work/MainEngine/localhost/simple/index_jsp.java [javac] Compiling 1 source file


                  21:49:58,812 ERROR [Engine] StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception
                  org.apache.jasper.JasperException: Unable to compile class for JSP

                  An error occurred at line: -1 in the jsp file: null

                  Generated servlet error:
                  [javac] Compiling 1 source file
                  ------------------------------------------------------------------------------------

                  • 6. Re: jboss-3.0.4_tomcat-4.1.12 not serving JSP's, but HTML
                    iam Newbie

                    Oh my god. I've resolved the mistery.

                    I've remembered the other day I started the JBoss server so differently.

                    Everytime I've got that problem I was starting JBoss server with:

                    java -jar run.jar

                    instead of:

                    ./run.sh

                    That's my headache!!!

                    Problem solved. One more experience :)

                    • 7. Re: jboss-3.0.4_tomcat-4.1.12 not serving JSP's, but HTML
                      Jon Barnett Master

                      Probably means the tools.jar compiler libraries weren't included in the classpath. That makes sense too.