This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
I need to make a jsp in which I have to provide links to various java applications.
Is it possible to define the link in such a way that the application associated with that link is executed on clicking the link?
Depending on your actual needs it may just be easiest to exec them... this strikes me as an odd way to go about this, but it's hard to say with not much info to go on.
Joined: Dec 02, 2008
I have got jars created for various applications which are normally run via command prompt. I want to provide the user easy access to these applications by providing links for these in a web page. Is it possible to execute such an application(in jar form or otherwise) through a jsp?
Add a servlet to execute your jars, use the java ProcessBuilder class. Your jsp can either send the servlet the actual text to execute (massive security hole) or a description of the 'jar' it needs to execute and have the servlet construct the actual command to execute eg java -jar command. As the commands you are executing are actually java it does beg the question as to why you don't just link use them directly ??
"Eagles may soar but weasels don't get sucked into jet engines" SCJP 1.6, SCWCD 1.4, SCJD 1.5,SCBCD 5