Han,

On 11/17/22 05:28, Han Li wrote:


2022年11月17日 17:52,Mark Thomas <ma...@apache.org> 写道:

On 17/11/2022 08:23, Han Li wrote:
2022年11月17日 16:08,Mark Thomas <ma...@apache.org> 写道:

On 17/11/2022 04:04, Han Li wrote:
I think that I encounter a problem, shown below:
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: [17] in the jsp file: [/jsp/include/foo.jsp]
System cannot be resolved
14: See the License for the specific language governing permissions and
15: limitations under the License.
16:
17: --%><%= System.currentTimeMillis() %>
Stacktrace:
        
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:102)
        
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:213)
        
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:589)
        org.apache.jasper.compiler.Compiler.compile(Compiler.java:380)
        org.apache.jasper.compiler.Compiler.compile(Compiler.java:350)
        org.apache.jasper.compiler.Compiler.compile(Compiler.java:334)
        
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:597)
        
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:398)
        org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:383)
        org.apache.jasper.servlet.JspServlet.service(JspServlet.java:331)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:765)
        org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
        
org.apache.catalina.filters.HttpHeaderSecurityFilter.doFilter(HttpHeaderSecurityFilter.java:126)
        
org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:109)
Ant test show passes, but there are problems. (I downloaded 8.5.83 from the 
official website, then accessed example webapp
and also have this problem). I don’t know JDT, but I tested again by upgrading 
ecj version to 4.25 and this
problem was solved.

I can't repeat this.

I downloaded the 8.5.84 RC and then tested with Oracle JDK 1.7.0_80. The JSP 
include example worked.

I then cleared out the work directory, switched to Temurin JDK 11.0.17_08 and 
tested the JSP include example. That worked too.

I made no changes to the Eclipse compiler JAR.

Can you provide the exact steps to recreate the issue from a clean 8.5.84 
download?
There are no exact steps, just need to simply access this url:
http://localhost:8080/examples/jsp/include/foo.jsp

The Java version was the key.

Eclispe JDT 4.6.3 can't compile JSPs under Java 17 as it can't read the Java 17 
class files.

We can't update JDT as that is the latest version that works with Java 7 and 
Tomcat 8.x has a (specification mandated) minimum Java version of 7.

Updating the JDT locally, as you found, is the way to work around this problem.

Got it.

In that case, I think we need to mark the upper limit of JDK version on 
documentation for 8.5.x.

+1

I think we should update the web site to include a note that there is actually a "qualified upper limit" on the Java version supported by Tomcat 8.5.x out of the box, but you can manually-upgrade jdt to version N which is compatible with both Tomcat 8.5.x and Java 17.

I don't think this issue imperils this release, though.

-chris

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to