I'm running windows2000 and JRun 3.0
My servlet:
1) Creates & populates an instance of my class called JournalEntry.
2) puts it into the session,
3) passes control to a JSP page for rendering
Everything works fine, the class is passed to the JSP, and is displayed
properly.
However, when I recompile the servlet, with the JRun server still running,
all subsequent requests throw an exception.
This applies to both existing and new sessions. I must restart the jrun
server for it to work again.
Thanks for any expert assistance!
Supporting info is below...
============
This is the error from the log...
03/20 08:45:00 info (JRun) journal.JournalMenu: init
03/20 08:45:07 info (JRun) jrun__journalentry2ejsp11: init
03/20 08:49:05 info (JRun) journal.JournalMenu: destroy
03/20 08:49:05 info (session) Class change detected - reloading all session
data
03/20 08:49:05 info (session) 3 session(s) persisted
03/20 08:49:05 info (session) Recovering 3 session(s)
03/20 08:49:05 info (JRun) journal.JournalMenu: init
03/20 08:49:07 error (JRun) Couldnt pass to journalentry.jsp
[java.lang.ClassCastException: journal.JournalEntry]
java.lang.ClassCastException: journal.JournalEntry
at jrun__journalentry2ejsp11._jspService(jrun__journalentry2ejsp11.java:39)
at allaire.jrun.jsp.HttpJSPServlet.service(../jsp/HttpJSPServlet.java:40)
at allaire.jrun.servlet.JRunSE.service(../servlet/JRunSE.java:1013)
at allaire.jrun.servlet.JRunSE.runServlet(../servlet/JRunSE.java:925)
at
allaire.jrun.servlet.JRunNamedDispatcher.forward(../servlet/JRunNamedDispatc
her.java:34)
at allaire.jrun.jsp.JSPServlet.service(../jsp/JSPServlet.java:175)
Relevant code snippets below:
============================
Servlet:
JournalEntry je = getJournalEntry(requestedId);
HttpSession session = req.getSession();
session.setAttribute("journalentry", je);
ServletContext sc = this.getServletContext();
RequestDispatcher rd = sc.getRequestDispatcher("/journalentry.jsp");
if (rd != null) {
try {
rd.forward(req,res);
} catch (Exception e) {
sc.log("Couldnt pass to journalentry.jsp", e);
}
}
JSP:
<%
journal.JournalEntry je =
(journal.JournalEntry)session.getAttribute("journalentry");
URL url = je.getUrl();
%>
.....
<TR ALIGN="left" VALIGN=middle">
<TD WIDTH="10%">ID</TD>
<TD><%=je.getId()%></TD>
</TR>
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists