hi all !

In my web application for bus ticket booking i want to use session. Here i m describing the flow of my application briefly------------

(1) My first jsp page is index.jsp and after submiting this page it will go to servlet SenndBusInfo.java for processing. Here i am creating session (on servlet page), and after creating session i am setting attributes to the session.
(2)After sSendBusInfo servlet it will go to the jsp page displayBuses.jsp.
(3) After that there are so many jsp's and servlet related to ticket booking.
(4) This process of will continue till booking confirmation where i'll destroy the session.

Now my question is------------

How can i set Attributes to the same session created on the first servlet page through all the servlets and jsps

please reply. its urgent

Recommended Answers

All 2 Replies

The session is one. That is what it does. If you had set the attributes to the request then you would be able to access them only from one page to the other. But if you put them to the session, you can access them from any page, no matter how many times you submit or redirect.
There is only one session.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.