4 Replies Latest reply on Oct 15, 2002 5:28 AM by Julian Gosnell

    Map *.html to JSP engine?

    Brien Voorhees Newbie

      I'm a new JBoss user and I'm trying to migrate our OrionServer apps over to JBoss. I need to map *.html to the same processor/handler that *.jsp goes to. Can anyone tell me where to set that when using JBossWeb?

      Thanks for any help,
      Brien Voorhees

        • 1. Re: Map *.html to JSP engine?
          Julian Gosnell Expert

          find the webdefaults.xml in .../deploy/jbossweb.sar/org.mortbay.jetty.jar.

          These are the default settings for all webapps.

          study the declarations that map *.jsp to the Jasper jsp engine.

          put something similar in your app's WEB-INF/web.xml to map *.html to Jasper.

          Good luck,


          Jules

          • 2. Re: Map *.html to JSP engine?
            Brien Voorhees Newbie

            That worked perfectly. Thanks much for the help!

            I had searched the .xml files in the directories I could find, looking for any reference to a JSP mapping, but hadn't thought to look inside of jetty.jar.

            I found that copying the servlet definition caused JBoss to generate errors when it tried to recompile the JSP servlet but if I just referenced the JSP servlet by the name already defined in the jetty.jar/web.xml then it worked fine. For the record, this is what I ended up adding to my web.xml :

            <servlet-mapping>
            <servlet-name>JSP</servlet-name>
            <url-pattern>*.html</url-pattern>
            </servlet-mapping>


            Thanks again,
            Brien Voorhees

            • 3. Re: Map *.html to JSP engine?
              Brien Voorhees Newbie

              That worked perfectly. Thanks much for the help!

              I had searched the .xml files in the directories I could find, looking for any reference to a JSP mapping, but hadn't thought to look inside of jetty.jar.

              I found that copying the servlet definition caused JBoss to generate errors when it tried to recompile the JSP servlet but if I just referenced the JSP servlet by the name already defined in the jetty.jar/web.xml then it worked fine. For the record, this is what I ended up adding to my web.xml :

              <servlet-mapping>
              <servlet-name>JSP</servlet-name>
              <url-pattern>*.html</url-pattern>
              </servlet-mapping>


              Thanks again,
              Brien Voorhees

              • 4. Re: Map *.html to JSP engine?
                Julian Gosnell Expert

                I will be moving the webdefault.xml out of this jar, to give easier access.

                Glad I could help,


                Jules