workaround for GWT+Jetty JSP compiler issue? (Java 1.5 source level not recognized)

后端 未结 1 1331
一整个雨季
一整个雨季 2021-02-04 01:34

As this thread shows, there seems to be an issue getting JSPs to compile in GWT hosted mode with the new Jetty server:

2. ERROR in /tmp/Jetty_0_0_0_0_8080_war___         


        
相关标签:
1条回答
  • 2021-02-04 01:57

    This problem is generated by the default values used by JspServlet, which compiles using 1.4 for source/target values.

    1. You can cofigure this servlet by adding

      <servlet>
          <servlet-name>jsp</servlet-name>
          <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
          <init-param>
              <param-name>compilerSourceVM</param-name>
              <param-value>1.5</param-value>
          </init-param>
          <init-param>
              <param-name>compilerTargetVM</param-name>
              <param-value>1.5</param-value>
          </init-param>
          <load-on-startup>3</load-on-startup>
      </servlet>
      
    2. There is one more issue as you can't configure JspServlet with the current jasper-compiler-5.0.28. You should download jasper-compiler-5.0.30 and make sure is in your classpath before gwt. There are other latest jasper compiler jars out-there but i'm not sore of how compatible are with jakarta-tomcat-5.0.28. I solved this problem by adding a dependency on jakarta-tomcat-5.0.30 in GWT 1.6.4. You can download the GWT compiled with this dependency from http://raisercostin.googlecode.com/files/gwt-windows-1.6.4.raisercostin.zip

    I described the solution at http://code.google.com/p/raisercostin/wiki/GwtEclipsePluginDebug too.

    0 讨论(0)
提交回复
热议问题