pls help how to open file in a application using jsp

Reply

Join Date: Oct 2007
Posts: 85
Reputation: hidash_in has a little shameless behaviour in the past 
Solved Threads: 0
hidash_in's Avatar
hidash_in hidash_in is offline Offline
Junior Poster in Training

pls help how to open file in a application using jsp

 
0
  #1
Oct 10th, 2007
pls help how to open a file in an application using jsp and it should not open in a browser if possible pls send ur code as soon as possible..
pls help pls help.
Reply With Quote Quick reply to this message  
Join Date: Feb 2006
Posts: 2,384
Reputation: masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of 
Solved Threads: 252
Moderator
masijade's Avatar
masijade masijade is offline Offline
Nearly a Posting Maven

Re: pls help how to open file in a application using jsp

 
0
  #2
Oct 10th, 2007
If it is to be "opened" on the client, you cannot do it in JSP (or actually a bean since that sort of thing would need a scriplet and shouldn't be using scriptlets) as the JSP is executed on the server, obviously, and not on the client where the browser is running. It can be uploaded (at the users request), if all you need is some information out of it, and even downloaded again (at the users request), if it is to be edited, but you cannot open a file on the client machine from the server.
Java Programmer and Sun Systems Administrator

----------------------------------------------

Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
Reply With Quote Quick reply to this message  
Join Date: Oct 2007
Posts: 85
Reputation: hidash_in has a little shameless behaviour in the past 
Solved Threads: 0
hidash_in's Avatar
hidash_in hidash_in is offline Offline
Junior Poster in Training

Re: pls help how to open file in a application using jsp

 
0
  #3
Oct 11th, 2007
pls then how can i do that is there any alternative way to do this.
i want to open a word file in the word application using jsp. when i am clicking the button the word file should open and it should not open in the browser. i am using tomcat server to run the program.
if u have any idea send the code pls pls
Reply With Quote Quick reply to this message  
Join Date: Feb 2006
Posts: 2,384
Reputation: masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of 
Solved Threads: 252
Moderator
masijade's Avatar
masijade masijade is offline Offline
Nearly a Posting Maven

Re: pls help how to open file in a application using jsp

 
0
  #4
Oct 11th, 2007
Once again, if the file is coming from your server, all you can do is set the mime type and stream the data, the browser will decide how to display it. If the file already exists on the client, than you can't do anything with it, whatsoever, in a JSP as it (the JSP) is on the server. You cannot control how the file is displayed. The browser does that.
Last edited by masijade; Oct 11th, 2007 at 7:30 am.
Java Programmer and Sun Systems Administrator

----------------------------------------------

Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC