• Post Reply Bookmark Topic Watch Topic
  • New Topic

<jsp:useBean> conditional body  RSS feed

 
baris deniz
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
I've written a class, a servlet and JSP. But when I am writing in JSP



In the output, I see "Denise". But as there is an already existing attribute, <jsp:setProperty> should not function and I should see Chuck at the output.

My code is below:

--------------


--------------

 
Balu Sadhasivam
Ranch Hand
Posts: 874
Android Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Set the Person useBean to scope of 'application ' as it default s to 'page'


BTW, Welcome to Javaranch
 
baris deniz
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've solved the problem.
my servlet wasn't initialized before I use the JSP; therefore there were no attribute created when I reached myJSP.
Thank you.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!