Frank, The problem is that you can't have nested forms in an html page. It is not a JSP problem. As I see your JSP page, you've got two html forms inside a third form. You should reorganize your form and remove the two inner forms. You need to use a single form with multiple submit buttons. You can use the org.apache.struts.actions.DispatchAction,or ...LookupDispatchAction, or just your own logic in a standard Action class to handle the different submit buttons.
Regards, Richard --- MINIER Frank <[EMAIL PROTECTED]> wrote: > Hi, > > I have an error with a Jsp which has 2 > <html:form>...</html:form> tags... > > javax.servlet.ServletException: Cannot find bean > under name > org.apache.struts.taglib.html.BEAN > at > org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp > l.java:471) > at > org.apache.jsp.Test2MultiForms$jsp._jspService(Test2MultiForms$jsp.java:424) > at > org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107) > at > javax.servlet.http.HttpServlet.service(HttpServlet.java:853) > (....) > > The Jsp looks like that: > <%@ taglib ... > <html:html> > <html:form action="/formAction"> > > <html:textarea property="definitionPpty"/> > <html:form action="/A"> > <html:submit property="submit1">A</html:submit> > </html:form> > > <html:textarea property="defNotePpty"/> > <html:formaction="/B"> > <html:submit property="submit2">B</html:submit> > </html:form> > > </html:form> > </html:html> > > I have defined the 3 action in struts-config.xml: > formAction, > A, > B, > Each Action have a formBean associated with the > correct properties: > formAction => definitionPpty, defNotePpty > A => submit1 > B => submit2 > > The problem is: > 1) when i test the jsp i have the error mentioned > above (cannot > find bean under name etc...) > 2) I tried to remove the second textarea > (<html:textarea > property="defNotePpty"/>) and in this case, no error > is thrown. > 3) If i remove the first html:form tag, no error is > thrown (=> so we > can put a html:form tag inside another?) > 4) If i remove the second html:form tag, the same > error is thrown: > cannot find bean under name... > > Is there anyone who could explain me what is this > exotical behaviour? > Can we put a <html:form> inside an other > <html:form>? > Maybe, i made a mistake but i don't know where it > is...Perhaps, i can do > what i want using another way... > > Thanx for your help, > Frank Minier. > > > Here is the Jsp code (with the minimum of elements > for test): > > <%@ taglib uri="/tags/struts-html" prefix="html" %> > <%@ taglib uri="/tags/struts-bean" prefix="bean" %> > <%@ taglib uri="/WEB-INF/tiles.tld" prefix="tiles" > %> > <html:html locale="true"> > <head> > <title>Test MultiForm</title> > </head> > <body bgcolor="white"> > <html:form action="/DoFirstSecondariesForm"> > <TABLE BORDER="1" CELLSPACING="1" CELLPADDING="5"> > <TBODY> > <TR class="definitionSectionBody"> > <TD class="definitionLabelCell" colspan="5"> > <DIV class="definitionField"> > <html:textarea > property="definitionPpty"/> > </DIV> > </TD> > <TD class="buttonRemoveCell"> > <html:form > action="/DispachFirstSecondariesDefinitionAddNewRemove"> > <html:submit property="submit1"> > <bean:message > key="Button.RemoveDisplayName" locale="JspConf"/> > </html:submit> > </html:form> > </TD> > </TR> > <TR class="defNoteSectionBody"> > <TD class="defNoteLabelCell" colspan="5"> > <DIV class="defNoteField"> > <html:textarea > property="defNotePpty"/> > </DIV> > </TD> > <TD class="defNoteButtons"> > <html:form > action="/DispachFirstSecondariesDefinitionNoteAddNewRemove"> > <html:submit property="submit2"> > <bean:message > key="Button.RemoveDisplayName" locale="JspConf"/> > </html:submit> > </html:form> > </TD> > </TR> > </TBODY> > </TABLE> > <DIV class="submit"> > <html:submit>Next >></html:submit> > </DIV> > </html:form> > </body> > </html:html> > > > This e-mail is intended only for the above > addressee. It may contain > privileged information. If you are not the addressee > you must not copy, > distribute, disclose or use any of the information > in it. If you have > received it in error please delete it and > immediately notify the sender. > Security Notice: all e-mail, sent to or from this > address, may be > accessed by someone other than the recipient, for > system management and > security reasons. This access is controlled under > Regulation of > Investigatory Powers Act 2000, Lawful Business > Practises. > > -- > To unsubscribe, e-mail: > <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: > <mailto:[EMAIL PROTECTED]> > __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

