package contollers;

import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.interceptor.Interceptor;
import com.opensymphony.xwork2.util.ValueStack;

public class ValidatorInterceptor implements Interceptor{

	public void init() {}
	
	
	public String intercept(ActionInvocation ai) throws Exception {
		ValueStack stack = ai.getStack();
		String str = stack.findString("name");
		
		stack.set("name", str.toUpperCase());
		
		return ai.invoke();
	}
	
	public void destroy() {}
	
}
