You could create a filter and put it in the chain that would display
that page. You would do something like:
- get a handle to the original response writer
- extend HttpServletResponseWrapper to capture the output
- pass in an instance of above to chain.doFilter()
- parse the response, looking for (TM) and replace it.
 + This could be as simple for prototyping as String out =
wrapper.toString().replaceAll( /*unicode for TM*/"(TM)", "™");
- write the string above to the original response writer

There are more efficient ways to change the (TM), but the above will
get the job done, at least as a proof-of-concept. If you can limit the
filter to only a few pages in the app and the page generated is not
"big", you may get away with the above code.

-ed

On 10/11/06, Van Nguyen <[EMAIL PROTECTED]> wrote:
OK... so I've been playing around with this for the pass day.

1. I don't want to store the trademark symbol as &trade; in my lucene index.
2. I could write a method to detect the TM symbol and then encode it to &trade; and then 
use the filter="false" in the bean:write tag.

But is there a more elegant way about this?

-----Original Message-----
From: Van Nguyen
Sent: Tuesday, October 10, 2006 11:59 AM
To: Struts Users Mailing List
Subject: RE: render trademark symbol

Ok... setting the filter to false works.

Thanks!
-----Original Message-----
From: Ed Griebel [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 10, 2006 11:26 AM
To: Struts Users Mailing List
Subject: Re: render trademark symbol

Sorry, escapeXml is for <c:out />, Nuawn is right, filter="false" is
what you are looking for.

On 10/10/06, Nuwan Chandrasoma <[EMAIL PROTECTED]> wrote:
> hi,
>
> set the filter attribute of bean:write tag to false and try
>
>
> ----- Original Message -----
> From: "Van Nguyen" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <user@struts.apache.org>
> Sent: Tuesday, October 10, 2006 6:14 PM
> Subject: RE: render trademark symbol
>
>
> Is escapeXml an attribute for the bean:write tag?
>
> I do not see that in the Struts 1.2.9 API.
>
> -----Original Message-----
> From: Ed Griebel [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, October 10, 2006 11:05 AM
> To: Struts Users Mailing List
> Subject: Re: render trademark symbol
>
> bean:write may be escaping the &amp; so maybe you could try adding
> escapeXml="false" inside the bean:write tag.
>
> -ed
>
> On 10/10/06, Van Nguyen <[EMAIL PROTECTED]> wrote:
> > That displays:
> > (r)
> >
> > We need it to display:
> > (tm)
> >
> >
> > -----Original Message-----
> > From: Martin Gainty [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, October 10, 2006 10:33 AM
> > To: Struts Users Mailing List
> > Subject: Re: render trademark symbol
> >
> > use
> >
> > &#174;
> >
> > HTH
> > M-
> > This e-mail communication and any attachments may contain confidential and
> > privileged information for the use of the
> > designated recipients named above. If you are not the intended recipient,
> > you are hereby notified that you have received
> > this communication in error and that any review, disclosure,
> > dissemination, distribution or copying of it or its
> > contents
> >   ----- Original Message -----
> >   From: Van Nguyen
> >   To: user@struts.apache.org
> >   Sent: Tuesday, October 10, 2006 1:13 PM
> >   Subject: render trademark symbol
> >
> >
> >   Hi,
> >
> >
> >
> >   I'm using struts 1.2.9 and am running into a problem rendering the
> > trademark symbol using the bean taglib.
> >
> >
> >
> >   I have this string stored in my lucene index as:
> >
> >
> >
> >   W.RoseT Convex Jointer
> >
> >
> >
> >   It stores it in my bean as such. but when I use the <bean:write> tag, it
> > displays it as:
> >
> >
> >
> >                     W.Rose? Convex Jointer
> >
> >
> >
> >
> >
> >
> >
> >
> >   I added some breakpoints in the WriteTag class inside the struts
> > library, and I see that it comes in as
> >
> >
> >
> >   W.RoseT Convex Jointer
> >
> >
> >
> >   And it is being returned as the same string.
> >
> >
> >
> >   Is there anything else that needs to be done to render the Trademark
> > symbol as T?
> >
> >
> >
> >   I've read online that HTML needs it to be &trade; to render correctly.
> > But I've tried changing the text in the bean to:
> >
> >
> >
> >   W.Rose&trade; Convex Jointer
> >
> >
> >
> >   But that did not work either. the <bean:write> tag just displays it as
> > W.Rose&trade; Convex Jointer
> >
> >
> >
> >   Any suggestions?
> >
> >
> >
> >
> >
> >
> >
> > 
------------------------------------------------------------------------------
> >
> >
> >
> >
> >   United Rentals
> >   Consider it done.â"¢
> >   800-UR-RENTS
> >   unitedrentals.com
> >
> >
> >
> >
> > 
------------------------------------------------------------------------------
> >
> >
> >   ---------------------------------------------------------------------
> >   To unsubscribe, e-mail: [EMAIL PROTECTED]
> >   For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> > United Rentals
> > Consider it done.(tm)
> > 800-UR-RENTS
> > unitedrentals.com
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> 
--------------------------------------------------------------------------------
>
>
>
>
> United Rentals
> Consider it done.T
> 800-UR-RENTS
> unitedrentals.com
>
>
>
>
> 
--------------------------------------------------------------------------------
>
>
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



United Rentals
Consider it done.™
800-UR-RENTS
unitedrentals.com



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to