struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dale Newfield <>
Subject Re: getting the value of a s:checkbox
Date Wed, 08 Aug 2007 17:30:45 GMT
Dale Newfield wrote:
> OK--now this request goes to your server.  Hopefully eventually to 
> struts.  Struts then steps through the interceptors and eventually calls 
> your action.  The action does it's thing and selects a result.

And this whole process can generate as many logs as you have log4j set 
up to generate.  For example, here's a piece from a log (in this case 
generated because the request was multipart/included an upload) in my 
app showing that there were two parameters found in the request 
corresponding with the form's single checkbox:

MultiPartRequest.parse(94) | Found item user.commentsPlain
MultiPartRequest.parse(96) | Item is a normal form field
MultiPartRequest.parse(94) | Found item __checkbox_user.commentsPlain
MultiPartRequest.parse(96) | Item is a normal form field

Why were there two?  Because s:checkbox generated not only an <input> of 
type checkbox, but also an <input> of type hidden.  These are both 
visible in the html of the page with the form.

How does having the __checkbox_user.commentsPlain parameter help?  Well, 
the "checkbox" interceptor notices that it's there, and if 
user.commentsPlain is not, it does whatever it needs to to make the rest 
of the process do the right thing.


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

View raw message