0

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.

2
Contributors
3
Replies
4
Views
10 Years
Discussion Span
Last Post by masijade
0

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.

0

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

0

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.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.