Getting JSP files compiling in Railo

Getting .jsp pages working in Railo/Resin along side .cfm files.

2010-04-29 13:44:00.0

Getting JSP files compiling in Railo

As part of the code samples we are writing for the Teamwork Project Manager API, I needed to get JSP pages compiling. As I have switched mainly to Railo for all my ColdFusion development, I wanted to use that servlet engine and resin to test my work

My knowledge of Resin is pretty poor so this took me a while to figure out (especially the Class Path to JDK bit) but it may help someone else in the same position.

  1. Open up c:\railo\conf\resin.conf
  2. Add in the following to <class-loader> -> <tree-loader path="C:/Program Files/Java/jdk1.6.0_18/lib/"/>
  3. Open up c:\railo\conf\app-default.xml
  4. Uncomment out:
    • <servlet-mapping url-pattern="*.jsp" servlet-name="resin-jsp"/>
      <servlet-mapping url-pattern="*.jspx" servlet-name="resin-jspx"/>
      <servlet-mapping url-pattern="*.php" servlet-name="resin-php"/>

  5. Uncomment out:
    •   <servlet servlet-name="resin-jsp" servlet-class="com.caucho.jsp.JspServlet">
          <init>
            <load-tld-on-init>false</load-tld-on-init>
            <page-cache-max>1024</page-cache-max>
          </init>
          <load-on-startup/>
        </servlet>

        <servlet servlet-name="resin-jspx"
                 servlet-class="com.caucho.jsp.JspServlet">
          <init>
            <load-tld-on-init>false</load-tld-on-init>   
            <page-cache-max>1024</page-cache-max>
            <xml>true</xml>
          </init>
          <load-on-startup/>
        </servlet>

        <servlet servlet-name="resin-php"
                 servlet-class="com.caucho.quercus.servlet.QuercusServlet">
        </servlet>

        <servlet servlet-name="resin-xtp" servlet-class="com.caucho.jsp.XtpServlet"/>

  6. Wait for Railo to restart or Restart it in Services.

Bingo. JSP pages will now be processed along with CFM files

Tags: ColdFusion | Java | JSP | Railo | Tips
Add to your del.icio.us    DIGG This!    Technorati Cosmos Link    Post to Reddit    Add to your Furl    Add to Blinklist
Comments [1] - Leave a comment

Comments

Wow! That's pretty awesome! That's just another reason to love Railo. Thanks for this post.