Quoting "Cooremans, Rony" <[EMAIL PROTECTED]>: > res.setHeader("Content-Disposition","inline; filename="+fileName);
It was something like this, but I don't think I used 'inline'. I think I used: res.setHeader("Content-Disposition","attachment; filename="+fileName); > For html files , the filename always becomes servletname.html I never used it for HTML. I always used a FilePath when I call a Servlet. For instance: - ServletZone: 'sa' - Servlets: 'PuntenInbreng' and 'Deliberatie' http://studadm.rug.ac.be/sa/PuntenInbreng/welkom.html http://studadm.rug.ac.be/sa/PuntenInbreng/lijst.html http://studadm.rug.ac.be/sa/PuntenInbreng/toevoegen.html http://studadm.rug.ac.be/sa/Deliberatie/welkom.html http://studadm.rug.ac.be/sa/Deliberatie/bereken.html So I organized my Servlet following the Functional needs of the clients. 'PuntenInbreng' to enter grades and 'Deliberation' to calculate grades. Within each Servlet, I had different 'pages'. I examined the FilePath in the doGet or doPost and I had 1 method per page. > For pdf's it becomes the last part of the url That's why some people add the filename as part of the querystring so that the browser is fooled to believe that IS the filename. > I ll try the web.xml solution as soon as i solve some other bugs I'm teaching XML in Brussels next thursday and friday. I'll try to make a filter example in the weekend where you can ask http://myserver.com/servlets/mypage.pdf http://myserver.com/servlets/mypage.html With a filter that reads mypage.xml and converts it instantly to a pdf or html file depending on the extension asked by the user. Bruno _______________________________________________________________ Have big pipes? SourceForge.net is looking for download mirrors. We supply the hardware. You get the recognition. Email Us: [EMAIL PROTECTED] _______________________________________________ iText-questions mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/itext-questions