Log In
Developer Network
Technologies
Join the Network
Member Services
Events & Community
Application eXtension Platform (AXP) Developer Center
Overview
Community
Wiki
Message Boards Home
Recent Posts
Statistics
Answer
(
Unmark
)
Mark as an Answer
« Back to Technical Questions
Tomcat invoking shell commands problem
Threads [
Previous
|
Next
]
Post New Thread
Paulo Centeno
Posts:
20
Join Date:
7/8/08
Recent Posts
Tomcat invoking shell commands problem
Answer
7/16/09 12:19 AM
Mark as an Answer
Submit
Reply with Quote
Quick Reply
Hello
I'm trying to write a tomcat web application which executes shell commands, like "ls", or something.
But when the "process" comand invokes any shell command, the command is not executed and no exception is thrown.
This is the Tomcat log:
53325 [http-8080-Processor25] INFO (Command to be executed) - Cmd: ls -la /bin/
53363 [http-8080-Processor25] INFO (Command input stream) - None
53364 [http-8080-Processor25] INFO (Command error stream) - None
For testing purposes, I wrote a pure java application, calling the same shell commands, and it works OK. All commands are correctly executed.
I'm using sun java 1.5.0.15 and Tomcat bundled with AXP.
Any ideas?
Thanks in advance
Sign in to vote.
Flag
Please sign in to flag this as inappropriate.
Top
Jasmine Joyce Kalaiselvan
Posts:
84
Join Date:
5/21/08
Recent Posts
RE: Tomcat invoking shell commands problem
Answer
7/15/09 4:36 PM as a reply to Paulo Centeno.
Mark as an Answer
Submit
Reply with Quote
Quick Reply
How you created the dependency for Java? Did you package it along with your application and then included Tomcat in your package as dependency?
Sign in to vote.
Flag
Please sign in to flag this as inappropriate.
Top
Paulo Centeno
Posts:
20
Join Date:
7/8/08
Recent Posts
RE: Tomcat invoking shell commands problem
Answer
7/16/09 12:18 AM as a reply to Jasmine Joyce Kalaiselvan.
Mark as an Answer
Submit
Reply with Quote
Quick Reply
Yes, I packaged it and included java as a dependency.
I've been trying diferent memory sizes, and I think this was my problem.
I increased --disk-limit parameter from 400M to 800M, and -memory-limit parameter from 100M to 256M and things started working...
Sign in to vote.
Flag
Please sign in to flag this as inappropriate.
Top
Quick Reply