| | |
pls help how to open file in a application using jsp
Please support our JSP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
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
----------------------------------------------
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
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
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
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
----------------------------------------------
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
![]() |
Similar Threads
- i need source code for online examination application in jsp (JSP)
- Doubleclick to open file. (C#)
- Can seem to open my file (C++)
- open a file and divide its data in arrays (C)
- I have an "open with" problem...can someone help? (Windows NT / 2000 / XP)
- Open any file and List. (Visual Basic 4 / 5 / 6)
- Cannot open file : a (Windows 95 / 98 / Me)
Other Threads in the JSP Forum
- Previous Thread: Configuring ApacheTomcat
- Next Thread: JSP and class file help!
| Thread Tools | Search this Thread |
apache backbutton combobox connection database development directorystructure dynamicpagetitles eclipse frames glassfish ie8 imagetodatabse imageupload integer internet java javaee javascript jsf jsp jsppagetitles levels mvc2 mvcmodel2 network parameters passing ping printinserverinsteadofclient redirect request.getparameter response servlet servletdopost()readxml sessions software ssl state_saving_method stocks sun tomcat tutorial update video web






