struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Karr, David" <david.k...@wamu.net>
Subject RE: JSTL and Struts together
Date Fri, 20 May 2005 13:23:18 GMT
If you look in the "contrib" folder of the Struts distribution, you'll
find the "struts-el" distribution.  This provides a taglib that just
wraps the Struts tag library so that all tag attributes are passed
through the JSTL EL engine, so you could do the following:

<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c"/>
<%@ taglib uri="/tags/struts-html-el" prefix="html"/>

<html:form action="dynaadd.do">
   <html:text 
         property="name" 
         value="${param.x}"/>
</html:form>

> -----Original Message-----
> From: Suresh Khatri [mailto:suresh@uow.edu.au] 
> Sent: Thursday, May 19, 2005 10:16 PM
> To: user@struts.apache.org
> Subject: JSTL and Struts together
> 
> 
> <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c"/>
> <%@ taglib uri="/tags/struts-html" prefix="html"/>
> 
> <html:form action="dynaadd.do">
>    <html:text 
>          property="name" 
>          value="<c:out value="${param.x}"/>"/>
> </html:form>
> 
> would display the whole thing. Is there a way of making it 
> evaluate <c:out first and then pass the evaluation to value 
> of html:text
> 
> this works but it is because input is not in the namespace 
> html
> <input type="text" 
>        name="name" value="<c:out value="${param.x}"/>"/>
> 
> How can this be solved using Struts and JSTL
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message