Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / JavaBeans / April 2004

Tip: Looking for answers? Try searching our database.

beans compilation

Thread view: 
sam - 26 Jan 2004 01:04 GMT
i'm using a simple bean that stores username and password at the moment (so
that i know that the java file actually compiles and works) as the back end
to my jsp page. the name of the bean is rollbean.java and it compiles fine.

in my pages i have the following:
<jsp:useBean id="rollbook" class="rollbean" scope="session" />
up the top of the jsp file.

when i go to view the file in internet explorer the following message comes
up:

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: 2 in the jsp file: /menu.jsp

Generated servlet error:
   [javac] Compiling 1 source file

/usr/jakarta-tomcat-5.0.16/work/Catalina/localhost/_/org/apache/jsp/menu_jsp
.java:43: cannot resolve symbol
symbol  : class rollbean
location: class org.apache.jsp.menu_jsp
     rollbean rollbook = null;
     ^

An error occurred at line: 2 in the jsp file: /menu.jsp

Generated servlet error:
/usr/jakarta-tomcat-5.0.16/work/Catalina/localhost/_/org/apache/jsp/menu_jsp
.java:45: cannot resolve symbol
symbol  : class rollbean
location: class org.apache.jsp.menu_jsp
       rollbook = (rollbean) pageContext.getAttribute("rollbook",
PageContext.SESSION_SCOPE);
                   ^

An error occurred at line: 2 in the jsp file: /menu.jsp

Generated servlet error:
/usr/jakarta-tomcat-5.0.16/work/Catalina/localhost/_/org/apache/jsp/menu_jsp
.java:47: cannot resolve symbol
symbol  : class rollbean
location: class org.apache.jsp.menu_jsp
         rollbook = new rollbean();
                        ^
3 errors

org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandle
r.java:127)

org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:3
51)
    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:5
52)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
91)
    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)

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

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

the jsp page is in the /ROOT directory and the class and java files are in
the /ROOT/WEB-INF/classes directory.

i have no idea why this is happening so any help would be appreciated. i
tried editing the servlet produced, but as soon as i saved it i reloaded the
pages and it wrote over the top with the bad version

thanks heaps for the help

sam
sendres2 - 13 Apr 2004 18:59 GMT
Did you ever determine why this was not working? I'm having the exact same
issue, and my code is set up in the same structure.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.