Thx Lukasz and Nate.

I created MypropertyTag.java extending PropertyTag.java with my own method 
setEscapeHtml but it was not called when the attribute escateHTML was not set 
in jsp.
So I decided to go with Nate and to add the attribute in jsp.
Yet, MypropertyTag helped me with another problem: to call locale-specific 
getter-methods of my bean.
(This was done in my legacy Struts1 application by extending 
org.apache.struts.taglib.bean.WriteTag; I had to replace that.)

Best regards
Ute
 


> Gesendet: Montag, 24. März 2025 um 10:23
> Von: "Nate Kerkhofs" <nate.kerkh...@ikan.be>
> An: "Struts Users Mailing List" <user@struts.apache.org>
> Betreff: RE: Struts7: looking for constant to set escapeHtml=false
>
> <html><head></head><body>Hi Łukasz,
> 
> I might be mistaken, but a custom tag using s:component would probably lead 
> to having to replace most if not all affected s:property tags in the project.
> 
> At that point, you might as well add the escapeHtml attribute to every 
> s:property, because just replacing the s:property tags is probably going to 
> be roughly the same amount as work as adding this attribute, and that's not 
> accounting for writing the custom component.
> 
> I'm not familiar with the internal logic of Struts, but could Ute maybe 
> create a custom struts-tags.tld file which defines a custom property tag 
> using a NoEscapeHtmlPropertyTag tag-class that sets the escapeHtml property 
> to false by default? It appears that all of the relevant classes are defined 
> as public, so in theory this might work.
> 
> Regards,
> 
> Nate 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to