Spring Roo
  1. Spring Roo
  2. ROO-26

Missing JSPs in application without controller

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.0.0.A1, 1.0.0.A2
    • Fix Version/s: 1.0.0.M2
    • Component/s: WEB MVC
    • Labels:
      None
    • Environment:
      OSX 10.5.7
      Java 5
      Maven 2.0.10
      Tomcat 6.0.18

      Description

      If I create an application with a JPA provider but without a domainclass and without a controller some JSPs are missing.

      Try this:
      roo> create project -projectName simpleroo -topLevelPackage test
      roo> install jpa -provider HIBERNATE -database HYPERSONIC_IN_MEMORY

      mvn packge

      deploy application in tomcat
      open application in browser

      this results in this exception:
      SCHWERWIEGEND: Servlet.service() for servlet jsp threw exception
      org.apache.jasper.JasperException: /index.jsp(2,0) File "/WEB-INF/jsp/includes.jsp" not found
      at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
      at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
      at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:88)
      at org.apache.jasper.compiler.Parser.processIncludeDirective(Parser.java:345)
      at org.apache.jasper.compiler.Parser.parseIncludeDirective(Parser.java:378)
      at org.apache.jasper.compiler.Parser.parseXMLDirective(Parser.java:552)
      at org.apache.jasper.compiler.Parser.parseElements(Parser.java:1446)
      at org.apache.jasper.compiler.Parser.parse(Parser.java:138)
      at org.apache.jasper.compiler.ParserController.doParse(ParserController.java:216)
      at org.apache.jasper.compiler.ParserController.parse(ParserController.java:103)
      at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:154)
      at org.apache.jasper.compiler.Compiler.compile(Compiler.java:315)
      at org.apache.jasper.compiler.Compiler.compile(Compiler.java:295)
      at org.apache.jasper.compiler.Compiler.compile(Compiler.java:282)
      at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:586)
      at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
      at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
      at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter.doFilterInternal(OpenEntityManagerInViewFilter.java:113)
      at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
      at java.lang.Thread.run(Thread.java:613)

      In the file /src/main/webapp/index.jsp are references to this JSP files:

      • /WEB-INF/jsp/includes.jsp
      • /WEB-INF/jsp/header.jsp
      • /WEB-INF/jsp/footer.jsp
        none of them is generates, if no domain class and no controller exists.

        Issue Links

          Activity

          Hide
          Ben Alex added a comment -

          This issue is related to ROO-25 because both of them relate to the phase at which we create files assuming there will be a web application emitted.

          Show
          Ben Alex added a comment - This issue is related to ROO-25 because both of them relate to the phase at which we create files assuming there will be a web application emitted.
          Hide
          Stefan Schmidt added a comment -

          Moved the creation of Web artifacts from addon-maven to addon-web-mvc-controller. The servlet context, web.xml, urlrewrite filter, etc are now installed the first time a controller is generated.

          This should be fixed as of revision 129.

          Show
          Stefan Schmidt added a comment - Moved the creation of Web artifacts from addon-maven to addon-web-mvc-controller. The servlet context, web.xml, urlrewrite filter, etc are now installed the first time a controller is generated. This should be fixed as of revision 129.

            People

            • Assignee:
              Stefan Schmidt
              Reporter:
              Mirko Zeibig
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: