aspose file tools*
The moose likes JSP and the fly likes Jsp class could not be compiled error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Jsp class could not be compiled error " Watch "Jsp class could not be compiled error " New topic
Author

Jsp class could not be compiled error

asha austin
Greenhorn

Joined: Jan 08, 2011
Posts: 1
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

Joined: Jan 10, 2002
Posts: 60074
    
  65

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.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Jsp class could not be compiled error
 
Similar Threads
CHAPTER 3 HF SERVLETS & JSP --- result.jsp compilation issues
Creating Custom Tags using BodyTagSupport
error while submitting an http web request
Pagination through Struts2 Action Classes
exception implicit object even though page directive is not present