2007/03/07

show 出 request and session 的變數與值

Enumeration requestEnumer = request.getParameterNames();
while(requestEnumer.hasMoreElements()) {
str1 = (String) requestEnumer.nextElement();
str2 = request.getParameter(str1);
System.out.println(str1+"="+str2);
}

Enumeration sessionEnumer = session.getAttributeNames();
while(sessionEnumer.hasMoreElements()) {
str1 = (String) sessionEnumer.nextElement();
str2 = session.getAttribute(str1).toString();
System.out.println(str1+"="+str2);
}

沒有留言:

NGINX SSL/設定檔案

#user nobody; worker_processes 1; #error_log logs/error.log; #error_log logs/error.log notice; #error_log logs/error.log info; #...