I believe the reason it's not populated in the action form is because its in the request as an attribute and not a parameter.
<snip-from-original-post> I just started experimenting with jstl and i'd like to set a hidden field on MyActionForm using a value (contentId) available as an attribute on the request. </snip-from-original-post> robert > -----Original Message----- > From: Rick Reumann [mailto:[EMAIL PROTECTED] > Sent: Wednesday, June 23, 2004 3:23 PM > To: Struts Users Mailing List > Subject: Re: Setting html:hidden property using JSTL > > > klute wrote: > > > Yes, the struts-el.jar is in WEB-INF/lib > > > > --- Rick Reumann <[EMAIL PROTECTED]> wrote: > > > >>klute wrote: > >> > >> > >>><input type="hidden" name="contentId" > >>>value="${contentId}"> > >>> > >>>This are the tagligs i am importing on this page: > >>><%@ taglib uri="/WEB-INF/struts-bean.tld" > >>>prefix="bean" %> > >>><%@ taglib uri="/WEB-INF/struts-html.tld" > >>>prefix="html" %> > >>><%@ taglib uri="/WEB-INF/struts-html-el.tld" > >>>prefix="html-el" %> > >>><%@ taglib uri="http://java.sun.com/jstl/core" > >>>prefix="c" %> > >>> > >>> > >>>What am i doing wrong? > > Not sure. If you have > - struts-el jar included > - proper definition of the tld in web.xml > - proper declaration for the tld on top of the page > > then using it as: > <html-el:hidden property="contentId" value="${contentId}"/> > should be fine. > > The only thing I'm still concerned about and maybe somehow it's related > is that contentId has to be a property of your ActionForm or else Struts > would complain that it couldn't find the property 'contentId' Are you > maybe creating the "contentId" var dynamically first in the JSP page and > then trying to set as above? "Usually" you don't need to do like you are > doing (setting the value) since that value can be set before you get to > the page and thus just doing <html:hidden property="contentId" would be > fine. > > What does <c:out value="${contentId}"/> produce on the page (or in > source) when placed right before the html-el hidden tag? > > -- > Rick > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]