You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by ha...@informatiefabriek.nl on 2003/05/08 14:52:50 UTC

Question about request attribute

Hi all,

I stored a normal string in my HttpRequest as follows:

String myText = "Blablabla";
request.setAttribute("text", myText);

In my JSP I want to put this text in a hidden text field. How can this be 
done?
I tried:

<html:hidden name="text"/>

But, then Jasper ofcourse complaines the property attribute is missing.

Any ideas?

Thanks,

Harm de Laat
Informatiefabriek
The Netherlands


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


RE: Question about request attribute

Posted by Robert Taylor <rt...@mulework.com>.
The "text" property must be defined in your form.
So store the value in your form and then the html:hidden
tag will render it.

robert

> -----Original Message-----
> From: harm@informatiefabriek.nl [mailto:harm@informatiefabriek.nl]
> Sent: Thursday, May 08, 2003 8:53 AM
> To: struts-user@jakarta.apache.org
> Subject: Question about request attribute
>
>
> Hi all,
>
> I stored a normal string in my HttpRequest as follows:
>
> String myText = "Blablabla";
> request.setAttribute("text", myText);
>
> In my JSP I want to put this text in a hidden text field. How can this be
> done?
> I tried:
>
> <html:hidden name="text"/>
>
> But, then Jasper ofcourse complaines the property attribute is missing.
>
> Any ideas?
>
> Thanks,
>
> Harm de Laat
> Informatiefabriek
> The Netherlands
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>


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