Hi , to do this
<% String NAME = request.getParameter(name); out.println(NAME); %> make sure that, you are calling this jsp on submission of 'html form' which should have a textbox with a name 'name'. if u r writing this <input type=text name='<%=name%>' value='<%=nameValue%>' > and above line in same page then surely it will not work.. The form must be submitted. to use request.getparametres("name"); Regards, Vinayak. >>> [EMAIL PROTECTED] 07/22/03 03:34PM >>> Hi... Thanks Vinayak. It does set the name . But when i use <form > <input type=text name='<%=name%>' value='<%=nameValue%>' > <% String NAME = request.getParameter(name); out.println(NAME); %> </form> It prints null (it should print content of text box i.e. value of nameValue .) Please help Thanks Anubhav ----- Original Message ----- From: "Vinayak Birari" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, July 22, 2003 2:51 PM Subject: Re: Using variable on JSP Page > hi Anubhav, > try out this... > <% > String name = "myName"; > String nameValue = "value"; > %> > <html> > <form name="frm"> > <input type="text" name = '<%=name%>' value='<%=nameValue%>'> > </form> > </html> > > cheers, > Vinayak. > > >>> [EMAIL PROTECTED] 07/22/03 01:21PM >>> > Hello. > > I want to create a text box on JSP page and give it a name which is > stored > in the VARIABLE say 'name'. This variable is defined in the java code > on > the JSP page. > > Can you please tell me the EXACT syntax ? > > PLEASE NOTE THAT I WANT TO GIVE NAME TO TEXT BOX THRU MY CODE. So the > name > is in variable and not known beforehand > > Thanks a lot > > Anubhav > > > --------------------------------------------------------------------- > 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]