package org.jerrymouse.cc.site.web.action;

import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Result;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

import com.opensymphony.xwork2.ActionSupport;

@SuppressWarnings("serial")
@Component
@Scope("prototype")
public class IndexAction extends ActionSupport {

	private String username = "anonymous";

	@Override
	@Action(results = { @Result(name = ActionSupport.SUCCESS, location = "/index-anonymous.html", type = "velocity") })
	public String execute() throws Exception {
		return super.execute();
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getUsername() {
		return username;
	}

}
