• Post Reply Bookmark Topic Watch Topic
  • New Topic

what is the best way to set/get data ?

 
Alvin chew
Ranch Hand
Posts: 834
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
good day, everyone ! they have 2 ways to set/get data in jsp,

one is using setter/getter method by <jsp:usebean>,

another way is about using scriptlet and common object initialisation like <% myobject m = new myobject()%>,

my question is, what is the best way to set/get data ? can someone please stated out the limitation of both cases ?

and let assume i make a page which allow user select database's table and display the specify table content in table form as well in jsp page

thank you for your time
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<jsp:setProperty>, <jsp:getProperty> is better instead.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!