tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aaron Brashears <g...@gila.org>
Subject Problem accessing beans in beta 3
Date Mon, 09 Apr 2001 05:15:09 GMT
I was building a simple web app which combines jsps with beans. When I
deployed the application (a few pages and one bean), and accessed the
jsp which makes use of the bean, an exception was thrown that jasper
was unable to compile the jsp because it couldn't find the bean class.

At first, I assumed it was all my problem, but after a few failed
attempts to circumvent the problem, I tried out an old application
that I copied, deployed and successfully tested out of a book when I
was working with 4.0 beta 1. The same exception was generated. What's
going on? I found a message in the archives that indicated beans have
to be in a package. Is this a new requirement?

/jsp/beans.jsp accesses LanguageBean
/jsp/WEB-INF/classes/LanguageBean.class exists.

server.xml is configured with the following snippet in 
<Context path="/jsp" docBase="/home/aaron/work/jsp">
</Context>

And the exception is:

A Servlet Exception Has Occurred

org.apache.jasper.JasperException: Unable to compile class for JSP/home/aaron/tmp/jakarta-tomcat-4.0-b3/bin/./../work/localhost/jsp/beans_jsp.java:57:
Class org.apache.jsp.LanguageBean not found.
                LanguageBean languageBean = null;
                ^
/home/aaron/tmp/jakarta-tomcat-4.0-b3/bin/./../work/localhost/jsp/beans_jsp.java:60: Class
org.apache.jsp.LanguageBean not found.
                    languageBean= (LanguageBean)
                                   ^
/home/aaron/tmp/jakarta-tomcat-4.0-b3/bin/./../work/localhost/jsp/beans_jsp.java:65: Class
org.apache.jsp.LanguageBean not found.
                            languageBean = (LanguageBean) java.beans.Beans.instantiate(this.getClass().getClassLoader(),
"LanguageBean");
                                            ^
/home/aaron/tmp/jakarta-tomcat-4.0-b3/bin/./../work/localhost/jsp/beans_jsp.java:93: Class
org.apache.jsp.LanguageBean not found.
                out.print(JspRuntimeLibrary.toString((((LanguageBean)pageContext.findAttribute("languageBean")).getName())));
                                                        ^
/home/aaron/tmp/jakarta-tomcat-4.0-b3/bin/./../work/localhost/jsp/beans_jsp.java:100: Class
org.apache.jsp.LanguageBean not found.
                out.print(JspRuntimeLibrary.toString((((LanguageBean)pageContext.findAttribute("languageBean")).getLanguage())));
                                                        ^
/home/aaron/tmp/jakarta-tomcat-4.0-b3/bin/./../work/localhost/jsp/beans_jsp.java:107: Class
org.apache.jsp.LanguageBean not found.
                out.print(JspRuntimeLibrary.toString((((LanguageBean)pageContext.findAttribute("languageBean")).getLanguageComments())));
                                                        ^
6 errors

	at org.apache.jasper.compiler.Compiler.compile(Compiler.java:277)
	at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:501)
	at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:175)
	at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:187)
	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:357)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:431)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:191)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:255)
	at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:879)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:225)
	at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:879)
	at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2175)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
	at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:446)
	at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:879)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:162)
	at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:879)
	at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:827)
	at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:904)
	at java.lang.Thread.run(Thread.java:484)



Mime
View raw message