RE: Is System Call can be invoked in the Servlet Container

2003-07-14 Thread Ke Song
John,
Thanks a lot for your prompt help. The point that I wanted to find out is if there is 
restriction on invoking system call on Servlet container or other J2EE app server. My 
senario is : My servlet will load a native library via JNI, the native code has system 
calls. It seems that the system call is not working(it's working if I load it in a 
standalone java application). So i am wondering if there is restriction on invoking 
system calls in the servlet container.  I searched specification doc on Servlet and 
J2EE, not able to find related topic. If anybody has any point, please share with me.

Thanks,
Ke

-Original Message-
From: John Turner [mailto:[EMAIL PROTECTED]
Sent: Monday, July 14, 2003 12:14 PM
To: Tomcat Users List
Subject: Re: Is System Call can be invoked in the Servlet Container



String command = new String();
command = "put your system call here";
java.lang.Process process = java.lang.Runtime.getRuntime().exec(command);
process.waitFor();
if (process.exitValue() != 0)
{
 throw new Exception("My System call did not work! Exit value = " + 
process.exitValue() );
}

John

On Mon, 14 Jul 2003 12:15:46 -0700, Ke Song <[EMAIL PROTECTED]> wrote:

> Hi,
> Is System Call allowed in the Servlet Container? Please help.
>
> Thanks.
> Ke
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-- 
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Is System Call can be invoked in the Servlet Container

2003-07-14 Thread Ke Song
Hi,
Is System Call allowed in the Servlet Container? Please help.

Thanks.
Ke


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



JNI and Servlet

2003-07-10 Thread Ke Song


Hi, I have an Java Application that access native library via JNI. The JNI native code 
opens a file and retrieve some info from the file. The application works properly in 
stand alone mode. However, when I run it as a Servlet, the native code is not able to 
find that file in the specified path. 

Anybody has any clue about what could be done to fix this?

thanks.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]