• Post Reply Bookmark Topic Watch Topic
  • New Topic

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

 
Aravind Prasad
Ranch Hand
Posts: 265
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Ranchers

I have a JSP file which is provided below.



The Class File - bondhandler.java is also provided below.



The Javafile comiles and the class file is generated and put under the path WEB-INF\classes\com\cordelia\projects under the project folder.

I am using the following applications


JRE : 1.6
Tomcat Webserver : 6.0


When I run the page, I get the following error.


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: 8 in the jsp file: /programs/bonds/creation/index.jsp
BondHandler cannot be resolved to a type
5:
6:
7: HashMap hmp = new HashMap();
8: BondHandler bh = new BondHandler();
9: ArrayList bondList = new ArrayList();
10: bondList = (ArrayList)bh.listBond();
11: int sizeofary=bondList.size();


An error occurred at line: 8 in the jsp file: /programs/bonds/creation/index.jsp
BondHandler cannot be resolved to a type
5:
6:
7: HashMap hmp = new HashMap();
8: BondHandler bh = new BondHandler();
9: ArrayList bondList = new ArrayList();
10: bondList = (ArrayList)bh.listBond();
11: int sizeofary=bondList.size();



Please kindly help me resolve this issue.

Thanks/Regards

Aravind PRasad
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66157
146
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please read WhyNotUseScriptlets. Your first step should be to refactor the JSP to avoid Java code.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!