• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

how to invoke a shell script from a html form

 
Ranch Hand
Posts: 321
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a reqirement in my project where I need to invoke a shell script from a html form and then forward this to a java application.The java application will validate the same by comparing it to the form data with entries in an file.Accordingly it will write to another file,the output has to be read by the shell script which activated the java application and dispaly it to the browser as a html page.
Please help me with the same and if supported by a code example it would be good.Calling all the Unix gurus...
 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My advice here would be to be VERY careful. There are MASSIVE problems with running a shell script based upon user input, ESPECIALLY while running from an anonymous external interface. (You can, literally, get hacked in seconds to minutes).
Why not, instead, use a servlet to accept the user input and do everything in the servlet instead of doing some sort of shell/java program combination?
Just my $0.02.
 
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i am sorry as i am reopening the topic after a long interval.

In my shell script, i am going to stop the jBoss server.
can anyone please help me out in calling the shell script from the JSP to stop the JBOSS??

Thanks in advance.
 
Saloon Keeper
Posts: 27762
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
http://faq.javaranch.com/java/DontWakeTheZombies

As I recall, there's an administration web page in JBoss that can shut down the JBoss server directly.
 
Abhishek Mhptr
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thank you so much for the reply tim..

i am sorry as i reopened the thread.

Actually i have a JSP in my UserInterface where i get and post data from database.
i need to give an option(tab or button) for the client to stop the server form the JSP.

please help me out in resolving the issue.

Thanks in advance.
 
It's a tiny ad. At least, that's what she said.
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic