Link to home
Start Free TrialLog in
Avatar of gutta_naveen
gutta_naveen

asked on

Cannot find bean in any scope

I get the Error below when i click on a button in the browser ( i have pasted the snippet code below the error )

javax.servlet.jsp.JspException: Cannot find bean regionName in any scope
      at org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:938)
      at org.apache.struts.taglib.bean.WriteTag.doStartTag(WriteTag.java:298)
      at jrun__jsp__customer__edit2ejsp16._jspService(jrun__jsp__customer__edit2ejsp16.java:760)
      at jrun.jsp.runtime.HttpJSPServlet.service(HttpJSPServlet.java:43)


In my JSP  ( Edit.jsp ) the regionName is defined as below

                    <td class="label"><bean:message key="customer.add.label.region"/>:</td>
                    <td><bean:write name="regionName"/></td>


In my Action class ( CustomerAction.java ) the regionName is set as below

request.setAttribute( "regionName", "US" );


I am not an expert in Struts, so be a little detail in your explaination. Any help is appreciated

thanks
naveen


ASKER CERTIFIED SOLUTION
Avatar of bloodredsun
bloodredsun
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Cheers :-)