You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by st...@nitwit.de on 2004/08/29 12:30:47 UTC
struts-el doesn't accept expressions
Hello everybody,
struts-el TLDs are somewhat strange, they set rtexprvalue to false and hence
this is what happens when I put an EL expr in an struts-el tag:
"According to TLD or attribute directive in tag file, attribute action does
not accept any expressions"
Well, where is that hidden secret switch to make it work?
What I do so far:
1) struts-el.jar to classpath
2) struts-el TLDs to WEB-INF
3) use tags, i.e.:
<c:set var="action" value="/search.do" />
<html-el:form styleId="form" action="${action}" method="POST">
Re: struts-el doesn't accept expressions
Posted by Nicolas De Loof <ni...@capgemini.com>.
You have to
1. put strut-el in your WEB-INF/lib
2. set your webapp to use servlet 2.3 API using the web.xml DOCTYPE
<!DOCTYPE web-app PUBLIC
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
3. use taglib directives in your JSP
<%@ taglib uri=http://struts.apache.org/tag-html-el prefix="html" %>
You don't need to
- declare taglibs in your web.xml if you use the taglib URI
> struts@nitwit.de wrote:
>
> >Hello everybody,
> >
> >struts-el TLDs are somewhat strange, they set rtexprvalue to false and hence
> >this is what happens when I put an EL expr in an struts-el tag:
> >
> >"According to TLD or attribute directive in tag file, attribute action does
> >not accept any expressions"
> >
> >Well, where is that hidden secret switch to make it work?
> >
> >What I do so far:
> >
> >1) struts-el.jar to classpath
> >
> >
>
> I put struts-el.jar in my webapp's WEB-INF/lib directory, along with all
> the other Struts/Commons jars.
>
> >2) struts-el TLDs to WEB-INF
> >
> >
>
> What about the taglib identifier/declaration in the JSP itself?
>
> <%@ taglib uri="/WEB-INF/struts-html-el.tld" prefix="html-el" %>
>
> >3) use tags, i.e.:
> >
> > <c:set var="action" value="/search.do" />
> > <html-el:form styleId="form" action="${action}" method="POST">
> >
> >
>
> This is the exact syntax I use in my forms, so I know that it works
> (JBoss 3.2.x/Tomcat 5.x, Struts 1.1).
>
> Erik
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
Our name has changed. Please update your address book to the following format: "recipient@capgemini.com".
This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: struts-el doesn't accept expressions
Posted by Erik Weber <er...@mindspring.com>.
struts@nitwit.de wrote:
>Hello everybody,
>
>struts-el TLDs are somewhat strange, they set rtexprvalue to false and hence
>this is what happens when I put an EL expr in an struts-el tag:
>
>"According to TLD or attribute directive in tag file, attribute action does
>not accept any expressions"
>
>Well, where is that hidden secret switch to make it work?
>
>What I do so far:
>
>1) struts-el.jar to classpath
>
>
I put struts-el.jar in my webapp's WEB-INF/lib directory, along with all
the other Struts/Commons jars.
>2) struts-el TLDs to WEB-INF
>
>
What about the taglib identifier/declaration in the JSP itself?
<%@ taglib uri="/WEB-INF/struts-html-el.tld" prefix="html-el" %>
>3) use tags, i.e.:
>
> <c:set var="action" value="/search.do" />
> <html-el:form styleId="form" action="${action}" method="POST">
>
>
This is the exact syntax I use in my forms, so I know that it works
(JBoss 3.2.x/Tomcat 5.x, Struts 1.1).
Erik
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org