About Question enthuware.jwpv6.2.968 :

Moderator: admin

Post Reply
targetOCE
Posts: 5
Joined: Fri Jan 02, 2015 7:53 am
Contact:

About Question enthuware.jwpv6.2.968 :

Post by targetOCE »

I just copied and pasted the code in a new "NewFile.jsp" file and executed it in Eclipse / Tomcat 8. It didn't compile.

org.apache.jasper.JasperException: Unable to compile class for JSP:

An error occurred at line: 4 in the jsp file: /NewFile.jsp
Syntax error on tokens, delete these tokens
1: <html>
2: <head>
3: </head>
4: <body> <% for (int i = 0; i < 5 ; i++) { %>
5: out.print(i); <% } %>
6: </body>
7: </html>


An error occurred at line: 5 in the jsp file: /NewFile.jsp
Syntax error on tokens, delete these tokens
2: <head>
3: </head>
4: <body> <% for (int i = 0; i < 5 ; i++) { %>
5: out.print(i); <% } %>
6: </body>
7: </html>


Stacktrace:
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:103)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:199)
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:450)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:361)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:336)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:323)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:564)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:357)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:396)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:340)
javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)

Which is what I had selected as the answer too.

admin
Site Admin
Posts: 10062
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: About Question enthuware.jwpv6.2.968 :

Post by admin »

Not sure how exactly are you trying but I just tried it and it compiled and ran fine.
Why do you think it should not compile?
Paul.
If you like our products and services, please help us by posting your review here.

targetOCE
Posts: 5
Joined: Fri Jan 02, 2015 7:53 am
Contact:

Re: About Question enthuware.jwpv6.2.968 :

Post by targetOCE »

Sorry, it compiled ok now. Actually, when I copied and pasted it into Eclipse for EE, it had some invisible whitespaces from question bank. thanks

Post Reply

Who is online

Users browsing this forum: No registered users and 47 guests