6 Replies Latest reply on Jun 7, 2016 6:42 PM by ctomc

    JSP files over JBOSS

    brogers

      Hello

       

      I have a 'trivial' jsp page:

       

      <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Final//EN">

      <HTML>

      <HEAD>

      <TITLE>A simple date example</TITLE>

      </HEAD>

      <BODY COLOR=#ffffff>

      The time on the server is

      <%= new java.util.Date() %>

      </BODY>

      </HTML>

       

      However when I browse to this file,  it seems that my server is just interpreting this as a simple HTML file.  Because this is what I see:

       

      The time on the server is < %= new java.util.Date() %>

       

      Is there something that I am missing in my setup?

        • 1. Re: JSP files over JBOSS
          jaikiran

          Which exact version of server is this? What OS are you on and what vendor/version of Java runtime are you using? Also, what is the exact URL you are using to access the JSP?

          • 2. Re: JSP files over JBOSS
            brogers

            JBoss Version:               7.0.0

            Server OS:                     Mageai 5

            URL of JSP Page:          http://brogers-linux:8080/test/1_1.jsp

            Java VM:                         how best can I tell

             

            Note:  The Management console  [ http://brogers-linux:9990/console/App.html#home ] appears to function fine.

            • 3. Re: JSP files over JBOSS
              jaikiran

              JBoss Version:               7.0.0

               

              Do you mean JBoss EAP 7.0? Or do you mean the community edition AS7.0 (which is too many years old)?

               

               

              Server OS:                     Mageai 5

              That's the first time I'm hearing about such a OS, will check it out.

               

               

              Brent Rogers wrote:

               

              Java VM:                         how best can I tell

               

               

              Paste the output of "java -version" from the command line of the same system where you are running the same and/or point us to the download that you used to install Java.

              • 4. Re: JSP files over JBOSS
                jaikiran

                Also please post a bit more details about the web application packaging. Is it a .war file? How are you deploying it? Can you attach the server.log file when this deployment is done?

                • 5. Re: JSP files over JBOSS
                  brogers

                  [brent@brogers-linux ~]$ java -version

                  openjdk version "1.8.0_72"

                  OpenJDK Runtime Environment (build 1.8.0_72-b15)

                  OpenJDK Server VM (build 25.72-b15, mixed mode)



                  Mageai Linux -- used to be Mandrivia, and prior I think it was mandrake.



                  JBoss Version:    EAP 7.0.0

                   

                  Web App packaging -- I haven't gotten that far. 


                  This JSP file is just a "hello world" type page such that I can re-familiarize myself with JSP.

                  • 6. Re: JSP files over JBOSS
                    ctomc

                    Brent Rogers wrote:

                     

                    Web App packaging -- I haven't gotten that far. 


                    This JSP file is just a "hello world" type page such that I can re-familiarize myself with JSP.

                    you need to have jsp file(s) in war deployment, otherwise they wont be interpreted as JSP but as plain text file.

                     

                    you can just create test.war folder inside of "JBOSS_HOME/standalone/deployments" directory.

                    and put in it test.jsp file with whatever jsp content you want.

                    then start the server and navigate to http://localhost:8080/test/test.jsp

                     

                    assuming you are working on local machine.