This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Servlets and the fly likes accessing classes to make system calls as a certain user(ie not apache) on solaris Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Servlets
Reply Bookmark "accessing classes to make system calls as a certain user(ie not apache) on solaris" Watch "accessing classes to make system calls as a certain user(ie not apache) on solaris" New topic
Author

accessing classes to make system calls as a certain user(ie not apache) on solaris

Brendan Kennedy
Ranch Hand

Joined: May 02, 2001
Posts: 65
Hello
Basically what I want to do is write a servlet that outputs a wml page that will tell me if I have new mail or not. The problem is that all servlets are run as the apache user instead of as me so all processes will be run as apache processes, ie 'frm -S -q' will say whether apache has been mailed anything and not me.
To solve this I do not wish to save the relavent information to a file and have apache access the file, I want the servlet to pass a string to a class run by my account and this class will return a string with the proper results. I do not have access to sockets on the system, but the class wouldn't really be remotely accessed anyway.
What I want to know is the way(if there is one) to comunicate between classes if they're not compiled together or part of the same package or even owned by the same user. I've looked at using Objectoutput/inputstream but it seems to use an intermediary socket which I don't have access to.

Thanks,
Brendan
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12271
    
    1
I don't know how you can fool the system but why not use the Java Mail API to talk to the mail server?
Bill
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: accessing classes to make system calls as a certain user(ie not apache) on solaris
 
Similar Threads
A small doubt
information exchange by unrelated classes owned by different users
Process Watching
ConnectionFactoryImpl contains instance of Data or RemoteDataObject?
Validity/License Checker for Applications