• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Using java.io in WebObjects in deployment...???
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using java.io in WebObjects in deployment...???


  • Subject: Re: Using java.io in WebObjects in deployment...???
  • From: Doug Andrews <email@hidden>
  • Date: Thu, 10 Feb 2005 15:18:07 -0500

You'll need to be writing your file somewhere where "appserver" has permissions to do so.
If you absolutely need to run as root in deployment (which is not recommended), then change the group to "wheel" and the user to "System" on the following two files:


/System/Library/WebObjects/JavaApplications/wotaskd.woa/wotaskd

/System/Library/WebObjects/JavaApplications/wotaskd.woa/Contents/ Resources/javawoservice.sh


On Feb 10, 2005, at 11:52 AM, Robert Walker wrote:

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:
email@hidden


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:
email@hidden


This email sent to email@hidden

_______________________________________________ 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
  • Follow-Ups:
    • Re: Using java.io in WebObjects in deployment...???
      • From: Clint Fleetwood <email@hidden>
References: 
 >Using java.io in WebObjects in deployment...??? (From: Clint Fleetwood <email@hidden>)
 >Re: Using java.io in WebObjects in deployment...??? (From: Robert Walker <email@hidden>)

  • Prev by Date: Re: [OT] Java Programm for creating map with geodata
  • Next by Date: Old version deployed
  • Previous by thread: Re: Using java.io in WebObjects in deployment...???
  • Next by thread: Re: Using java.io in WebObjects in deployment...???
  • Index(es):
    • Date
    • Thread