permaculture playing cards
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes jsp:getProperty Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "jsp:getProperty" Watch "jsp:getProperty" New topic


Selva Prasad Rajendran
Ranch Hand

Joined: Sep 07, 2004
Posts: 38
Hi ranchers

Do all these following 3 options mean the same of different.

1. <jsp:getProperty property="streetName" name="id"></jsp:getProperty>

2. <jsp:getProperty name="id" property="streetName"/>

3. <jsp:getProperty property="streetName" name="id"/>

Is that neccessary that jsp:getProperty should be a self closing tag.

scjp 1.4
Daniel Rhoades
Ranch Hand

Joined: Jun 30, 2004
Posts: 186
getProperty must be a legal XML tag (i.e. it must be an empty tag - I think you called it self-closing, or it must have a closing tag) the order of the attributes doesn't matter.

BTW: You can also get these properties using EL:


Drinking more tea is the key...
I agree. Here's the link:
subject: jsp:getProperty
It's not a secret anymore!