• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

Jsp class could not be compiled error

 
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
 
Sheriff
Posts: 67266
170
Mac Mac OS X IntelliJ IDE jQuery Java
  • 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
Boost this thread!