Hi Craig and all,

After giving some thought I've tried to step through ActionServlet. The
problem was found in
 processPopulate method in the lines market with '>' below. I've included my
jsp, config and java programs for you to correct me if I am wrong. If I am
doing something wrong then why those marked lines never come back (I thought
that multipartClass is only for file uploads which I am not doing now).
Please let me know if this is a bug or a configuration problem on my side?

I appreciate the response.
Thanks,
Misak
BEGIN EXAMPLE
protected void processPopulate(ActionForm formInstance,
                                   ActionMapping mapping,
                                   HttpServletRequest request)
        throws ServletException {

        if (formInstance == null)
            return;
        //set the servlet of the ActionForm
        formInstance.setServlet(this);

        // Populate the bean properties of this ActionForm instance
        if (debug >= 1)
            log(" Populating bean properties from this request");
        formInstance.reset(mapping, request);
        //place the mapping's multipart request handler class
        //into the request to be read by the BeanUtils.populate
        //method in the event of a multipart request
>
request.setAttribute("org.apache.struts.action.mapping.multipartclass",
>                            mapping.getMultipartClass());
        //also pass the mapping through the request
                System.out.println("processPopulate() 6");
        request.setAttribute("org.apache.struts.action.mapping.instance",
                                mapping);
                System.out.println("processPopulate() 7");
        BeanUtils.populate(formInstance, mapping.getPrefix(),
                           mapping.getSuffix(), request);

    }
END EXAMPLE

-----Original Message-----
From: Boulatian, Misak [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 07, 2000 5:46 PM
To: [EMAIL PROTECTED]
Subject: FormBean problem


Hi all,

I cannot seem to make form beans working. It seems like the instance of the
form bean never gets created. Here are my web.xml, struts-config.xml, and
action classes. I can never get user id and password to print from the
action class. If someone can tell me where my mistake is I would really
appreciate that.

Thanks very much,
Misak Boulatian
Vantra Group, Inc.
 <<login.jsp>>  <<web.xml>>  <<struts-config.xml>>  <<LoginAction.java>>  
<<LoginForm.java>> 

login.jsp

web.xml

struts-config.xml

LoginAction.java

LoginForm.java

Reply via email to