Using java.io in WebObjects in deployment...???
Using java.io in WebObjects in deployment...???
- Subject: Using java.io in WebObjects in deployment...???
- From: Clint Fleetwood <email@hidden>
- Date: Wed, 9 Feb 2005 18:34:34 -0500
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