HELP!!!!
I'm working on a project where I add a bean (with an error msg) to the session from a servlet like this:
//adding error msg to bean
news.setErrormsg("Your directory has not yet been activated<br>please try again later");
//adding bean to session
req.getSession(true).putValue("news", news);
and then forward to a jsp like this:
//sending to error page
RequestDispatcher rd = req.getRequestDispatcher("/newserror.jsp");
rd.forward(req, resp);
the jsp gets the bean and displays the error like this:
<jsp:useBean id="news" scope="session" class="agcess.beans.newsletter.NewsLetterBean" />
<html>
<head>
<title>ERROR</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF">
<h3><jsp:getProperty name="news" property="errormsg" /><h3>
</body>
</html>
I intermittently get this error: (it goes away sometimes when I restart jrun)
agcess.beans.newsletter.NewsLetterBean
java.lang.ClassCastException: agcess.beans.newsletter.NewsLetterBean
at jrun__entry2ejspa._jspService(jrun__entry2ejspa.java:37)
at allaire.jrun.jsp.HttpJSPServlet.service(HttpJSPServlet.java:40)
at allaire.jrun.servlet.JRunSE.service(JRunSE.java, Compiled
Code)
at allaire.jrun.servlet.JRunSE.runServlet(JRunSE.java, Compiled
Code)
at allaire.jrun.servlet.JRunNamedDispatcher.forward(JRunNamedDispatcher.java,
Compiled Code)
at allaire.jrun.jsp.JSPServlet.service(JSPServlet.java:174)
at allaire.jrun.servlet.JRunSE.service(JRunSE.java, Compiled
Code)
at allaire.jrun.servlet.JRunSE.runServlet(JRunSE.java, Compiled
Code)
at allaire.jrun.servlet.JRunRequestDispatcher.forward(JRunRequestDispatcher.java,
Compiled Code)
at agcess.servlets.newsletter.NewsLetterServlet.sendToPage(NewsLetterServlet.java:197)
at agcess.servlets.newsletter.NewsLetterServlet.doStep1(NewsLetterServlet.java:135)
at agcess.servlets.newsletter.NewsLetterServlet.doPost(NewsLetterServlet.java,
Compiled Code)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:772)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
at allaire.jrun.servlet.JRunSE.service(JRunSE.java, Compiled
Code)
at allaire.jrun.servlet.JRunSE.runServlet(JRunSE.java, Compiled
Code)
at allaire.jrun.servlet.JRunNamedDispatcher.forward(JRunNamedDispatcher.java,
Compiled Code)
at allaire.jrun.servlet.Invoker.service(Invoker.java:84)
at allaire.jrun.servlet.JRunSE.service(JRunSE.java, Compiled
Code)
at allaire.jrun.servlet.JRunSE.runServlet(JRunSE.java, Compiled
Code)
at allaire.jrun.servlet.JRunRequestDispatcher.forward(JRunRequestDispatcher.java,
Compiled Code)
at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1131)
at allaire.jrun.servlet.JvmContext.dispatch(JvmContext.java:330)
at allaire.jrun.http.WebEndpoint.run(WebEndpoint.java:107)
at allaire.jrun.ThreadPool.run(ThreadPool.java, Compiled Code)
at allaire.jrun.WorkerThread.run(WorkerThread.java, Compiled
Code)
Does anyone know what might be causing this and how I might fix it?????
begin:vcard n:Goss;Matt tel;fax:919-657-1501 tel;work:919-657-1432 x-mozilla-html:FALSE url:www.rtci.com org:RTCI;Custom Solutions adr:;;201 Shannon Oaks Circle;Cary;NC;27511;US version:2.1 email;internet:[EMAIL PROTECTED] title:Web Developer fn:Matt end:vcard
