On Sep 25, 2012, at 8:46 PM, Ray Collins wrote: > I am using Tomcat7.0. The web application I created executes a script from > the command line using Runtime.getRuntime(). This script sends an http: > request to another server that is on the local network. For Some > reason the script executes as if it has sent the http request but it really > has not. Its like Tomcat is operating in a sandbox when it comes to > accessing this URL on my local network.
The JVM, if using a security manager, could prevent you from calling Runtime.getRuntime(), but if that happened you'd see a SecurityException. Once you start the script, it is executing outside of the JVM. > I am using Ubuntu Server 12.04. If i run the script manually from the command > line the script can access > the URL with no problem. Why cant the script that tomcat has executed > access this resource. The first thing that comes to mind would be permissions. If the script runs from the command line, it would run as your user. If it is run through the JVM and Tomcat, it'll run as the user that is running Tomcat. Have you tried logging in as the user that is running Tomcat and executing the script? Dan > Any help is greatly appreciated. > > Ray --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org