No.U are not getting it right. U should understand the flow of struts for this.
For the bean to get instantiated, it has to associated with some action. And from u r config file, it looks that u have mapped the form to /customer action.So if u call this customer action first, then in the action say mapping.findForward("success") and change the mapping for action as follows. <action-mappings> > <action path="/customer" > type="org.ig.shopone.web.actions.CustomerAction" name="customerForm" > scope="request"/> <forward name="success" path="/yourjsp.jsp"/> > </action-mappings> then this will work. If u are directly calling jsp, there is no way the form bean will be available. And the tag does not create any bean.It accesses the bean avaiblable already(generally created in action..) And it works without the logic tag is because in rest of u r page, u are not refering to any of bean attributes.i.e. form bean is not referred. regards, Shirish -----Original Message----- From: satyanarayana [mailto:[EMAIL PROTECTED]] Sent: Monday, December 09, 2002 2:13 PM To: struts-user Cc: satyanarayana Subject: Re: No bean found under attribute key - any config problem? Hi, I am using Tomcat 4.1.1 I didn't configured any action forwards.. I think the main problem is with logic:equal usage.... I think the bean is not getting instantiated. Its working fine without any logic:equal tags in my JSP... but to add extra functionality, I have to use logic:equal tag Thanks ----- Original Message ----- From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Monday, December 09, 2002 6:27 PM Subject: RE: No bean found under attribute key - any config problem? > What do u mean by executing the jsp? > The way u have done configuration, there will not be any problem if u are > calling the CustomerAction and the CustomerAction action is doing a forward to > the jsp. > BEcause then only the form bean will be available. > > How u are executing the jsp? > > > -----Original Message----- > From: satyanarayana [mailto:[EMAIL PROTECTED]] > Sent: Monday, December 09, 2002 1:57 PM > To: struts-user > Cc: satyanarayana > Subject: No bean found under attribute key - any config problem? > > > Greetings, > > I am new to Struts list > I am getting an exception with the message "No bean found under attribute key > customerForm" when I am accessing the JSP where in which I am using the > logic:equal tag. I am using this tag to check whether a formbean variable > (called action) value is equal to "new" or not. > I have configured the formbean with the name customerForm in the config file. > and I am sure that the bean is in classpath. > I am in need of the corrective action to solve the problem > The following are the details.. > > Thanks, > Satya > ---------------- > > I have written an Action Form class called org.ig.shopone.web.CustomerForm that > is having following 6 fields with public getter and setter methods (along with > validate and reset methods).. > > private String name; > private String address; > private String customerId; > private String password; > private String password2; > private String action; > > I am using the above Form in a JSP to check whether the action field value is > "new" or "edit". > > <html:html> > <head> > <logic:equal name="customerForm" property="action" scope="request" > value="new"> > <title><bean:message key="customer.new.title"/></title> > </logic:equal> > <logic:notEqual name="customerForm" property="action" scope="request" > value="new"> > <title><bean:message key="customer.edit.title"/></title> > </logic:notEqual> > <html:base/> > </head> > <body bgcolor="white"> > <html:errors/> > ... > .. > When I am executing the above JSP file I am getting the following Exception > > -------------------------------------------------------------------------- ------ > ------------------------------ > HTTP Status 500 - > type Exception report > > message > > description The server encountered an internal error () that prevented it from > fulfilling this request. > > exception > > org.apache.jasper.JasperException: No bean found under attribute key > customerForm > void > org.apache.jasper.servlet.JspServletWrapper.service(javax.servlet.http.HttpS ervl > etRequest, javax.servlet.http.HttpServletResponse, boolean) > JspServletWrapper.java:248 > void > org.apache.jasper.servlet.JspServlet.serviceJspFile(javax.servlet.http.HttpS ervl > etRequest, javax.servlet.http.HttpServletResponse, java.lang.String, > java.lang.Throwable, boolean) > JspServlet.java:289 > void > org.apache.jasper.servlet.JspServlet.service(javax.servlet.http.HttpServletR eque > st, javax.servlet.http.HttpServletResponse) > JspServlet.java:240 > ........... > .... > -------------------------------------------------------------------------- ------ > ------------------------------ > > The following is the configuration file > > <?xml version = '1.0' encoding = 'windows-1252'?> > <!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts > Configuration 1.1//EN" > "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd"> > <struts-config> > <form-beans> > <form-bean name="customerForm" type="org.ig.shopone.web.CustomerForm"/> > </form-beans> > <action-mappings> > <action path="/customer" > type="org.ig.shopone.web.actions.CustomerAction" name="customerForm" > scope="request"/> > </action-mappings> > <message-resources parameter="ApplicationResources"/> > </struts-config> > > -------------------------------------------------------------------------- ------ > ------------------------------ > > > -- > 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]>