[Home] [By Thread] [By Date] [Recent Entries]

  • To: xml-dev <xml-dev@l...>
  • Subject: saving xml file into local disk using jsp
  • From: Seetha Rama Krishna <ram_kurra@y...>
  • Date: Mon, 5 Jun 2006 16:41:07 +0100 (BST)
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.co.in; h=Message-ID:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=R7F1TlWryeYIjvsnOSlsFyBGdusaelClYNMHxhQcXoHYJMgeK4YRlPWnA78yBysEMe5ZzaALZrTvHw8dEK6FUBksc+LjNEmB6/Ea+2C+n3Xt4l0vJPSvVSq4kK/twUkQIfOBFKxFZKJlHAWsa1cQtSbLx5lUs+0lvR5ccQtfT50= ;

Hi Techies,
           I am creating the xml file from jsp and  generation of xml is working fine for me.
       Now the  query is    How can I point out the location of local machine??
   Here is my code

String locationAndBackupFileName =request.getParameter("locationAndNameOfBackupFile");
System.out.println("Location"+locationAndBackupFileName);
StringWriter stringOut = new StringWriter();
XMLSerializer serial = new XMLSerializer(stringOut, new OutputFormat("xml", "UTF-8", true));
response.setContentType("application/xml");
response.setHeader("Content-Disposition","attachement; filename="+locationAndBackupFileName);
serial.setOutputCharStream(new FileWriter(locationAndBackupFileName));

serial.serialize(document.getDocumentElement());
when I xcute my code I am getting download dialog box, with save option.
    But after downloading no data is available.
   Can u guys help me to fix this problem




regards,
ramu

Send instant messages to your online friends http://in.messenger.yahoo.com

Stay connected with your friends even when away from PC. Link: http://in.mobile.yahoo.com/new/messenger/


Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member