Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package net.vsame.url2sql.url.impl;
 
 import java.util.Map;
 
 
拦截器配置

Author(s):
Gaollg
public class ValidatorInterceptor implements Interceptor{
	public void init(UrlMapping urlMappingServletContext servletContext) {
	}
	public void invoke(Chain chain) {
		Url2SqlContext c = WebHelper.getContext();
		Map<StringString[]> map = c.getParams();
		String v = c.getUrlConfig().getV();
		if(v == null){
			chain.next();
			return;
		}
		Map<StringStringerrors = ValidatorHelper.v(mapv);
		if(errors.isEmpty()){
			chain.next();
		}else {
			c.putFormError("Params Error!"errors);
		}
	}
	public void destroy() {
	}
New to GrepCode? Check out our FAQ X