1 15 package org.apache.tapestry.workbench; 16 17 import javax.servlet.http.HttpServletRequest ; 18 19 import org.apache.commons.logging.Log; 20 import org.apache.commons.logging.LogFactory; 21 import org.apache.tapestry.request.DecodedRequest; 22 import org.apache.tapestry.request.IRequestDecoder; 23 24 31 32 public class RequestDecoder implements IRequestDecoder 33 { 34 private static final Log LOG = LogFactory.getLog(RequestDecoder.class); 35 36 public RequestDecoder() 37 { 38 LOG.debug("<init>"); 39 } 40 41 public DecodedRequest decodeRequest(HttpServletRequest request) 42 { 43 if (LOG.isDebugEnabled()) 44 LOG.debug("Decoding: " + request); 45 46 DecodedRequest result = new DecodedRequest(); 47 48 result.setRequestURI(request.getRequestURI()); 49 result.setScheme(request.getScheme()); 50 result.setServerName(request.getServerName()); 51 result.setServerPort(request.getServerPort()); 52 53 return result; 54 55 } 56 57 } | Popular Tags |