• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Jsp class could not be compiled error

 
asha austin
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello all am a newbie in JSP nd servlets am facing this error when i try to run my JSP page through tomcat

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

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

An error occurred at line: 8 in the jsp file: /Counter.jsp
Counter cannot be resolved
5: <body>
6:
7: <%
8: out.println(Counter.getCounter());
9: %>
10:
11: </body>

Please help
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65118
89
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are a newbie to JSP you should be learning to do things the right way right off the bat. Putting Java code in JSPs with scriptlet syntax (<% and %>) is a practice that has been discredited for over 9 years now. You should not be doing it.

Be sure that whatever tutorial or reference that you are using to learn JSP focuses on the JSTL (JSP Standard Tag Library) and the EL (Expression Language), and does not focus on Java scriptlets.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic