Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Checking for empty (null) session property

843854Jul 5 2002 — edited Jul 5 2002
I am writing a program that needs to check 2 places for a value. This value will only be in one place or the other. I have a bit of code that automatically places all inputs into its own session property with the name of the input as the property name and the value from the input as the value. Then each time I need an input, all I need to do is look it up in the session object.
Here's the problem I have: If someone comes to the jsp from the main page, an ID is sent to me through a querystring within the address. If, however, they are at another page and want to get to my page, they first have to go through a select box so I know what ID to use. The selection page is set up to go directly to my page where I need to find the ID from the select box. Since I have names of the variable in the querystring and the select box are different, how do I figure out which of the two was sent to me? Since the generic code at the top of my page puts all inputs into the session object, I need to see whether the select box property exists or if the querystring's values exist.

Chris
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 2 2002
Added on Jul 5 2002
1 comment
103 views