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

using javabean in to jsp

janarthan vedantham
Greenhorn

Joined: Nov 06, 2004
Posts: 1
HI,
I STORED THE FOLLOWING FILES
G:\MYDOCUMENT\JSP
IN THIS ONE I CREATED AN WEBMODULE THAT IS WEB-INF AND META INF THEN I CREATED SOME JSP FILES NEWUSER,INDEX AND USERDATA.I ALSO STORED MY CLASS FILE IN G:\MYDOCUMENTS\JSP\WEBINF\CLASSES\JANA DIRECTORY. WHEN I TRIED TO COMPILE ALL THE JSP FILES ARE COMPILED EXCEPT NEWUSER AND IT GAVE 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: 6 in the jsp file: /Newuser.jsp

Generated servlet error:
[javac] Compiling 1 source file

G:\netbeans3.6\jakarta-tomcat-5.0.19_base\work\Catalina\localhost\jsp\org\apache\jsp\Newuser_jsp.java:47: package org.apache.Mydocuments.jsp.WEBINF.classes.jana does not exist
org.apache.Mydocuments.jsp.WEBINF.classes.jana.UserData state = null;
^



An error occurred at line: 6 in the jsp file: /Newuser.jsp

Generated servlet error:
G:\netbeans3.6\jakarta-tomcat-5.0.19_base\work\Catalina\localhost\jsp\org\apache\jsp\Newuser_jsp.java:49: package org.apache.Mydocuments.jsp.WEBINF.classes.jana does not exist
state = (org.apache.Mydocuments.jsp.WEBINF.classes.jana.UserData) _jspx_page_context.getAttribute("state", PageContext.SESSION_SCOPE);
^



An error occurred at line: 6 in the jsp file: /Newuser.jsp

Generated servlet error:
G:\netbeans3.6\jakarta-tomcat-5.0.19_base\work\Catalina\localhost\jsp\org\apache\jsp\Newuser_jsp.java:51: package org.apache.Mydocuments.jsp.WEBINF.classes.jana does not exist
state = new org.apache.Mydocuments.jsp.WEBINF.classes.jana.UserData();
^
3 errors


org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:127)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:351)
org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:415)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:458)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:553)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:291)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:305)


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


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

Apache Tomcat/5.0.19

[ November 06, 2004: Message edited by: Bear Bibeault ]
[ November 07, 2004: Message edited by: janarthan vedantham ]
Ramaswamy Srinivasan
Ranch Hand

Joined: Aug 31, 2004
Posts: 295
Hi Janarthanan,

Welcome to JAvaranch. Hope you have a nice time here.

Did you check your <jsp:useBean> Tag?

How did you use it.

By the way, which is the server that you are working on?

If the class is present in the location and the <useBean> tag is crrect,
the bean instance will be created.

So, check the tag.

Cheers,
Swamy.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: using javabean in to jsp