diff --git a/src/main/java/org/gcube/datatransfer/resolver/services/UriResolverIndex.java b/src/main/java/org/gcube/datatransfer/resolver/services/UriResolverIndex.java index bff0918..7b71c5b 100644 --- a/src/main/java/org/gcube/datatransfer/resolver/services/UriResolverIndex.java +++ b/src/main/java/org/gcube/datatransfer/resolver/services/UriResolverIndex.java @@ -10,7 +10,6 @@ import java.io.InputStream; import javax.servlet.http.HttpServletRequest; import javax.ws.rs.GET; import javax.ws.rs.Path; -import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import javax.ws.rs.core.Context; import javax.ws.rs.core.MediaType; @@ -25,15 +24,15 @@ import org.slf4j.LoggerFactory; * @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it * Oct 22, 2018 */ -@Path("") +@Path("/") public class UriResolverIndex { private static Logger logger = LoggerFactory.getLogger(UriResolverIndex.class); @GET @Produces({MediaType.TEXT_HTML}) - @Path("{toInfo:(index|info)?") - public InputStream index(@Context HttpServletRequest req, @PathParam("toInfo") String info){ + @Path("index") + public InputStream index(@Context HttpServletRequest req){ String indexFile = "/WEB-INF/jsp/index.jsp"; @@ -47,5 +46,19 @@ public class UriResolverIndex { } } + + @GET + @Produces({MediaType.TEXT_HTML}) + @Path("info") + public InputStream info(@Context HttpServletRequest req){ + return index(req); + } + +// @GET +// @Produces({MediaType.TEXT_HTML}) +// @Path("") +// public InputStream emptyPath(@Context HttpServletRequest req){ +// return index(req); +// } }