A couple of things: 1) The session class has no such method called 'setValue(...)'; 2) If your JSP engine is using the Servlet Api 2.2 spec, your session object can use the methods 'setAttribute(...) and getAttribute(...) methods. If your JSP engine is using an earlier Servlet API spec, then your session object must use the methods 'putValue(...) and getValue(...)' methods instead. So, which methods to use depends on what version of the Servlet API spec your JSP engine has implemented. Also, both the methods 'getAttribute() and getValue()' return the type Object, so you'll have to do a cast to convert the object back to what it was originally. Here's is Sun's Servlet API 2.2 Javadoc on the session class: http://www.java.sun.com/products/servlet/2.2/javadoc/javax/servlet/http/Http Session.html It has a list of all the constructors, methods, list of what has been deprecated, etc. I strongly recommend that any JSP programmer should keep a link to Sun's javadocs on the JDK, Servlets, JSP and any other related Java stuff because it's been my observation that a quite a few of the questions asked on this list (and a lot of other lists and forums that I see) can be answered by going to Sun's website. Of course, there are other good sites that can answer these questions too (jguru,jspinsider, etc.). -----Original Message----- From: Richie Bab A. Boyboy [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 23, 2001 8:08 AM To: [EMAIL PROTECTED] Subject: Re: JSP Thanks for the response. But I it didn't solve the problem. I was able to invoke the jsp and I got the result I wanted. But the thing is, if I include the the scriplet <% session.setValue("empH", "Richie"); %> or <% session.setAttribute("empH", "Richie"); %> Am I missing anything? Do I still have to include some tag so that I can execute the session object properly? > > > > Hi people! > > Could anyone send me a jsp code using session object? > > I have a problem using the session.setAttribute() method. > > > > > =========================================================================== > > 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://java.sun.com/products/jsp/faq.html > > http://www.esperanto.org.nz/jsp/jspfaq.html > > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets > > > > =========================================================================== > 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://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.html > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets =========================================================================== 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://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets This email message is for the sole use of the intended recipient(s) and may contain proprietary and confidential information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message. Thank you =========================================================================== 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://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
