ActionForm is null

From: Satish (satishraos_at_indiatimes.com)
Date: 11/27/03

  • Next message: nos: "Re: Object creation overhead"
    Date: 26 Nov 2003 21:02:50 -0800
    
    

    I'm building a feedback form which has some 5 radio buttons and a
    comments text area. But the feedback form should be personalised
    before a user can see. In the sense that if he opens the url, his
    name, and other details should appear on the page.
     
    Now to personalise the page, I have a url like this
    reseller_feedback.do?method=methodFlowDetails&uID=XXX&qRef=YYY
     
    which says which action class to call, which method to call, what are
    the parameters. This is working fine and displaying all the necessary
    fields.
     
    Now, in the same jsp i have some 5 radio buttons, a comments text
    area, and a submit button. When the page is submitted i need to save
    these values in the database. i have defined a <html:form> tag
    something like this in jsp page. It should call saveMethod when it
    gets submited.
     
      <html:form name="FORMNAME" type="pacakage name of the FORMNAME"
    action="/reseller_feedback.do?method=saveMethod">

    And the method is like this

      public ActionForward saveMethod(ActionMapping oActionMapping,
                                           ActionForm oActionForm,
                                           HttpServletRequest
    httpservletrequest,
                                           HttpServletResponse
    httpservletresponse) throws
      IOException, ServletException
      {
        try {
          System.out.println("-->>"+oActionForm);
          strMappingUrl = "NEXTPAGE";
        } catch (Exception exc) {
        }
        return (oActionMapping.findForward(strMappingUrl));
      }

     
    now when i'm printing the oActionFrom before casting it into FORMNAME
    for further process but it is giving null. I don't know why. In struts
    config.xml file I have the mapping something like this
     
     <action path="/reseller_feedback" type="package path for action
    class" name="actionformname" scope="request" parameter="method"
    validate="false">
        <forward name="NEXTPAGE" path="/JSP/XXX.jsp"/>
     </action>

    I need this oActionForm 'cos only through that i've to access the
    radio button values and the comment. So please can you help me in
    finding where i'm wrong.
     
    Thnks in anticipation
    satish
    ---------------------------------------------------------------------


  • Next message: nos: "Re: Object creation overhead"