Creato da pastuweb.com
Share My Page
My Social Accounts
Account FaceBook Account LinkedIn Account Twitter Account Google Plus Account Git Hub

Incollate questo codice nella POST della vostra Servlet:

System.out.println("######## Ottengo Parametri della POST #########");
logger.info("Parametri richiesta.");
Enumeration enumeration = request.getParameterNames();
while (enumeration.hasMoreElements()) {
           String parameterName = (String) enumeration.nextElement();
           logger.info("ParameterName = " + parameterName + " ParameterValue = "+
request.getParameter(parameterName));
       }
 
System.out.println("######## Ottengo Headers della POST ########");
logger.info("");
logger.info("Altre info.");
Enumeration enumeration2 = request.getHeaderNames();
while (enumeration2.hasMoreElements()) {
           String headerName = (String) enumeration2.nextElement();
           logger.info("HeaderName = " + headerName + " HeaderValue = " +
request.getHeader(headerName));
       }
 
System.out.println("######## Ottengo altre info della POST ########");
System.out.println("#######################");
System.out.println("### Server Name: "+request.getServerName());
System.out.println("### Request URI: "+request.getRequestURI());
System.out.println("### Request URL: "+request.getRequestURL().toString());
System.out.println("### LocalName: "+request.getLocalName());
System.out.println("### Context Path: "+request.getContextPath());
System.out.println("### Path Translated: "+request.getPathTranslated());
System.out.println("#######################");
Average (1 Vote)
The average rating is 5.0 stars out of 5.