aspose file tools*
The moose likes JSP and the fly likes Error comes whilke compiling the jsp page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Error comes whilke compiling the jsp page " Watch "Error comes whilke compiling the jsp page " New topic
Author

Error comes whilke compiling the jsp page

tamnna arzoo
Greenhorn

Joined: Mar 23, 2010
Posts: 23

here iam using three beans and one jsp page


and error comes

HTTP Status 500 -

--------------------------------------------------------------------------------

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: 217 in the jsp file: /Company.jsp
Syntax error on token "Company", ? expected after this token
214: int i=1;
215:
216:
217: if(Company C:l)
218:
219:
220: {


An error occurred at line: 217 in the jsp file: /Company.jsp
Company cannot be resolved
214: int i=1;
215:
216:
217: if(Company C:l)
218:
219:
220: {


Stacktrace:
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:85)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:415)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:308)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:273)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:308)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)


note The full stack trace of the root cause is available in the Apache Tomcat/6.0.10 logs.








Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39549
    
  27
What's the semicolon doing in the import statement?

Also, "if (Company c : l)" is not valid Java syntax; what's that supposed to do?


Ping & DNS - updated with new look and Ping home screen widget
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

That 300+ lines is almost completely unreadable--it'd be easier to help if it was well-formatted. Also, in general, it's best to just post a complete enough example to demonstrate the problem.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Error comes whilke compiling the jsp page
 
Similar Threads
wrong jar reference
Dynamic table generation in jsp
no error message display for invalid user and password authentication
change of logo image src in JSP
HTML does not print properly - table width exceeding 100%?