Bhuvaneswari Palanivel wrote:

> Hi ,
>
> We are using Session variables (Bean ) in our application. But now our
> client said that we should not use session variables.
>
> what could be alternate way to process the variables and pass it to the next
> jsp page?
>
> And if we are not using bean or something like that, we need to pass around
> 100 variables to the database class for storing.
>
> Please give a solution for this.
>

Well, one option would be to get a new client :-)

More seriously, you can limit the need to pass around large numbers of variables by
following a strategy like this:

* Use a database to store all of the variables per
  user (instead of keeping them as session attributes)

* Create a unique identifier for each user "session" and
  set it as a cookie (or go ahead and use servlet sessions,
  just don't store data in them).

* Use the "session" identifier as part of the unique key
  to access and store the user data.

* On each request, update the user's data in the database
  as appropriate.

* You will need to ensure that the data for expired or
  timed out sessions is cleared out at some point.  If you're
  using a real session (to get the ID) as recommended
  above, you can use an object implementing the
  HttpSessionBindingListener interface to assist.

> Thanks,
>
> Bhuvana
>

Craig McClanahan

===========================================================================
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

Reply via email to