[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index] [Home]

AW: ClassCastException


As I havn't seen this problem before, I would guesss
that there is something wrong in the second page.

Have a look at line 49 in the generated source 
jsp._chat._test2_2ejsp.java 

to see which statement in the jsp caused
the exception.

> -----Ursprüngliche Nachricht-----
> Von: Andy Bosch [mailto:andy.bosch@bytes2business.de]
> Gesendet: Montag, 21. Mai 2001 15:54
> An: gnujsp@gjt.org
> Betreff: 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(JServConnectio
> n.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
> 
>