Struts - Bean


EJB design: Struts - Bean

  1. Struts - Bean (5 messages)

    When I run my .jsp file I am getting this error. can any one help. I looked in to the struts-config.xml and I already have the action form bean and I am using the same name in my html:form, but still I am getting this error.
    please help ASAP

    Error 500: Cannot find bean org.apache.struts.taglib.html.BEAN in any scope


    Threaded Messages (5)

  2. Struts - Bean[ Go to top ]

    It sounds like your struts bean tag is not referenced in web.xml
  3. Struts - Bean[ Go to top ]

    Check out this link:
  4. Hi,

    I get the same errors, but only in a specific case.I have a custom tag 'w.tag' which accepts dynamic attributes in variable 'steps'. 'steps' contains JSP fragments that contain html:text tags.

    This is the relevant code for w.tag:
    <html:form action="${action}" method="post">

    And this is an example JSP fragment contained in 'steps':
    <html:text property="map(${settingId})"/>
    (this is part of another custom tag)

    I get the 'cannot find bean .... in any scope' error. This is regardless of the scope I put the html:form in.

    The error does not occur if I put the fragment directly in the w.tag (instead of ${steps[step1]}. So the struts configuration is ok. For parametrization I want to keep the dynamic attributes, so I cannot simply include the fragment in w.tag.

    What could be the cause of this error?

  5. Solved![ Go to top ]

    In my case, the JSP fragments that are passed through jsp:attributes were parsed BEFORE w.tag was executed. Since w.tag creates the form, the form subelements are used outside of the scope of the form, which results in an error.

    I decided to take the form outside of w.tag and nest w.tag inside the form.
  6. Struts - Bean[ Go to top ]

    make sure you include all the elements with in the form tag.