Nguyen Van Tuan wrote:
> I think you can't do that because session in JSP
> use cookie to store data and the max size of cookie
> is about 4KB so you can't store so much data in it
>
This is not a correct understanding of how sessions work.
The only thing that is actually stored in a cookie is the session identifier itself
(which is a String whose value is typically less than 100 characters). All of the
session attributes are stored in the server's memory, and it is entirely legal to
store objects of any Java type in this way.
A more likely cause if this problem is having an old version of the servlet classes
on your classpath.
>
> Good luck
Craig McClanahan
>
> Ginni wrote:
>
> > hi everybody!
> >
> > i m trying to store an ArrayList in session ..here is the code....
> >
> > <%@ page language="java" import="java.util.*"%>
> > <%@ page errorPage="errorpage.jsp" %>
> >
> > <%
> > String [] values;
> > ArrayList al = new ArrayList();
> > values = request.getParameterValues("product");
> >
> > for (int i=0;i<values.length;i++){
> > al.add(values[i]);
> > }
> > session.setAttribute ("SelectedProducts", al);
> > %>
> >
> > it gives me the following error....
> >
> > Method setAttribute(java.lang.String, java.util.ArrayList) not found in
> > interface javax.servlet.http.HttpSession.
> >
> > what do i do?
> >
> > thanks for your time,
> >
> > :-)
> > Have a great Day!
> > -Ginni
> >
> > ===========================================================================
> > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
> > 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