Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. sulfur

    JSP/Servlet redirect problem...

    sendRedirect() & forward() will both work. Redirect will cause an extra round trip call. idarke: If you want to send 1 file instead of 3, I imagine you can zip it up on the fly & then call forward(). palbano: Writing directly to ServletOutputStream (thanks idarke, I totally forgot I can do...
  2. sulfur

    JSP/Servlet redirect problem...

    Excellent! This is exactly what I wanted. Thank you! I was doing: response.sendRedirect(exeFile); instead of writing the file contents directly to the response output stream as in your example. Naturally my redirect causes the browser to make a new request to the server for that file...
  3. sulfur

    JSP/Servlet redirect problem...

    Oops I left out the most important part of the question: response.sendRedirect(location) works as long as the temp file is somewhere under my /context, eg https://hostname/myapp/temp/tempfile.zip However, for security reasons I rather generate the temp files in either a) java.io.tmpdir, (eg...
  4. sulfur

    JSP/Servlet redirect problem...

    Hi all, I am trying to implement the exact same thing as above. I have a JSP that submits a query & a Servlet that creates a temp CSV file. My question is, how do I send this back to the return view & if possible, automatically popup a SaveAs Dialog? Code samples will be greatly appreciated...

Part and Inventory Search

Back
Top