Spring Roo
  1. Spring Roo
  2. ROO-680

Roo JSP views do not work not compatible with Tomcat 5.5

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: 1.0.2.RELEASE
    • Fix Version/s: 1.1.0.M1
    • Component/s: WEB MVC
    • Labels:
      None
    • Environment:
      Tomcat 5.5

      Description

      A Spring Roo application is not compatible with JSP 2.0 containers such as Tomcat 5.5 because some views use JSP 2.1 tags. This is known to be a problem with the uncaughtException.jpsx and resourceNotFound.jspx pages. See referenced forum thread.

      ERROR http-8080-Processor20 org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/petclinic].[jsp] - Servlet.service() for servlet jsp threw exception
      java.lang.NoClassDefFoundError: javax/el/ValueExpression
      	at java.lang.Class.getDeclaredMethods0(Native Method)
      	at java.lang.Class.privateGetDeclaredMethods(Class.java:2395)
      	at java.lang.Class.getDeclaredMethods(Class.java:1763)
      	at java.beans.Introspector$1.run(Introspector.java:1265)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at java.beans.Introspector.getPublicDeclaredMethods(Introspector.java:1263)
      	at java.beans.Introspector.getTargetMethodInfo(Introspector.java:1129)
      	at java.beans.Introspector.getBeanInfo(Introspector.java:387)
      	at java.beans.Introspector.getBeanInfo(Introspector.java:159)
      	at java.beans.Introspector.getBeanInfo(Introspector.java:220)
      	at java.beans.Introspector.<init>(Introspector.java:368)
      	at java.beans.Introspector.getBeanInfo(Introspector.java:159)
      	at java.beans.Introspector.getBeanInfo(Introspector.java:220)
      	at java.beans.Introspector.<init>(Introspector.java:368)
      	at java.beans.Introspector.getBeanInfo(Introspector.java:159)
      	at org.apache.jasper.compiler.Generator$TagHandlerInfo.<init>(Generator.java:3734)
      	at org.apache.jasper.compiler.Generator$GenerateVisitor.getTagHandlerInfo(Generator.java:2146)
      	at org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1614)
      	at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1442)
      	at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2166)
      	at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2216)
      	at org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1819)
      	at 
      .....
      ERROR http-8080-Processor20 org.apache.tiles.jsp.taglib.RenderTag - IO Error executing tag: JSPException including path '/WEB-INF/views/uncaughtException.jspx'.
      org.apache.tiles.util.TilesIOException: JSPException including path '/WEB-INF/views/uncaughtException.jspx'.
      	at org.apache.tiles.servlet.context.ServletUtil.wrapServletException(ServletUtil.java:232)
      	at org.apache.tiles.jsp.context.JspTilesRequestContext.include(JspTilesRequestContext.java:105)
      	at org.apache.tiles.jsp.context.JspTilesRequestContext.dispatch(JspTilesRequestContext.java:96)
      	at org.apache.tiles.renderer.impl.UntypedAttributeRenderer.write(UntypedAttributeRenderer.java:61)
      	at org.apache.tiles.renderer.impl.AbstractBaseAttributeRenderer.render(AbstractBaseAttributeRenderer.java:103)
      	at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:669)
      	at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:337)
      	at org.apache.tiles.jsp.taglib.InsertAttributeTag.render(InsertAttributeTag.java:234)
      	at org.apache.tiles.jsp.taglib.InsertAttributeTag.render(InsertAttributeTag.java:211)
      	at org.apache.tiles.jsp.taglib.RenderTag.doEndTag(RenderTag.java:220)
      	at org.apache.jsp.WEB_002dINF.layouts.default_jspx._jspx_meth_tiles_005finsertAttribute_005f1(default_jspx.java:467)
      	at org.apache.jsp.WEB_002dINF.layouts.default_jspx._jspService(default_jspx.java:142)
      	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
      	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
      	at 
      ...
      

        Activity

        Hide
        Stefan Schmidt added a comment -

        Hi Simon,

        We reviewed the possibility of supporting Tomcat 5.5 in Roo generated applications but came to the conclusion that it is better to recommend for Roo users to upgrade to Tomcat 6. Tomcat 6 (stable) was released more than 3 years ago and all feature improvements are included in the 6.0 releases. As you noted Tomcat 6 does also support the JSP 2.1 API whereas Tomcat 5.5 does not.

        Roo makes extensive use of the JSP 2.1 API in the scaffolded Web UI (specifically expression language). Furthermore, the JSP 2.0 API does not support JDK 5 enums (a feature that Roo would need).

        Therefore, the current scaffolded views do not run on Tomcat 5.5. It may be possible for you to develop a custom tagx library which could be used with the scaffolded Roo views (a feature that will be included in the upcoming Roo 1.1 M1 release) which are JSP 2.0 API compliant. This would however be done by an external addon.

        I will update the known issues section of the roo reference accordingly.

        I am closing this ticket as 'won't fix' for the reasons discussed here.

        Show
        Stefan Schmidt added a comment - Hi Simon, We reviewed the possibility of supporting Tomcat 5.5 in Roo generated applications but came to the conclusion that it is better to recommend for Roo users to upgrade to Tomcat 6. Tomcat 6 (stable) was released more than 3 years ago and all feature improvements are included in the 6.0 releases. As you noted Tomcat 6 does also support the JSP 2.1 API whereas Tomcat 5.5 does not. Roo makes extensive use of the JSP 2.1 API in the scaffolded Web UI (specifically expression language). Furthermore, the JSP 2.0 API does not support JDK 5 enums (a feature that Roo would need). Therefore, the current scaffolded views do not run on Tomcat 5.5. It may be possible for you to develop a custom tagx library which could be used with the scaffolded Roo views (a feature that will be included in the upcoming Roo 1.1 M1 release) which are JSP 2.0 API compliant. This would however be done by an external addon. I will update the known issues section of the roo reference accordingly. I am closing this ticket as 'won't fix' for the reasons discussed here.
        Hide
        Dzmitry Barouka added a comment -

        Hi Stefan,

        I've posted some solution: http://forum.springsource.org/showpost.php?s=10e2df3cc266c9a85f8d473716d9b0c3&p=287652&postcount=15
        Currently, we use tomcat5.5 (cutomer's request) and Roo in our project.

        Show
        Dzmitry Barouka added a comment - Hi Stefan, I've posted some solution: http://forum.springsource.org/showpost.php?s=10e2df3cc266c9a85f8d473716d9b0c3&p=287652&postcount=15 Currently, we use tomcat5.5 (cutomer's request) and Roo in our project.
        Hide
        Simon Dyson added a comment -

        Thanks Stefan. I'm happy with this resolution as long as the documentation is clearer about the requirements for Roo. I've looked through the reference material and couldn't find any section on Roo's requirements.

        Show
        Simon Dyson added a comment - Thanks Stefan. I'm happy with this resolution as long as the documentation is clearer about the requirements for Roo. I've looked through the reference material and couldn't find any section on Roo's requirements.
        Hide
        Stefan Schmidt added a comment -

        @Dzmitry

        Thanks for sharing this workaround. We have not tested this on Tomcat 5.5 but I am happy to hear it works for you. I will add a link to your post in the 'known issues' section of the Roo reference guide. Not sure though how this 'retrofitting' of API updates to a Tomcat version which was not designed to work with JSP 2.1 would hold up in production.

        @Simon

        I am glad you understand our argument here. The next Roo release (1.1) will definitely contain the remark with regards to Tomcat 5.5.

        Show
        Stefan Schmidt added a comment - @Dzmitry Thanks for sharing this workaround. We have not tested this on Tomcat 5.5 but I am happy to hear it works for you. I will add a link to your post in the 'known issues' section of the Roo reference guide. Not sure though how this 'retrofitting' of API updates to a Tomcat version which was not designed to work with JSP 2.1 would hold up in production. @Simon I am glad you understand our argument here. The next Roo release (1.1) will definitely contain the remark with regards to Tomcat 5.5.

        From the beginning, I think that Roo is a tool with many expectations.

        But I am surprised to see how Roo has dropped support for Tomcat 5.5 suddenly. What happens with the applications already made with Roo and running in Tomcat 5.5? How will these applications to use new versions of Roo? In some settings, change the application server is a complex task and even not possible.

        Still, my greatest fear is that Roo made another change in the future and make that my application can not update to new versions of Roo.

        Please, I would appreciate an explanation.

        Note: Related reply on forum at http://forum.springsource.org/showpost.php?p=292328&postcount=16

        Show
        Mario Martínez Sánchez - gvNIX - DiSiD Technologies S.L. added a comment - From the beginning, I think that Roo is a tool with many expectations. But I am surprised to see how Roo has dropped support for Tomcat 5.5 suddenly. What happens with the applications already made with Roo and running in Tomcat 5.5? How will these applications to use new versions of Roo? In some settings, change the application server is a complex task and even not possible. Still, my greatest fear is that Roo made another change in the future and make that my application can not update to new versions of Roo. Please, I would appreciate an explanation. Note: Related reply on forum at http://forum.springsource.org/showpost.php?p=292328&postcount=16
        Hide
        Simon Dyson added a comment -

        @Mario

        To my knowledge Roo scaffolded views have never been compatible with Tomcat 5.5. I was experiencing the above problems using Roo 1.0.2.

        Also, note (as Stefan mentioned above) that future versions of Roo will support custom tag libraries for use with scaffolded views so you will soon be able to make Roo work with Tomcat 5.5 if you wish. Couple this with the fact that Roo is not a runtime dependency and I think you have very little to worry about with future compatibility.

        Show
        Simon Dyson added a comment - @Mario To my knowledge Roo scaffolded views have never been compatible with Tomcat 5.5. I was experiencing the above problems using Roo 1.0.2. Also, note (as Stefan mentioned above) that future versions of Roo will support custom tag libraries for use with scaffolded views so you will soon be able to make Roo work with Tomcat 5.5 if you wish. Couple this with the fact that Roo is not a runtime dependency and I think you have very little to worry about with future compatibility.

          People

          • Assignee:
            Stefan Schmidt
            Reporter:
            Simon Dyson
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: