Re: Using java.io in WebObjects in deployment...???
Re: Using java.io in WebObjects in deployment...???
- Subject: Re: Using java.io in WebObjects in deployment...???
- From: Robert Walker <email@hidden>
- Date: Thu, 10 Feb 2005 11:52:19 -0500
WebObjects deployment does not run as root to my understanding. I believe it runs as appserver user.
On Feb 9, 2005, at 6:34 PM, Clint Fleetwood wrote:
Can you not properly use the java.io package in WO in a deployment environment because it works perfectly when i build and run in development mode....here's a snippet of what I'm doing; one of my components calls on this class: Everything works fine even the ERXRuntimeUtilites and the writing out of the file in development mode but when I setup the application in JavaMonitor and then hit it on the web. Neither the writing of the file and ERXRuntimeUtilities does ANYTHING ! I don't get it. Does it have something to do with the user that JavaMonitor uses to start up the app because I am running wotaskd and JavaMonitor with the root user but i figured if the app is being run by the root then it CERTAINLY shouldn't have a probelm writing out that file. What's up ?? Also, everything works great if I startup the app from the command line. ONLY when setup through JavaMonitor does it NOT work. ?????
import java.util.StringTokenizer;
import java.io.*;
import com.webobjects.foundation.*;
import com.webobjects.eocontrol.*;
import er.extensions.*;
public class UpdatePti {
public static String file="/Volumes/PTI/UPDATE.DAT";
public static String completeLine;
public void createUpdate(String unitNumberToPTI, Number gateCodePTICollect, String userNameToPTI, String statusToPTI) {
String gateCodeToPTI = gateCodePTICollect.toString();
try {
FileWriter fw = new FileWriter (file);
PrintWriter outfile = new PrintWriter (fw);
completeLine = unitNumberToPTI + gateCodeToPTI + userNameToPTI + statusToPTI;
System.out.println(completeLine);
outfile.println(completeLine);
outfile.close();
}
catch (IOException exception) {
System.out.println (exception);
}
String[] commands = new String[]{"java RunComClient"};
String[] envp = new String[]{"PATH=/usr/bin"};
File dir = new File("/Users/admin/Documents/RMI");
ERXRuntimeUtilities erxRun = new ERXRuntimeUtilities();
try {
erxRun.executeCommandLineCommandsWithEnvVarsInWorkingDir(commands, envp, dir);
}
catch (IOException ioe) {
System.out.println("caught at erx runtime");
}
}
} _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
--
Robert Walker
Bennett Technology Group
(770) 957-1866 Ext: 790
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden