[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
[Home]
ClassCastException
Hi,
I am using GnuJSP 1.0.1 on apache 1.3.12
with jserv 1.1.2 (on Linux).
I tried to use beans in the following way:
<jsp:useBean id="testBean" scope="application"
class="com.b2b.chat.roomBean">
</jsp:useBean>
...
<% out.println( testBean.getRoomName() ); %>
When I use the bean in one jsp page, it works without
any problems. But when I write exactly the same code
in another jsp-page, I get an error:
Exception: java.lang.ClassCastException: com.b2b.chat.roomBean
java.lang.ClassCastException: com.b2b.chat.roomBean
at jsp._chat._test2_2ejsp._jspService(_test2_2ejsp.java:49)
at org.gjt.jsp.HttpJspPageImpl.service(HttpJspPageImpl.java:75)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:310)
at org.gjt.jsp.JspServlet$Page.process(JspServlet.java:991)
at org.gjt.jsp.JspServlet.xservice(JspServlet.java:608)
at org.gjt.jsp.JspServlet.service(JspServlet.java:500)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:310)
at
org.apache.jserv.JServConnection.processRequest(JServConnection.java:314)
at org.apache.jserv.JServConnection.run(JServConnection.java:188)
at java.lang.Thread.run(Thread.java:475)
Is this a bug or am I doing something wrong?
Thanks,
Andy