Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

using javabean in to jsp

 
janarthan vedantham
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 295
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic