cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Romain Slootmaekers <rom...@inuron.com>
Subject Re: map:read options
Date Mon, 14 Jan 2008 15:23:58 GMT
Reinhard Poetz wrote:
>
> Where *exactly* do you want to put the file? Should it become part of 
> the web application or is it located outside?
>

the file needs to be outside the .war and either relative to current.dir 
(from where the servlet runner got launched) or configurable from 
outside the sitemap.

right now I have a little servlet:
public class LittleServlet extends HttpServlet {
  
    public void doGet(HttpServletRequest request, HttpServletResponse 
response)
            throws IOException, ServletException {
        response.setContentType("application/octet-stream");
        String path = System.getProperty("where");
        File f = new File(path);
        FileInputStream fin = new FileInputStream(f);
        // copy fin into response.getOutputStream();
        fin.close();

    }

}

which does the trick,
but I would like to to something similar using map:read

Romain.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message