struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "alex pan (JIRA)" <>
Subject [jira] Created: (WW-2578) can't get ModelDriven property bean from stack
Date Sun, 06 Apr 2008 14:14:58 GMT
can't get ModelDriven property bean from stack

                 Key: WW-2578
             Project: Struts 2
          Issue Type: Bug
    Affects Versions:
            Reporter: alex pan
            Priority: Minor

hi all,

i am a beginner of struts2.

i added a new struts2 project. below is the code.

property in JSP page
	bike name <stl:textfield name="" />
	color<stl:textfield  name="bike.color" />
        size<stl:textfield  name="bike.size" />

Java code,
public class Bike {

	private String name;

	private String color;

	private String size;
	public Bike() {
		System.out.print("creating a new bike");
        **getter and setter methode**

public class AddBikeAction extends ActionSupport implements ModelDriven {
	private Bike bike
	public AddBikeAction() {
	public void setBike(Bike bike) { =bike;
	public String execute() {


             return SUCCESS;
	public People getModel() {
		return bike;

when i access AddBikeAction, this log is

creating a new bike
creating a new bike
creating a new bike
67(i input in JSP page)

i am confused why it always create a new Bike object when each time setting the property.
so i only can get a Bike object with one not null property.

i want to know what's wrong in my code or i was missing some config. so i got this issue.



This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message