Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_jsp thread: Re: how can I write a http file download program with java or jsp


Message #1 by danny_ayers@y... on Sat, 3 Jun 2000 0:29:49
THANK YOU!  I WILL TRY IT.

-----Original Message-----
From: Sebastian Bogaci [mailto:bogaci@p...]
Sent: Wednesday, June 07, 2000 7:58 PM
To: Pro_JavaServer_Pages
Subject: [pro_jsp] Re: how can I write a http file download program with
java or jsp


you have to use the ServletResponse class which enables you to write to the 
http session, forcing a type of the content to be of exe file type.
Fore more delails read the java doc !

here one example:

  public void render()
  {

    response.setContentType("text/plain");
    try
    {
      PrintWriter output = response.getWriter();

      String soutput = "this is an example";
      output.println(soutput);

      }
    }
    catch (IOException ex)
    {
      throw new RuntimeException(ex.getMessage());
    }
  }

---
Wrox Professional Wireless Developer Conference, Amsterdam, July 10-12.
Covering application of WAP, XML, ASP, Java and C++ to wireless computing,
choose from 40+ technical sessions delivered by industry experts:
http://www.wroxconferences.com/ConferenceHome.asp?ConfID=9

  Return to Index