changed toDoc redirect

This commit is contained in:
Francesco Mangiacrapa 2022-03-28 13:31:58 +02:00
parent 7a25614be0
commit 5fb758e1d9
1 changed files with 3 additions and 4 deletions

View File

@ -56,10 +56,9 @@ public class UriResolverDocs {
pathInfo += "index.html";
ServletContext context = req.getServletContext();
//String realPath = context.getRealPath(pathInfo);
UriBuilder builder = UriBuilder.fromPath(context.getContextPath());
pathInfo=pathInfo.startsWith("/")?pathInfo:"/"+pathInfo;
builder.path(pathInfo);
String realPath = context.getRealPath(pathInfo);
UriBuilder builder = UriBuilder.fromPath(realPath);
// builder.path(pathInfo);
URI redirectTo = builder.build();
logger.info("redirecting to {}", redirectTo);