| Author |
JSP_getProperty
|
renu richard
Ranch Hand
Joined: Oct 06, 2008
Posts: 116
|
|
Hi, I am using a servlet which sets the property for the person atrribute. Then i am trying to read that property and display it in JSP. But that's not getting populated correctly. Instead i am getting null values. Atrribute : Person Property : username, password ------------------------------------------------------ servlet which sets the value for the above properties : ------------------------------------------------------ --------------------------------------------- JSP page which is reading those attributes : --------------------------------------------- Can someone please help me.....Many Thanks...
|
Cheers,
Richard
|
 |
Chandra Bhatt
Ranch Hand
Joined: Feb 28, 2007
Posts: 1707
|
|
|
No problem in code as I see, and it works fine for me.
|
cmbhatt
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56191
|
|
Are you sure that the servlet is getting invoked prior to the JSP? Also, why aren't you using the EL rather than getProperty?
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
renu richard
Ranch Hand
Joined: Oct 06, 2008
Posts: 116
|
|
Hi Bibeault, Yes. You are right. As you said,the problem was i was not invoking that servlet, instead i was invoking the JSP only. Now i am learing JSP's and servlet using Head First. I was following that book. And i tried all the ways explained in that book. I tried using EL also. It is also working. Thanks for your help!!
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56191
|
|
|
My pleasure. Sounds like you are making good progress.
|
 |
 |
|
|
subject: JSP_getProperty
|
|
|