New JSP Syntax version 1.1 "session.getValue" is now "session.getAttribute"
take a look at JSP Syntax version 1.1 HTML format: http://java.sun.com/products/jsp/tags/12/syntaxref12.html JSP Syntax version 1.1 PDF format: http://java.sun.com/products/jsp/pdf/card12.pdf -----Original Message----- From: Joey A [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 13, 2001 3:04 PM To: [EMAIL PROTECTED] Subject: session solved... Thanx a billion guys, The problem is solved, FINALLY Its a silly a mistake to mention ;-) Just another quick question: If "session.putValue" is deprecated and now we use "session.setAttribute", any changes with "session.getValue"? Cheers, Joey ----- Original Message ----- From: Eric Fleming To: [EMAIL PROTECTED] Sent: Tuesday, November 13, 2001 11:32 JST Subject: Re: Help in session... Try doing this: <% session.putValue("total_inc", iTotalIncome); session.putValue("total_exp", iTotalExpenses); session.putValue("net_savings", iNetSavings); %> Eric ----- Original Message ----- From: Joey A To: [EMAIL PROTECTED] Sent: Tuesday, November 13, 2001 11:13 am Subject: Help in session... Hi all, I'm having some problems using 'session' in my JSP's. Please let me know if anyone of you could help in this code: From the first page, I'm passing these values to the second page: <INPUT type="Hidden" maxlength="10" name="total_inc" size="10"> <INPUT type="Hidden" maxlength="10" name="total_exp" size="10"> <INPUT type="Hidden" maxlength="10" name="net_savings" size="10"> In second page, I'm trying to assign them to new intergers like: <% int iTotalIncome=Integer.valueOf(request.getParameter("total_inc")).intValue(); int iTotalExpenses=Integer.valueOf(request.getParameter("total_exp")).intValue(); int iNetSavings=Integer.valueOf(request.getParameter("net_savings")).intValue(); %> And then put them in session: <% session.putValue("total_inc", iTotalIncome); session.putValue("total_exp", iTotalExpenses); session.putValue("net_savings", iNetSavings); %> Finally to access them anywhere: <%out.print(session.getValue("total_inc"));%> <%out.print(session.getValue("total_exp"));%> <%out.print(session.getValue("net_savings"));%> I'm getting the followint error: java.lang.NumberFormatException: null at java.lang.Integer.parseInt(Compiled Code) at jrun__trial__cashflow__Jo_result2ejsp1d._jspService(jrun__trial__cashflow__Jo_result2ejsp1d.java:49) at allaire.jrun.jsp.HttpJSPServlet.service(Compiled Code) at allaire.jrun.jsp.JSPServlet.service(Compiled Code) at allaire.jrun.jsp.JSPServlet.service(Compiled Code) at allaire.jrun.servlet.JRunSE.service(Compiled Code) at allaire.jrun.session.JRunSessionService.service(Compiled Code) at allaire.jrun.servlet.JRunSE.runServlet(Compiled Code) at allaire.jrun.servlet.JRunRequestDispatcher.forward(Compiled Code) at allaire.jrun.servlet.JRunSE.service(Compiled Code) at allaire.jrun.servlet.JRunSE.service(Compiled Code) at allaire.jrun.servlet.JvmContext.dispatch(Compiled Code) at allaire.jrun.jrpp.ProxyEndpoint.run(Compiled Code) at allaire.jrun.ThreadPool.run(Compiled Code) at allaire.jrun.WorkerThread.run(Compiled Code) Can anyone point out the error? Thanx, Joey =========================================================================== To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
