troubleshooting Question

Cannot find bean in any scope

Avatar of gutta_naveen
gutta_naveen asked on
JSP
2 Comments1 Solution4581 ViewsLast Modified:
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


Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 2 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros