session in jsp

after including session.putValue("text1",text); (or) session.setAttribute("text1",text);in jsp page, page cannot be displayed is coming..y it is coming like that?
[198 byte] By [Srivallia] at [2007-10-3 0:49:13]
# 1
there may be some errors on you code..
jgalacambraa at 2007-7-14 17:44:16 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
if i take that line alone from code, it is working fine
Srivallia at 2007-7-14 17:44:16 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3
which part?
jgalacambraa at 2007-7-14 17:44:16 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 4
what type of error comes? what does it say?
Bhavika at 2007-7-14 17:44:16 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 5

if i take

session.putValue("text1",text)

out from code, it is not giving any error. if i include that line in jsp,

'page cannot be displayed' is coming.

Actually, what i need is

assume 3 jsp files are there.

in first jsp, i will select one value from combo box.

i need that value in jsp file which is not directly related to first jsp. So, i want to store that value in session and i want to use it.

How to solve this problem?

Srivallia at 2007-7-14 17:44:16 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 6
putValue() methos is already depricated and replaced by setAttribute() method.. you are actually setting the value of text to a session varaible text1 twice.. so you don't need putValue() method
jgalacambraa at 2007-7-14 17:44:16 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 7
i have tried the same with setAttribute() also. That is also not working
Srivallia at 2007-7-14 17:44:16 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 8
do you have session.invalidate() in that page?
jgalacambraa at 2007-7-14 17:44:16 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 9
no.
Srivallia at 2007-7-14 17:44:16 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 10
sory but codes might help
jgalacambraa at 2007-7-14 17:44:16 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 11
Check if cookeies are enabled
harisharavinda at 2007-7-14 17:44:16 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 12

whether the is session created before you access this jsp or its created in this page?

If this is the jsp page accessed in ur application without session being created earlier and the "session" attribute in page directive is "false" then u might get the exception. Do u know what is the exact exception thrown?

karka at 2007-7-14 17:44:16 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...