Hi all.. I need to know how to use DownloadServlet.. I tried to implement it but i don't understand how to continue the code.. here my implementation
-- public class DownloadServlet extends HttpServlet{ protected void doGet( HttpServletRequest req, HttpServletResponse resp ) throws ServletException, IOException { String fileName = req.getParameter( "fileInfo1" ); int BUFFER = 1024 * 100; resp.setContentType( "application/octet-stream" ); resp.setHeader( "Content-Disposition:", "attachment;filename=" + "\"" + fileName + "\"" ); ServletOutputStream outputStream = resp.getOutputStream(); resp.setContentLength( Long.valueOf( getfile(fileName).length() ).intValue() ); resp.setBufferSize( BUFFER ); //Your IO code goes here to create a file and set to outputStream// } }what do i need now??.. Thanks in advance Davide You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.
No comments:
Post a Comment