[opencms-dev] EL and OpenCMS macros
Jonathan Woods
jonathan.woods at scintillance.com
Wed Nov 30 19:29:02 CET 2005
Scott -
Someone else will probably suggest something much cleverer, but in the last
resort you could always slip into scriplet land, and use full-blown Java
rather than all this tag stuff. If it isn't clear from the Javadoc what the
Java equivalent is, you could revert to 6 alpha 3 and take a look at the
Java source generated, if it's retained.
Jon
-----Original Message-----
From: opencms-dev-bounces at opencms.org
[mailto:opencms-dev-bounces at opencms.org] On Behalf Of Scott Shealy
Sent: 30 November 2005 17:36
To: opencms-dev at opencms.org
Subject: [opencms-dev] EL and OpenCMS macros
All,
I am having a problem that I hope somebody can help with. I currently have
a client who has a very large site that is developed and running on
6 alpha 3. We are trying to migrate them to 6.03 / 6.02. But I am having a
problem with their xml content pages and the interaction with
jsp2.0/jstl1.1 and the macroresolver in xmlcontent.
Basically I have a jsp that is trying to render xmlcontent and it has the
following fragment in it
<%@ page language="java" session="true"%> <%@ taglib prefix="cms"
uri="http://www.opencms.org/taglib/cms" %> <%@ taglib prefix="gto"
uri="/WEB-INF/customtaglib.tld" %> <cms:contentload collector="singleFile"
param="${opencms.uri}"
editable="true">
I am using 6.02 in tomcat 5.0.28 and I have changed the web.xml back to the
2.4 spec so it I can use jsp2.0 and jstl 1.1.
The problem with the above fragment is that the jsp compiler interprets the
opencms macro
${opencms.uri}
in
param="${opencms.uri}"
as an el expression. When the page gets called I get a runtime error that
says the attribute param does not except expressions according to the tld.
In alpha3 this was not a problem because the syntax was opencms:uri(which
bring up the interesting question of why the syntax was changed to something
that is exactly like el? maybe I am missing something here) which is not
interpreted as el. Obviously one solution is to this is to turn off el for
the page with a directive.. but later in many of my pages I have el. I also
thought I could escape the el like this:
param="\${opencms.uri}"
but that is not working as expected. While it does not get interpreted as
el the cms:contentload tag does not receive the value ${opencms.uri}.
After some debugging I determined that it is receiving the value
^[{opencms.uri}.. where ^[ is an unprintable ascii character.
Does anyone have any ideas what is going on here or have a workaround?
TIA,
Scott Shealy
_______________________________________________
This mail is send to you from the opencms-dev mailing list To change your
list options, or to unsubscribe from the list, please visit
http://mail.opencms.org/mailman/listinfo/opencms-dev
More information about the opencms-dev
mailing list