Forums.Sureshkumar.net : A Perfect Place to Share Knowledge         Blogs     Games    Magazines    

"Sharing knowledge does not lessen your store, often it gets you more. Sharing plays a key role in relationships and bonding, happens in small steps and is assisted through community membership."

Go Back   SURESHKUMAR.NET FORUMS > FRESH JOB SEEKERS > Fresher Resources > Other Queries
Register FAQ Members List Calendar Games Blogs Search Today's Posts Mark Forums Read

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.

   

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
Old 30-04-07, 01:53 PM   #1 (permalink)
Senior Member
 
nandhini_7's Avatar
 
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 nandhini_7 is on a distinguished road nandhini_7 is on a distinguished road
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.
nandhini_7 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 30-04-07, 06:11 PM   #2 (permalink)
Super Moderator
 
sk_kireeti's Avatar
 
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 sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute
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.
sk_kireeti is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
The Following User Says Thank You to sk_kireeti For This Useful Post:
t_mohan (30-04-07)
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT +6.5. The time now is 03:46 PM.





Search Engine Optimization by vBSEO 3.1.0