Krishna, The property tag is required for many html taglib tags. The point I was trying to get across was that one syntax uses whatever ActionForm goes with the form specified by the html:form's opening tag using the standard:
<html:text property="someProperty" value="someDefaultValue" /> Whereas you can pull any saved bean's property using the below modified syntax. The difference is the one below doesn't need to be inside a html:form tag. It only requires you to have saved a bean or form into a scope (request, session, application, etc.): <html:text name="someBeanNameSavedInAnyScope" property="someProperty" value="someOptionalDefaultValue" /> Again, I pointed out adding the name="..." attribute to the html tags because that is the only way to make a struts html tag use a bean if you did a request.setAttribute("name", object) as you listed below. Regards, David -----Original Message----- From: Krishna Mohan Radhakrishnan [mailto:[EMAIL PROTECTED] Sent: Friday, January 07, 2005 1:57 AM To: Struts Users Mailing List Subject: RE: Putting a field into the REQUEST HI David, Moreover when I tried to create a hidden field in this manner <html:hidden name="regularPlan" value="true"/> It showed up an error. /acctmgmt/updatePlanProfileContent.jsp(159): required attribute 'property' not specified for tag 'hidden' probably occurred due to an error in /acctmgmt/updatePlanProfileContent.jsp line 159: <html:hidden name="regularPlan" value="true"/> Regards Krishna Mohan -----Original Message----- From: David G. Friedman [mailto:[EMAIL PROTECTED] Sent: Friday, January 07, 2005 11:20 AM To: Struts Users Mailing List Subject: RE: Putting a field into the REQUEST Krishan, The error code you gave and the description of the problem do not match. If your code only works when you do this: <% request.setAttribute("regularPlan","true"); %>' Then you cannot be using this tag: <html:hidden property="regularPlan" value="true" /> But something more like this: <html:hidden name="regularPlan" .... /> Why? Because skipping the "name=..." attribute forces the tag to use the current ActionForm specified by the html:form tag you are enclosing everything within. If you use the name field, it looks for an object in the various scopes (page, request, session, attribute) matching that name and tries to retrieve it's value). I've used this before to essentially "import" fields into a form for submittal to a new Action. See the manual for the html taglib (specifically html:hidden) for more detail: http://struts.apache.org/userGuide/struts-html.html#hidden Regards, David -----Original Message----- From: Krishna Mohan Radhakrishnan [mailto:[EMAIL PROTECTED] Sent: Friday, January 07, 2005 12:13 AM To: Struts Users Mailing List Subject: RE: Putting a field into the REQUEST Hi David, Thanx it is working. But my original problem still exists. The request does not contain this field. But if I am using a java scriptlet like <% request.setAttribute("regularPlan","true"); %>Then it is working I want to do a similar operation in struts. Any idea? Regards, Krishna Mohan -----Original Message----- From: David G. Friedman [mailto:[EMAIL PROTECTED] Sent: Friday, January 07, 2005 10:37 AM To: Struts Users Mailing List Subject: RE: Putting a field into the REQUEST Try a closing slash so your line: <html:hidden property="regularPlan" value="true"> Becomes: <html:hidden property="regularPlan" value="true" /> ................................................^^^ Regards, David -----Original Message----- From: Krishna Mohan Radhakrishnan [mailto:[EMAIL PROTECTED] Sent: Thursday, January 06, 2005 11:55 PM To: Struts Users Mailing List Subject: Putting a field into the REQUEST Hi all, Could any body tell me why does this error occur? /acctmgmt/updatePlanProfileContent.jsp(159): The TLD description for tag 'hidden' requires that the body be empty. probably occurred due to an error in /acctmgmt/updatePlanProfileContent.jsp line 159: <html:hidden property="regularPlan" value="true"> I wanted to set a hidden field in the updatePlanProfileContent.jsp, so that while submitting it is available in the request. I tred with a simple HTML input type tag and stil it is not set in the request. Please somebody tell me how to put a value into the request object through Struts tags or via simple HTML tags. Regards, Krishna Mohan --------------------------------------------------------------------- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]