Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ctxUrl = sb.append(req.getScheme()).append("://")
- .append(req.getgetServerName()).append(":")
- .append(req.getServerPort()) etc
- ctxUrl = req.getRequestURL();
- ctxUrl = ctxUrl.substring(0, ctxUrl.lastIndexOf("/")));
- StringBuffer url = req.getRequestURL();
- String uri = req.getRequestURI();
- String ctx = req.getContextPath();
- String base = url.substring(0, url.length() - uri.length() + ctx.length()) + "/";
- URI contextUrl = URI.create(req.getRequestURL().toString()).resolve(req.getContextPath());
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement