@liubin
我去查了一下源代码
ServletRequest.java里有如下定义
public interface ServletRequest
{
public abstract String getParameter(String s);
}
ServletRequestWrapper.java里却是这样实现的
public class ServletRequestWrapper
implements ServletRequest
{ private ServletRequest request;
public ServletRequestWrapper(ServletRequest request)
{
if(request == null)
{
throw new IllegalArgumentException("Request cannot be null");
} else
{
this.request = request;
return;
}
}
public String getParameter(String name)
{
return request.getParameter(name);
}
}
于是乎 我没搞清楚
public String getParameter(String name) 这个方法具体是如何实现的
回复 更多评论