You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Peter Alfors <pe...@irista.com> on 2001/06/19 15:56:54 UTC

Re: apostrophe in an application resource properties file does disappear in the JSP file compiled!!!!!!!!!!!

see mail archive:

http://www.mail-archive.com/struts-user@jakarta.apache.org/msg06172.html

(use two apostrophes)

Pete


Matteo Di Giovinazzo wrote:

> THE ESCAPING \' DOESN'T WORK!!!!
>
> Matteo
>
> >----- Original Message -----
> >From: Mikkel Bruun
> >To: 'struts-user@jakarta.apache.org'
> >Sent: Tuesday, June 19, 2001 3:47 PM
> >Subject: SV: apostrophe in an application resource properties file does
> disappear in the JSP >file compiled!!!!!!!!!!!
> >
> >
> >escape it using \'
> >
> >Mikkel


Re: single quote in the application properties file don't works on Struts like any other java app?

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Sat, 23 Jun 2001, Matteo Di Giovinazzo wrote:

> 
> When I want to insert a single quote, I write in the properties file's
> key " \' " (traditional escaping) to obtain a single quote as output. Indeed
> I obtain that the single quote disappear. Using the '' (double single quote
> escaping) my file don't works with any other java app (a not-Struts app,
> like swin, awt or console...)
> 
> My main question is: this works fine on all other java application, why not
> with Struts? Where is the problem?
> 
> Matteo Di Giovinazzo
> 
> 
> 

Deep down inside org.apache.struts.util.PropertyMessageResources, Struts
is using the load() method from the java.util.Properties class to load the
message resources files.  Therefore, the files should correspond to the
same syntax as any other use of Properties.load() in your applications.

Note that, according to the JDK 1.3 Javadocs, a backslash is the
appropriate escape character for properties files, so a single quote would
be represented as "\'".

Craig McClanahan



single quote in the application properties file don't works on Struts like any other java app?

Posted by Matteo Di Giovinazzo <ma...@infinito.it>.
When I want to insert a single quote, I write in the properties file's
key " \' " (traditional escaping) to obtain a single quote as output. Indeed
I obtain that the single quote disappear. Using the '' (double single quote
escaping) my file don't works with any other java app (a not-Struts app,
like swin, awt or console...)

My main question is: this works fine on all other java application, why not
with Struts? Where is the problem?

Matteo Di Giovinazzo



Re: apostrophe in an application resource properties file does disappear in the JSP file compiled!!!!!!!!!!!

Posted by Dan Miser <dm...@wi.rr.com>.
Using 2 single quotes does indeed work. And yelling about it doesn't really
help. Can you debug the problem at all to figure out why 2 quotes isn't
working for you?
--
Dan Miser
http://www.distribucon.com

----- Original Message -----
From: "Matteo Di Giovinazzo" <ma...@infinito.it>
To: <st...@jakarta.apache.org>
Sent: Tuesday, June 19, 2001 12:36 PM
Subject: Re: apostrophe in an application resource properties file does
disappear in the JSP file compiled!!!!!!!!!!!


> THIS ESCAPING DOESN'T WORK TOO!!!!!!!!!!!!!!!!!!!!!!!!!!



Re: apostrophe in an application resource properties file does disappear in the JSP file compiled!!!!!!!!!!!

Posted by Matteo Di Giovinazzo <ma...@infinito.it>.
THIS ESCAPING DOESN'T WORK TOO!!!!!!!!!!!!!!!!!!!!!!!!!!

>----- Original Message -----
>From: Peter Alfors
>To: struts-user@jakarta.apache.org
>Sent: Tuesday, June 19, 2001 3:56 PM
>Subject: Re: apostrophe in an application resource properties file does
disappear in the JSP >file compiled!!!!!!!!!!!
>
>
>see mail archive:
>
>http://www.mail-archive.com/struts-user@jakarta.apache.org/msg06172.html
>
>(use two apostrophes)

>Pete