struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Amleto Di Salle" <disa...@di.univaq.it>
Subject R: Setting html:hidden property using JSTL
Date Wed, 23 Jun 2004 17:52:20 GMT
Hi,
yes you can use the EL but depends on the Web Container you are using. 
If you have a Web container JSP2.0 (and 2.4 servlet) compliant (for
example Tomcat5.0.x), you can use JSTL 1.1 (if you want to use them you
have to set your application)and html Struts standard. 
In order to use, this version you have to do the following in the jsp
page:


<%@ taglib uri="http://jakarta.apache.org/struts/tags-html"
prefix="html"%>


<html:hidden property="contentId" value="${contentId}"/>


But if you have a WebContainer JSP1.2 compliant (e.g. Tomcat 4.x) you
have to use the html-el version + JSTL1.0. They are in the "contrib"
directory inside the struts directory. But in this case the procedure in
order to use them is just to complicate.

BR
/Amleto



-----Messaggio originale-----
Da: klute [mailto:soundres9@yahoo.com] 
Inviato: mercoledì 23 giugno 2004 19.25
A: Struts Users Mailing List
Oggetto: Setting html:hidden property using JSTL 


Hi All,

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. Basically, i'd
like to do something like this:

<html:hidden property="contentId" value="<c:out
value="${contentId}"/>"/>
 
Which does not work. Should i be using EL syntax
instead? And what would the correct syntax be?

I did check that <c:out value="${contentId}"/> returns
a valid value so my confusion is just passing it as a
value to the html:hidden property.

Any help is greatly appreciated.
James


		
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail 

---------------------------------------------------------------------
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