Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java and JDK > JSP Basics
|
JSP Basics Beginning-level questions on JSP. More advanced coders should post to Pro JSP.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the JSP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 13th, 2006, 04:18 AM
Registered User
 
Join Date: Oct 2005
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default Run unix command throu a jsp page

Hi all,

i have a jsp page . and on click of a button want to execute the unix shell script.
this shell script will takes it's argument from the jsp page.

how can i do this.

please provide me the solution.


Vinay Kr.Gupta
 
Old July 20th, 2006, 07:07 AM
Registered User
 
Join Date: Jul 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi!

I have the same problem. Do you resolve it? Any idea?

Thanks in advances.
Lei

 
Old July 20th, 2006, 07:01 PM
Friend of Wrox
 
Join Date: Jan 2006
Posts: 198
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Guys,

Look at http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Runtime.html#exec(java.lang.String)

However, I HIGHLY RECOMMEND AGAINST allowing users to specify parameters that determine what programs to run, or what parameters to pass the programs. You should be extremely careful that people don't include special characters, such as semicolons, that could cause them to execute arbitrary commands. The best way to guard against security attacks is to only allow specific argument IDs in your URLs, which are then translated into specific commands in Java.

Jon Emerson
http://www.jonemerson.net/





Similar Threads
Thread Thread Starter Forum Replies Last Post
Run from command line with arguments bdancis Excel VBA 4 June 21st, 2012 12:47 PM
Help-Implementing a unix shell to run commands ssimkhan Java Basics 1 June 15th, 2007 06:43 AM
Help-Implementing a unix shell to run commands ssimkhan Pro Java 0 June 7th, 2007 04:58 AM
-s command in Unix crmpicco Linux 4 November 28th, 2006 12:10 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.