The Artima Developer Community
Sponsored Link

Java Buzz Forum
Saving Data in a Servlet

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Goldy Lukka

Posts: 1008
Nickname: xyling
Registered: Jan, 2004

Goldy Lukka is a Java Developer and an Entrepreneur. He is Founder of xyling.com.
Saving Data in a Servlet Posted: Nov 10, 2004 2:53 AM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Goldy Lukka.
Original Post: Saving Data in a Servlet
Feed Title: Xyling Java Blogs
Feed URL: http://www.javablogs.xyling.com/thisWeek.rss
Feed Description: Your one stop source for Java Related Resources.
Latest Java Buzz Posts
Latest Java Buzz Posts by Goldy Lukka
Latest Posts From Xyling Java Blogs

Advertisement
Many times you want to save some data in a servlet temporarily or till the application lasts. One of the reason could be to collect and save some data that needs to be flushed to the user after some processing is done or you want to send a large data to another servlet/jsp in your web application.

This code sample from java almanac shows you ways to save data in a servlet. Based on the scope of data to be saved, the following mechanisms could be used.

Page Scope -> Local Variable
Request Scope -> Request.setAttribute
Session scope -> Session.setAttribute
Application scope -> getServletContext().setAttribute()

Refer title of this post to review the code sample.

[Resource-Type: Code Sample; Category: Java/J2EE/Servlet; XRating: 3.5]

Read: Saving Data in a Servlet

Topic: Execute this: managing configuration in programming languages Previous Topic   Next Topic Topic: How to rip videos from the iTunes music store

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use