This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Hi My program needs to transfer variables from one servlet to another. The following html page runs a servlet and the results were hyperlinked. when I clik the hyperlinked values it has to open another web page and as well it has to run a servlet. I am giving my coding here.
//the servlet program is here.
The concept of the program is to display a file, viz. text file from the server m/c, giving the correct name. the file name has to check first whether it is file or directory, then if it is available it has to be shown as hyperliknked. after cliking the link the browser has to either download or display the whole file content. [I added UBB CODE tags to your source code to make it more readable. Please try to use them in the future. Learn more about UBB codes here - Ajith ]
[This message has been edited by Ajith Kallambella (edited January 11, 2001).]
Another choice would be to store the variables in the session object (HTTPSession) in the first servlet and retrieve them in the second servlet. Let me know if you need more details. Also I am not sure why you are overriding the service method in your servlet. You should define the doPost method instead. Good Luck, Joe