Solved

implicit variables session and application  instead of request

Posted on 2013-01-25
1
366 Views
Last Modified: 2013-02-04
I was reading as follows


If we use the implicit variables session
and application to share objects with included and forwarded pages instead of request

IDs generated  for a search request from one client could affect the result of a search for another client
because they share the value of the attribute Ids in the application scope.

 please advise.
Any links resources, sample code, ideas highly appreciated. Thanks in advance
0
Comment
Question by:gudii9
1 Comment
 
LVL 11

Accepted Solution

by:
SANDY_SK earned 500 total points
ID: 38852361
Any values that you put in the session of one user will not affect the values put in the session of a different user.

However application variables as the name indicates, it is global to the application.

Not very clear what is the kind of data u are trying to store here, but here is an idea assuming that it is just an id that you want to store.
What you could is is store the ids in the application scope as and hashmap with the key as the respective userids and the value as the attribute id

may be can give a better solution if you give a little more info on what you are trying to achieve,
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
The viewer will learn how to implement Singleton Design Pattern in Java.

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question