• Post Reply Bookmark Topic Watch Topic
  • New Topic

<jsp:getProperty> returns nothing  RSS feed

 
Paul Kemp
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying to fathom out <jsp:useBean> (newbie question).

I have a jsp called testing.jsp



which displays "hello" and a submit button.

I press submit, and the form is posted to myTest.jsp, which outputs nothing




I thought the 'hello' would appear on the 'posted to' page, seeing as the scope is session, but I've obviously misunderstood how this works.

Thanks
 
Paul Kemp
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I worked it out eventually.

I nested the <jsp:getProperty> tag, which is wrong. It should be

 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65824
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also note that in modern JSP property fetching by the EL is preferable to the standard action.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!