Though that will only work when your servlet container is configured
to have access to that directory as one to serve files from, right?

Eelco


On 5/6/06, Timo Stamm <[EMAIL PROTECTED]> wrote:
Igor Vaynberg schrieb:
> so what you need is something that maps to some url and when invoked
> streams
> the image back to the user.
>
> i see two possible ways to do this
>
> one:
> use a separate servlet to do this

public class WeblibServlet extends HttpServlet {

   private static final String base =
      "/WEB-INF/classes/META-INF/admin/weblib";

   public void doGet(HttpServletRequest request,
       HttpServletResponse response)
       throws IOException, ServletException {
     String p = base + request.getPathInfo().replace("..", "");
     RequestDispatcher d = getServletContext().getRequestDispatcher(p);
     if (d != null) {
       d.forward(request, response);
     }
   }

   public void doPost(HttpServletRequest request,
       HttpServletResponse response)
       throws IOException, ServletException {
     doGet(request, response);
   }
}



-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user



-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to