diff --git a/pom.xml b/pom.xml
index 66f45e3..bcce5cc 100644
--- a/pom.xml
+++ b/pom.xml
@@ -259,30 +259,6 @@
test
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
org.geotoolkit
diff --git a/src/main/java/org/gcube/datatransfer/resolver/services/UriResolverDocs.java b/src/main/java/org/gcube/datatransfer/resolver/services/UriResolverDocs.java
index c67695f..2e2d61c 100644
--- a/src/main/java/org/gcube/datatransfer/resolver/services/UriResolverDocs.java
+++ b/src/main/java/org/gcube/datatransfer/resolver/services/UriResolverDocs.java
@@ -33,18 +33,26 @@ public class UriResolverDocs {
@Produces({MediaType.TEXT_HTML})
@Path("")
public InputStream index(@Context HttpServletRequest req) throws WebApplicationException{
-
- String indexFile = "/docs/index.html";
-
+ logger.info(UriResolverDocs.class.getSimpleName() +" called");
+
+ String requestURI = req.getRequestURI();
try{
- logger.info(UriResolverDocs.class.getSimpleName() +" called");
- String realPath = req.getServletContext().getRealPath(indexFile);
+
+
+ if(requestURI == null)
+ requestURI = "/index.html";
+
+ String pathInfo = req.getPathInfo();
+ logger.info("pathInfo {}",pathInfo);
+ logger.info("request URI {}", requestURI);
+
+ String realPath = req.getServletContext().getRealPath("/docs/"+requestURI);
return new FileInputStream(new File(realPath));
}catch (Exception e) {
if(!(e instanceof WebApplicationException)){
//UNEXPECTED EXCEPTION managing it as WebApplicationException
- String error = "Index.jsp not found. Please, contact the support!";
+ String error = requestURI+" not found. Please, contact the support!";
throw ExceptionManager.internalErrorException(req, error, this.getClass(), null);
}
//ALREADY MANAGED AS WebApplicationException
diff --git a/src/main/webapp/WEB-INF/jsp/index.jsp b/src/main/webapp/WEB-INF/jsp/index.jsp
index 44d30cd..df8421c 100644
--- a/src/main/webapp/WEB-INF/jsp/index.jsp
+++ b/src/main/webapp/WEB-INF/jsp/index.jsp
@@ -44,7 +44,7 @@ body {
See API documentation at URI Resolver API