As 显示,使用新的 Jetty 服务器在 GWT 托管模式下编译 JSP 似乎存在问题:
2. ERROR in /tmp/Jetty_0_0_0_0_8080_war____ut4fm1/jsp/org/apache/jsp/
test_jsp.java (at line 53)
new java.util.ArrayList<String>();
^^^^^^
Syntax error, parameterized types are only available if source level
is 1.5
有人有解决方法吗?有可能这次提交 http://code.google.com/p/google-web-toolkit/source/detail?r=5109可能有关系。我不知道相当于什么org.eclipse.jdt.core.JDTCompilerAdapter
应该用于在 Eclipse 外部构建(例如在命令行上)。这对于我们采用 GWT 1.6 来说是一个真正的障碍,因此任何指针都将受到高度赞赏。
此问题是由 JspServlet 使用的默认值产生的,该默认值使用 1.4 作为源/目标值进行编译。
-
您可以通过添加来配置此 servlet
<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>
- 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 https://raisercostin.googlecode.com/svn/maven2/tomcat/jasper-compiler/5.0.30/jasper-compiler-5.0.30.jar 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 http://raisercostin.googlecode.com/files/gwt-windows-1.6.4.raisercostin.zip
我在以下位置描述了解决方案http://code.google.com/p/raisercostin/wiki/GwtEclipsePluginDebug http://code.google.com/p/raisercostin/wiki/GwtEclipsePluginDebug too.
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)