aspose file tools
The moose likes JSF and the fly likes html tags in property file Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » JSF
Reply Bookmark "html tags in property file" Watch "html tags in property file" New topic
Author

html tags in property file

Rajeev Ravindran
Ranch Hand

Joined: Aug 27, 2002
Posts: 455
Hi,
Could someone tell me how to set HTML tags in the property file.
In my errors.properties i have this value

required.field=<b> Required ! <b>

I wanted to display "Required ! " in bold, but im getting the output as "<b> Required ! <b>".

Thanks,
Rajeev.
Jeff Albertson
Ranch Hand

Joined: Sep 16, 2005
Posts: 1780
The property file is fine as written, but how are you outputing the string?
Several tags have the attribute escape to indicate whether or not there should be some escape filtering...


There is no emoticon for what I am feeling!
Sergey Smirnov
Ranch Hand

Joined: May 29, 2003
Posts: 167
just use escape="false" for your h: outputText. I.e, for example:



--
Sergey : http://jsfTutorials.net
[ December 29, 2005: Message edited by: Sergey Smirnov ]
Rajeev Ravindran
Ranch Hand

Joined: Aug 27, 2002
Posts: 455
Thanks for the replies, I think i should have been more specific !

here is my propery file entry

javax.faces.component.UIInput.REQUIRED= <b> * </b>
javax.faces.component.UIInput.REQUIRED_detail= is a required field.

I'm making use of faces component to read from the property file.

what i have in my jsp is


is there any "escape" property for h:message ?

Im pretty new to JSF. I'm not sure if i make any sense !

Thanks again,
Rajeev.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: html tags in property file
 
Similar Threads
Display Check Boxes & Dropdowns in Struts with search results
Struts validation not working
irritating behaviour of Tomcat 5
Validator Issue with multiply beans
Validation framework not working for login screen