For a specific Application on the server we have a java code that brings up the documents and stores them on the server. This is a plain java code which we are putting under a button. This code is being executed when a client clicks on the button from a browser.
Now In this code we want to add a specific functionality to open up the document to be viewed for the client.
Any ideas on how this can be achieved just by a plain java code?
You might want to specify what technologies (architecture) you are using if you want help. For example, are you using applets, JSP, JSF? What do you have on the back end, a servlet? When you say you want the user to open it up, using what? In a browser, as a pdf file, using the client's Microsoft Word application? Saying youi want to use 'plan java code' doesn't provide enough information to help you.