• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSP_getProperty

 
renu richard
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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...
 
Chandra Bhatt
Ranch Hand
Posts: 1710
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No problem in code as I see, and it works fine for me.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65118
91
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you sure that the servlet is getting invoked prior to the JSP?

Also, why aren't you using the EL rather than getProperty?
 
renu richard
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 65118
91
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My pleasure. Sounds like you are making good progress.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic