我是java程序员,java中取到页面所有的参数方式为: request.getParameterMap(),但是这个取得的Map不能存放值进去,除非
/**
解锁map
@param map2
@throws Exception
*/
-
void releaseLock(Map<String, String[]> map2) throws Exception {
java.lang.reflect.Method method = map2.getClass().getMethod("setLocked",new Class[]{boolean.class}); method.invoke(map2,new Object[]{new Boolean(false)});
}
解锁。那么,为什么会锁住呢??有谁知道么?
FYI
http://stackoverflow.com/questions/1413129/modify-request-parameter-with-servlet-filter
As you've noted HttpServletRequest does not have a setParameter method. This is deliberate, since the class represents the request as it came from the client, and modifying the parameter would not represent that.