The <html:form...> tag and the <%= ... %> tags are server tags. They get compiled into Java code that compiles on the server. From what I've discovered, you can't nest these tags. I'm sure someone will correct me if I'm wrong. I have found that you can nest server tags within browser tags like this:
<input type="text" name="junk" value="<%= v %>"> In tomcat, when a JSP is run, the compiled version and source code is put into a work directory. When I run tomcat under jbuilder, the work directory is within my project. If you find the source code for your example below, you'll see that the value "<%= request.getParameter... %>" is being put in the action property, not the evaluated version. Again, this is from my poking around on tomcat. I haven't read the servlet spec about this so I don't know for sure that this happens on all servlet containers. To boil it all down, you can't nest server compiled tags. That's why your solution doesn't work. Jay On Fri, 22 Mar 2002, Sudipta Sarkar wrote: > The solution you said works. > but > <html:form action="<%= request.getParameter("id") %>"> does not work > although > <% String id = (String)request.getParameter("id"); %> > <html:form action="<%= id %>"> > works. > Is there anything that I am doing wrong in case 1. > > Thanks > Sudipta > > "Nicolas De Loof" <[EMAIL PROTECTED]> wrote: > JSP Tags use an XML syntax, so you must have the same number of opening and > closing "html:form" jsp tags in your jsp. This is why your JSP engine > failed. > > acording to struts-form.tld, action attribute in html:form tag can be JSP > computed. Try this: > > <% > String actionPath; > if( something) { > actionPath =" /AccountMaint"; > } > else { > actionPath =" /CreateAccount"; > } > %> > > > <html:form action="<%= actionPath %>"> > > .. > > </html:form> > > > > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > > > > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>