struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From 李魁林 NeilLee (Yuanta) <Neil...@yuanta.com.tw>
Subject ActionForm could not use bean in another package?
Date Mon, 03 Mar 2003 09:04:33 GMT

I have a ActionForm in the package sp.view. And It use Customer Bean in another package sp.model
.
When I run the jsp that use the form, I got a error. But if I move the Customer Bean to sp
or sp.view package,
Everything is fine. Have any idea? 
 
This is my ActionForm
-------------------------------------------------------------
package sp.view;

import org.apache.struts.action.*;
import javax.servlet.http.*;
import sp.model.Customer;

public class CustomerForm extends ActionForm {
    private Customer customer = new Customer();

    public Customer getCustomer() {
        return customer;
    }
    public void setCustomer(Customer customer) {
        this.customer = customer;
    }

    public void reset(ActionMapping mapping,HttpServletRequest request){
        customer = new Customer();
    }

    public ActionErrors validate(ActionMapping mapping,HttpServletRequest request){
        //do something
    }

}
------------------------------------------------------------

-Neil

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message