Hello there,

Please I have a blocking point which on which I've spent two days with no
light at the end if tunnel:

Actually I've declared my bean into struts-config.xml like this:

<action
            path="/users"
            id="users"
            scope="request"
            name="users"
            type="com.myapp.struts.UsersAction"
            parameter="/users.jsp">
</action>

after that I tried to invoke this bean's method so I wrote in my users.jsp
page:

<bean:write name="users" property="env"/>

when running my application it throws this exception:

javax.servlet.jsp.JspException: Cannot find bean: "users" in any scope
    org.apache.struts.taglib.TagUtils.lookup(TagUtils.java:864)
    org.apache.struts.taglib.bean.WriteTag.doStartTag(WriteTag.java:233)

org.apache.jsp.users_jsp._jspx_meth_bean_005fwrite_005f0(users_jsp.java:158)
    org.apache.jsp.users_jsp._jspService(users_jsp.java:112)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)


What's wrong in my bean declaration that hides it from being injected into
my application context???


Thanks in advance for any suggestion,
Hanen

Reply via email to