Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_java_server thread: Text file saving problem


Message #1 by Deepak Kapur <kapur_deepak@y...> on Mon, 27 May 2002 02:48:48 -0700 (PDT)
This is a multipart message in MIME format.
--=_alternative 00378F92C1256BC6_
Content-Type: text/plain; charset="us-ascii"

Probably specific solution: saving is done via .DLL  (Don't know which). 
Maybe in combination with USER.EXE it's doable to do it right-a-way.






Deepak Kapur <kapur_deepak@y...>
05/27/2002 11:48 AM
Please respond to "Java Server"

 
        To:     "Java Server" <pro_java_server@p...>
        cc: 
        Subject:        [pro_java_server] Text file saving problem


Hi,
I need to generate a text file from database on my server and send it to 
user, for which I need IE to pop up a "save as" window.
But when i point the URL to the file, it being a Text file (abc.txt) IE 
opens (displays contents) it in the window.
I know user can go and save via the browser (File...SaveAs) , but is there 
a way when from server itself I can ensure, it will not be opened in the 
page, but instead a "save as" box will be displayed.
Thanks in advance
Deepak
P.S.  If following details are of any help .........
page1
..............
< form .....   http://.............../download target="_blank">
..............
---------------
download class
{
targetFileName = generate file from database and store it at specified 
path
String s= response.encodeRedirectURL("http://serverAddress.................../"+specifiedPath+"\\"+targetFileName);
response.sendRedirect(s);
}
With all this activity, it opens a new window and displays the required 
text file in IE, but does not directly pop up the save as window.

Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup --- 
http://p2p.wrox.com/manager.asp or 



  Return to Index