LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 12-20-2011, 10:46 AM   #1
msoumyajit
LQ Newbie
 
Registered: Dec 2011
Posts: 1

Rep: Reputation: Disabled
Question running shell scripts by taking command line arguments in a jsp page


Hi,
I am executing a shell script from a jsp page. I would like to know is there any way I can pass arguments to this shell script through jsp code.

Runtime r=Runtime.getRuntime();
Process p=null;
String cmd="/usr/soumy/example.sh";
String UserName=request.getRemoteUser();
String HostName=request.getRemoteHost();
String HostAddress=request.getRemoteAddr();
try{
p=r.exec(cmd);
%>

Thanks,
Soumyajit
 
Old 12-21-2011, 06:41 AM   #2
Reuti
Senior Member
 
Registered: Dec 2004
Location: Marburg, Germany
Distribution: openSUSE 11.4
Posts: 1,319

Rep: Reputation: 252Reputation: 252Reputation: 252
Just adding them to the command string you assign is not working?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Taking command arguments from serial port into shell script warwick Linux - Software 6 06-13-2011 01:29 AM
[SOLVED] ? running shell script taking command line arguments in a jsp page? etika Linux - Newbie 1 02-11-2011 01:26 AM
Nautilus-connect-server taking arguments from command line? snowman81 Linux - Software 1 07-06-2010 10:25 AM
running sh scripts from csh command line casperdaghost Linux - Newbie 6 04-22-2010 05:12 AM
number of command line arguments to shell u4u Linux - General 1 03-04-2005 06:09 PM


All times are GMT -5. The time now is 05:31 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration