added path info
git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/data-transfer/uri-resolver@174038 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
26d3704575
commit
b618fc0e47
|
@ -10,7 +10,6 @@ import java.io.InputStream;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.ws.rs.GET;
|
import javax.ws.rs.GET;
|
||||||
import javax.ws.rs.Path;
|
import javax.ws.rs.Path;
|
||||||
import javax.ws.rs.PathParam;
|
|
||||||
import javax.ws.rs.Produces;
|
import javax.ws.rs.Produces;
|
||||||
import javax.ws.rs.core.Context;
|
import javax.ws.rs.core.Context;
|
||||||
import javax.ws.rs.core.MediaType;
|
import javax.ws.rs.core.MediaType;
|
||||||
|
@ -25,15 +24,15 @@ import org.slf4j.LoggerFactory;
|
||||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||||
* Oct 22, 2018
|
* Oct 22, 2018
|
||||||
*/
|
*/
|
||||||
@Path("")
|
@Path("/")
|
||||||
public class UriResolverIndex {
|
public class UriResolverIndex {
|
||||||
|
|
||||||
private static Logger logger = LoggerFactory.getLogger(UriResolverIndex.class);
|
private static Logger logger = LoggerFactory.getLogger(UriResolverIndex.class);
|
||||||
|
|
||||||
@GET
|
@GET
|
||||||
@Produces({MediaType.TEXT_HTML})
|
@Produces({MediaType.TEXT_HTML})
|
||||||
@Path("{toInfo:(index|info)?")
|
@Path("index")
|
||||||
public InputStream index(@Context HttpServletRequest req, @PathParam("toInfo") String info){
|
public InputStream index(@Context HttpServletRequest req){
|
||||||
|
|
||||||
String indexFile = "/WEB-INF/jsp/index.jsp";
|
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);
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue