It's not a secret anymore!*
The moose likes JSP and the fly likes Why i am getting Jasper Exception? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Why i am getting Jasper Exception?" Watch "Why i am getting Jasper Exception?" New topic
Author

Why i am getting Jasper Exception?

Kir Swa
Greenhorn

Joined: May 03, 2012
Posts: 9
Iam trying to run simple jsp code and Java Bean from http://www.tutorialspoint.com/jsp/jsp_actions.htm (<jsp:useBean> action Example) in tomcat. I placed the jsp page in webapps folder and class file in webapps/classes/action path. Can any help me, why iam getting Jasper Exception

This is complete Exception iam getting.

type Exception report

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

exception

org.apache.jasper.JasperException: /main.jsp(10,2) The value for the useBean class attribute action.Bean1 is invalid.
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:148)
org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1233)
org.apache.jasper.compiler.Node$UseBean.accept(Node.java:1178)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2361)
org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2411)
org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2417)
org.apache.jasper.compiler.Node$Root.accept(Node.java:495)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2361)
org.apache.jasper.compiler.Generator.generate(Generator.java:3459)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:231)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:354)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:334)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:321)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:592)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:328)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

Thank you in advance
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61092
    
  66

Kir Swa wrote:I placed the jsp page in webapps folder and class file in webapps/classes/action path.

Not correct. You need to create a context root folder in webapps, and then put your web files under that folder. And the you need a WEB-INF folder in the context root folder.

For example: webapps/myproject/WEB-INF/classes


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Kir Swa
Greenhorn

Joined: May 03, 2012
Posts: 9
Thank you. Its working now
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Why i am getting Jasper Exception?