aspose file tools*
The moose likes JSF and the fly likes closing tag > as value? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "closing tag > as value?" Watch "closing tag > as value?" New topic
Author

closing tag > as value?

nimo frey
Ranch Hand

Joined: Jun 28, 2008
Posts: 580
How can I set the value ">=" to my Label?



does not work as > is recogniced as a closing tag.

This does also not work:

arulk pillai
Author
Ranch Hand

Joined: May 31, 2007
Posts: 3216
Have a look here http://www.degraeve.com/reference/specialcharacters.php


< or <


Java Interview Questions and Answers Blog | Amazon.com profile | Java Interview Books
nimo frey
Ranch Hand

Joined: Jun 28, 2008
Posts: 580
thanks !
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15641
    
  15

Or, to bring it inline, JSF is an XML form, so it obeys XML rules. There are 5 characters that XML parsers are sensitive to, and which may require escaping (entity specification):

< &lt;
> &gt;
" &quot;
' &apos;
& &amp;

Note that the ";" at the end is required - I've seen some sloppy sites that left them off because apparently some browsers weren't diligent about proper form, but that meant that unless you were running the proper browser, the site looked like an amateur job.

I mentioned that JSF is XML form. You can use JSF in an HTML context, where the rules may be more lax, but I personally recommend using an actual XML context such as xhtml. That way you have the benefit of tools that will do that little extra bit of validation at source time. Also it's easier for automated tools to work with XML formats, since they don't have the unpredictability of raw HTML. For example, unbalanced tags such as <br>.


Customer surveys are for companies who didn't pay proper attention to begin with.
nimo frey
Ranch Hand

Joined: Jun 28, 2008
Posts: 580
thank you!!
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: closing tag > as value?
 
Similar Threads
Struts2 Iteator Tag with object in object
how to call javascript function in the previous html file
Applets, jsp:plugin tag and Firefox 3.6
Display a Popup instead of an error-message at conversionError
EL-rendering of if-then-else