Get all parameters and value from URL in Java :
public static void printRequestParameters(HttpServletRequest req) {
Enumeration params = req.getParameterNames();
while (params != null && params.hasMoreElements()) {
String param = (String) params.nextElement();
String value = req.getParameter(param);
System.out.println(param+"="+value);
}
}
No comments:
Post a Comment