src/de/uhilger/wbx/web/FilterServletOutputStream.java | ●●●●● patch | view | raw | blame | history | |
src/de/uhilger/wbx/web/MdServlet.java | ●●●●● patch | view | raw | blame | history | |
src/de/uhilger/wbx/web/TNServlet.java | ●●●●● patch | view | raw | blame | history | |
src/de/uhilger/wbx/web/TestServlet.java | ●●●●● patch | view | raw | blame | history | |
src/de/uhilger/wbx/web/ViewServlet.java | ●●●●● patch | view | raw | blame | history |
src/de/uhilger/wbx/web/FilterServletOutputStream.java
@@ -22,7 +22,6 @@ import java.io.OutputStream; import javax.servlet.ServletOutputStream; import javax.servlet.WriteListener; //import javax.servlet.WriteListener; /** * @@ -48,20 +47,16 @@ stream.write(b,off,len); } //@Override public boolean isReady() { // was ist hier zu tun... return true; } //@Override public boolean isReady() { // was ist hier zu tun... return true; } //@Override //public void setWriteListener(WriteListener writeListener) { // was ist hier zu tun.. //} @Override public void setWriteListener(WriteListener writeListener) { //was ist hier zu tun.. } @Override public void setWriteListener(WriteListener wl) { // TODO: Implement } } src/de/uhilger/wbx/web/MdServlet.java
@@ -25,9 +25,9 @@ import java.util.logging.Logger; import javax.servlet.ServletException; import javax.servlet.ServletOutputStream; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.catalina.servlets.DefaultServlet; /** * Das MdServlet fügt dem DefaultServlet von Tomcat @@ -43,7 +43,7 @@ * * TODO: Stylesheets dynamisch einbinden */ public class MdServlet extends DefaultServlet { public class MdServlet extends HttpServlet { private static final Logger logger = Logger.getLogger(MdServlet.class.getName()); private static final String HOME_CTX = "/home"; src/de/uhilger/wbx/web/TNServlet.java
@@ -23,10 +23,10 @@ import java.net.URLDecoder; import java.util.logging.Logger; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import net.coobird.thumbnailator.Thumbnails; import org.apache.catalina.servlets.DefaultServlet; /** * Mit dem TNServlet kann für eine Bilddatei eine @@ -36,7 +36,7 @@ * Unterstuetzt werden die Varianten * 120 (_tn), 240 (_kl), 500 (_dd), 700 (_mt), 1200 (_gr) */ public class TNServlet extends DefaultServlet { public class TNServlet extends HttpServlet { private static final Logger logger = Logger.getLogger(TNServlet.class.getName()); @@ -93,7 +93,7 @@ // --- Logausgabe Ende if(uriStr.endsWith(JPG) || uriStr.endsWith(JPEG) || uriStr.endsWith(PNG)) { File dir = new File(request.getServletContext().getRealPath("/")); File dir = new File(request.getSession().getServletContext().getRealPath("/")); String suburiStr = uriStr.substring(request.getContextPath().length()); File imgfile = new File(dir, suburiStr); if(uriStr.contains(TN)) { src/de/uhilger/wbx/web/TestServlet.java
@@ -52,7 +52,7 @@ out.println("<h1>Servlet TestServlet at " + request.getContextPath() + "</h1>"); // hier kommt veraenderlicher Inhalt ServletContext ctx = request.getServletContext(); ServletContext ctx = request.getSession().getServletContext(); Object o = ctx.getAttribute("filebase"); String base; if(o instanceof String) { src/de/uhilger/wbx/web/ViewServlet.java
@@ -26,9 +26,9 @@ import javax.naming.NamingException; import javax.servlet.ServletException; import javax.servlet.ServletOutputStream; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.catalina.servlets.DefaultServlet; /** * Das ViewServlet fügt dem DefaultServlet von Tomcat @@ -39,7 +39,7 @@ * * TODO: Stylesheets dynamisch einbinden */ public class ViewServlet extends DefaultServlet { public class ViewServlet extends HttpServlet { private static final Logger logger = Logger.getLogger(ViewServlet.class.getName()); private static final String HOME_CTX = "/home";