File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Session attributes

 
Daniel Rajan
Greenhorn
Posts: 8
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can we check whether the user input obtained via a dropdown in a JSP page matches any of the elements of the cookie array?
[ May 23, 2008: Message edited by: Daniel Rajan ]
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What cookie array?

Can you explain, in a little more detail, exactly what you're trying to do?
 
Daniel Rajan
Greenhorn
Posts: 8
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to compare the input recieved from the dropdown with a set of values stored in a list.Can you suggest a way to do that using cookie or sessions?
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Where is this list coming from?
Where are you storing it.

When you say list, do you mean something that implements the java.util.List interface?

What do cookies and/or session have to do with this?
 
Daniel Rajan
Greenhorn
Posts: 8
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using the list to store and diplay a set of values in the dropdown box,so that the user can select one value from amongst them.
Now i need to make sure that user is not able to select any of these values twice.To do so,I am trying to store the user input in a session attribute & compare this value with the set of values already present in the list.How do I go about this?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64178
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How would a user select more than one value from a dropdown?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64178
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
P.S. Since this really has nothing to do with cookies, you might want to go back and edit your subject.
 
Daniel Rajan
Greenhorn
Posts: 8
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What I meant was that the user shouldn't be allowed to choose the same value in the dropdown more than once.If he does,he should be directed to a JSP page,which displays a corresponding message.
[ May 23, 2008: Message edited by: Daniel Rajan ]
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic