Hello all,

I 'm getting the error ClassCast exception. I have a login jsp that calls a bean
which sets a connection to a database. Then I forward to another page which usese
that
connection and executes a query to a database. I put the connection in a session
object

session.putValue("myConnection", myConnection..getConnection());

After I forward to the next jsp I reference it by

Connection con = (Connection)session.getValue("myConnection");
This works fine.
However, I am then forwording to a new page that also uses this connection.
Again I use the same reference call.
This is when I get the Class cast exception. As soon as I hit the submit button
on the form. My question is, Do I have to put the connecion back into the session
object before I forward to the next page?
So in my 2nd jsp page do I put
session.putValue("myConnection",myConnection.getConnection()); again?
I tried this but it is not working.
Does anyone have a clue? I'd really appreciate it. I've already picked up
a lot of valuable information from everyone.

Thanks!

Sue


>

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html

Reply via email to