File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes regarding the jsp data store Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "regarding the jsp data store" Watch "regarding the jsp data store" New topic
Author

regarding the jsp data store

A Babu
Ranch Hand

Joined: Nov 28, 2005
Posts: 114
Hi friends,
I want help from you.First let me explain the scenario.

I developed on jsp in that i created one form having the
two variables like EmpNO:----------- and EmpName:----------.

now once form displayed on the browser when jsp is running and i submit the emp name and no those are set and get by the javaben help.That is i wrote one javabean to store data.

now my query starts,
already i entered emp name and no.i can retrieve with the help of bean get method.now again i entered the another name and no for emp.

now my question is i want to display the both the names and no's entered by me.I dont want to use database right now.i want store form data in collection object and i want to retrieve all the data.

please give code lines also
if possible.

cheers,
babu.


Thanks,
www.Admakr.in
Adeel Ansari
Ranch Hand

Joined: Aug 15, 2004
Posts: 2874
Okie. Please store the data in any collection you want, ArrayList prefered. Then place your collection in user's session object. You would definitely able to get all the data you entered previously from that session object. Remember, if session expires by any means, all will be lost.
A Babu
Ranch Hand

Joined: Nov 28, 2005
Posts: 114
can you give sample code.
Babar Qadri
Ranch Hand

Joined: Oct 12, 2004
Posts: 51
Originally posted by babu amara:
can you give sample code.


If you are using Tomcat, you would surely find an example of session servlet in your TOMCAT_HOME/webapps/servlets-examples/WEB_INF/classes/SessionExample.java


babar
A Babu
Ranch Hand

Joined: Nov 28, 2005
Posts: 114
cheers,
babu.
[ November 30, 2005: Message edited by: babu amara ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: regarding the jsp data store
 
Similar Threads
adding data dynamically
Query
Servlet - EJB - JSP
Form in Jsp
Storing arraylist of hashmaps in session