Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Apr 2004
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Struts:select tag issue

    I have a JSP that has the following code:

    <html:select name="formBean" property="textId">
    <htmlptions
    collection="WORDS"
    property="txtBody"
    labelProperty="txtName"
    </htmlptions>
    </html:select>

    I have the setters and getters for the bean attributes in the form bean that is defined in the struts-config.xml file as:
    <form-beans>
    <form-bean name="formBean" type="com.xora.apps.messaging.presentation.form.MyForm
    </form-beans>

    The collection WORDS is set in the request attribute and contains a List of values when the action form is called(ie when the form loads) to be populated in the options tag. But when the form loads the message:

    500 Servlet Exception
    javax.servlet.jsp.JspException: Cannot find bean under name formBean

    is displayed even after manually creating the formBean instance in the ActionForm page as
    MyForm formBean = new MyForm();

    Any fix suggested would be greatly appreciated...

    -Ali

  • #2
    Regular Coder
    Join Date
    Jul 2002
    Posts
    698
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I would suggest u try a java forum.

  • #3
    Kor
    Kor is offline
    Red Devil Mod Kor's Avatar
    Join Date
    Apr 2003
    Location
    Bucharest, ROMANIA
    Posts
    8,478
    Thanks
    58
    Thanked 379 Times in 375 Posts
    JSP and JavaScript are different things. Try Java or server-side languages Forum
    KOR
    Offshore programming
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •