You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Suresh Khatri <su...@uow.edu.au> on 2005/05/20 07:15:50 UTC
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
Re: JSTL and Struts together
Posted by Hubert Rabago <hr...@gmail.com>.
Suresh, I would recommend you still use "html" as prefix instead of
"html-el". This way, when you switch to a web container that supports
EL and decide to drop the struts-el.jar, you can just modify your <%@
taglib %> declaration to reconfigure (or, depending on how configure
tags, just your web.xml file).
Of course there's nothing wrong with using the "html-el" prefix, but I
prefer sticking with the usual prefixes.
Hubert
On 5/20/05, David Johnson <ch...@gmail.com> wrote:
> you can use the <html-el:text value="${param.x}"><html-el:text> control to
> accomplish just that I'm doing that in a bunch of places.
>
> On 5/20/05, Shey Rab Pawo <pa...@gmail.com> wrote:
> >
> > <html-el:form> etc.
> >
> > On 5/19/05, Suresh Khatri <su...@uow.edu.au> wrote:
> > > <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c"/>
> > > <%@ taglib uri="/tags/struts-html" prefix="html"/>
> > >
> > > <html:form action="dynaadd.do <http://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
> > >
> > >
> >
> >
> > --
> > No one ever went blind looking at the bright side of life.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
>
>
> --
> -Dave
> ChaChaNY@Gmail.com
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: JSTL and Struts together
Posted by David Johnson <ch...@gmail.com>.
you can use the <html-el:text value="${param.x}"><html-el:text> control to
accomplish just that I'm doing that in a bunch of places.
On 5/20/05, Shey Rab Pawo <pa...@gmail.com> wrote:
>
> <html-el:form> etc.
>
> On 5/19/05, Suresh Khatri <su...@uow.edu.au> wrote:
> > <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c"/>
> > <%@ taglib uri="/tags/struts-html" prefix="html"/>
> >
> > <html:form action="dynaadd.do <http://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
> >
> >
>
>
> --
> No one ever went blind looking at the bright side of life.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
--
-Dave
ChaChaNY@Gmail.com
Re: JSTL and Struts together
Posted by Shey Rab Pawo <pa...@gmail.com>.
<html-el:form> etc.
On 5/19/05, Suresh Khatri <su...@uow.edu.au> wrote:
> <%@ 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
>
>
--
No one ever went blind looking at the bright side of life.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org