• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

why we need use "jsp:getProperty ...."

 
Win Yu
Ranch Hand
Posts: 224
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My question is, we can use <%= beanName.getPropertyvalue %> to get property's value in JSP. Why we need use <jsp:getProperty name="XXX" property="propertyname"/>.
 
Win Yu
Ranch Hand
Posts: 224
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I can also use <% BeanName.setPropertyName("PropertyValue");%> to set property.
 
Carl Trusiak
Sheriff
Posts: 3341
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One of the goals of JSP is to seperate the functions of creating Java Classes and working with java syntax from designers who develop HTML without any knowledge of Java or java syntax. HTML designers would understand using a new html-like tag far easier than using scripted Java Code on a page.
 
Win Yu
Ranch Hand
Posts: 224
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic