struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mon Cab <>
Subject <logic:present parameter> not detecting hidden parameters in multipart forms
Date Wed, 04 Jan 2006 20:27:17 GMT
I am using hidden fields and multipart forms in a jsp, and it seems
that the <logic:present> tag is not detecting the hidden field as being
present when the multipart form is submitted.

In MyJsp I have 

<logic:present parameter="myvar"> 
	Myvar is present

<html:form action="" method="post"
	<html:hidden property="myvar"/>
	<html:text property="mytext"/>


I have configured this page to use the struts validator and to redirect
back to itself if validation fails. When it redirects to itself the
"myvar is present" message does not render.  

This doesnt seem to happen for <html:text> parameters.  Eg. If I
replace the <logic:present> tag with 

<logic:present parameter="mytext">
	Mytext is present

and I submit the multipart form with mytext field populated I DO get
the "my text is present" message.

Also, if I remove the enctype="multipart/form-data" attribute from the
<html:form> tag, the hidden field seems to be detected ok, and the
"myvar is present" displays.  

Has anyone come across this before, and/or does anyone know what I
might be doing wrong?  

Yahoo! DSL – Something to write home about. 
Just $16.99/mo. or less. 

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message