천수만 죽도 앞바다로 쭈꾸미 낚시 다녀옴.
갑오징어도 잡힘.
배에서 데쳐먹는 쭈꾸미와 먹물라면은 역시 일품임.
All posts by freesens
HttpServletRequest :: url parsing
// http://hostname.com:80/mywebapp/servlet/MyServlet/a/b;c=123?d=789 public static String getUrl(HttpServletRequest req) { String scheme = req.getScheme(); // http String serverName = req.getServerName(); // hostname.com int serverPort = req.getServerPort(); // 80 String contextPath = req.getContextPath(); // /mywebapp String servletPath = req.getServletPath(); // /servlet/MyServlet String pathInfo = req.getPathInfo(); // /a/b;c=123 String queryString = req.getQueryString(); // d=789 // Reconstruct original requesting URL String url = scheme+"://"+serverName+":"+serverPort+contextPath+servletPath; if (pathInfo != null) { url += pathInfo; } if (queryString != null) { url += "?"+queryString; } return url; }