[opencms-dev] SV: JSP2 issue escaping EL expressions in cms:contentload

Stefan Uldum Grinsted stefan at e-nation.dk
Thu Sep 21 13:32:16 CEST 2006


Thanx, Harald... 

That is basically what I've done already. (Although I just return the
CmsRequestContext.getUri(), which is the same thing). But I don't like
fiddle too much with OpenCms's defaults. It makes it harder to upgrade
later.
And that does work.

I would just like to know if there is any particular reason why rtexprvalue
is disabled by default. It's the same for the page attribute on cms:include,
which has also bothered me a couple of times.

 / Stefan

-----Oprindelig meddelelse-----
Fra: Brabenetz, Harald [mailto:harald.brabenetz at bearingpoint.com] 
Sendt: 21. september 2006 13:18
Til: alex at opencms.org; , "Stefan Uldum Grinsted
Cc: opencms-dev at opencms.org
Emne: JSP2 issue escaping EL expressions in cms:contentload

Maybe you can store a OpenCmsObject into the Request (or the whole
ApplicationContext):

request.setAttribute("opencms",
	new Object(){
		public String getUri(){
			return "${opencms.uri}";
		}
	});

You also must enable RegularExpression parsing
(<rtexprvalue>true</rtexprvalue>) in opencms.tld

So the regularExpression ${opencms.uri} returns the String value
"${opencms.uri}", and the other parts should works fine.

It's only a Idea, I haven't tested it....

Kind Regards,
Harald


Message: 16
Date: Wed, 20 Sep 2006 17:37:51 +0200
From: "Alexander Kandzior" <alex at opencms.org>
Subject: RE: [opencms-dev] JSP2 issue escaping EL expressions in
	cms:contentload
To: "'The OpenCms mailing list'" <opencms-dev at opencms.org>
Message-ID: <005701c6dcca$bc73ad80$d700a8c0 at PLAGUEIS>
Content-Type: text/plain; charset="us-ascii"

Stefan,
 
I do not have an immediate solution to the issue now, but for future
OpenCms
releases there will be an alternative form of OpenCms macros to avoid
the
confilct with the JSP EL. 
 
Currently, the idea is to allow the follwoing alternate macro syntax:
%(VALUE)

as opposed to the current 

${VALUE}

The old syntax will still work, so the new one will only be an
alternative.

I am open to suggenstions regarding the alternate macro form. I want to
make
sure that we do not conflict with other macro languages.

Kind Regards,
Alex.

-------------------
Alexander Kandzior
                                                              
Alkacon Software GmbH  - The OpenCms Experts                 
 <http://www.alkacon.com/> http://www.alkacon.com -
<http://www.opencms.org/> http://www.opencms.org 
****************************************************************************
***********************
The information in this email is confidential and may be legally privileged
Access to this email by anyone other than the intended addressee is
unauthorized. If you are not the intended recipient of this message, any
review, disclosure, copying, distribution, retention, or any action taken or
omitted to be taken in reliance on it is prohibited and may be unlawful. If
you are not the intended recipient, please reply to or forward a copy of
this message to the sender and delete the message, any attachments, and any
copies thereof from your system.
****************************************************************************
***********************




More information about the opencms-dev mailing list