| Forums.Sureshkumar.net : A Perfect Place to Share Knowledge Blogs Games Magazines |
|
|||||||
| Other Queries Any Info about walk-ins , Off Campus and all fresher’s related topic is discussed in this section. A small Info posted can show a ray of hope 4 others. |
![]() |
|
|
LinkBack | Thread Tools | Rate Thread | Display Modes |
|
|
#1 (permalink) |
|
Senior Member
Join Date: Apr 2007
Location: chennai
Age: 24
Posts: 231
Thanks: 82 Thanked 11 Times in 9 Posts Thanks: 82
Thanked 11 Times in 9 Posts
Rep Power: 5
|
to embedd javascript in jsp scriplets
hi friends,
In j2ee applicatiom,how to embedd javascript tags inside the jsp scriplets and what is the real purpose of session,cookies and in jsp where we want to use. Please quote with me examples. -Nandhini ![]() Last edited by nandhini_7; 30-04-07 at 02:39 PM. |
|
|
|
|
|
#2 (permalink) |
|
Super Moderator
Join Date: Feb 2006
Location: Hyderabad
Posts: 2,355
Thanks: 117 Thanked 241 Times in 198 Posts Thanks: 117
Thanked 241 Times in 198 Posts
Blog Entries: 4
Rep Power: 51
|
Re: to embedd javascript in jsp scriplets
Nandini,
This is a classic example to explain this... Let us assume you are working on a shopping cart project. So you display few products in a page and ask use what ever he like. Once (s)he selects all the products, we have to give him bill for payment after which we will ship the products to his/her address. But HTTP is a stateless protocol and we don't have any direct mechanism to keep track what items user has choosen in different pages and how much quantity of each product he want. So we go for sessions. When ever use chooses any products, that information is stored in server in session variables and when the user asks for bill, we will fetch all data from those session variables and disply them in bill page. For cookies, common example is passwords. If you take yahoo as example or this forum itself for that matter, you will see a check box saying "remember me in this computer". That is actually a cookie. As soon as you enter user id and password and select the checkbox, a cookie is created with those values in your local computer and from next time, website will check if that cookie is present and valid or not. If the cookie and present and valid, web site won't ask you again for user name and password. It will take those values by default and carries ahead. Thats why if you are using internet cafe for surfing internet, people don't recommend you to use that options. Hope you are clear with examples.
__________________
Give 1 cup rice to a hungry Indian just by a mouse click. No money, no form filling, no hassle... Click here for the donation. |
|
|
|
| The Following User Says Thank You to sk_kireeti For This Useful Post: |
t_mohan (30-04-07)
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|