Step.
This commit is contained in:
parent
f9a13c2b45
commit
722a6b92d0
1 changed files with 13 additions and 5 deletions
|
@ -6,12 +6,20 @@
|
||||||
|
|
||||||
package fr.devinsy.kiss4web;
|
package fr.devinsy.kiss4web;
|
||||||
|
|
||||||
import java.io.*;
|
|
||||||
|
|
||||||
import javax.servlet.*;
|
import java.io.File;
|
||||||
import javax.servlet.http.*;
|
import java.io.FileInputStream;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.PrintWriter;
|
||||||
|
|
||||||
|
import javax.servlet.ServletException;
|
||||||
|
import javax.servlet.ServletOutputStream;
|
||||||
|
import javax.servlet.http.HttpServlet;
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
import fr.devinsy.hico.Hico;
|
|
||||||
import fr.devinsy.util.StringConcatenator;
|
import fr.devinsy.util.StringConcatenator;
|
||||||
|
|
||||||
|
|
||||||
|
@ -299,7 +307,7 @@ public class SimpleServletDispatcher extends HttpServlet
|
||||||
|
|
||||||
if ((!path.endsWith("/")) && (!path.endsWith(".xhtml")))
|
if ((!path.endsWith("/")) && (!path.endsWith(".xhtml")))
|
||||||
{
|
{
|
||||||
path = Hico.instance().webRootPath() + request.getRequestURI();
|
path = getServletContext ().getRealPath("/") + request.getRequestURI();
|
||||||
|
|
||||||
returnInlineFile(response, new File(path), getServletContext().getMimeType(path));
|
returnInlineFile(response, new File(path), getServletContext().getMimeType(path));
|
||||||
logger.info("File returned directly [" + path + "] with mimetype [" + getServletContext().getMimeType(path) + "].");
|
logger.info("File returned directly [" + path + "] with mimetype [" + getServletContext().getMimeType(path) + "].");
|
||||||
|
|
Loading…
Reference in a new issue