Rajesh:
There's actually a way to directly determine if a certain directory exists
from within Java (have a look in the java.io.File for the isDirectory()
method), but if you want to do it with an os call, there's a little class
called "OSProcess" in our expresso framework that will run any arbitrary
command line, wait until a certain timeout for it to return (in case the
command hangs), and tell you the return value.
If that's what you need, feel free to download the framework at
http://www.javacorporate.com. Also, the javadoc is online at
http://www.javacorporate.com/javadoc/index.html
We've just put out a new release that fixes a few bugs as well, version
1-01b
Mike
Javacorporate Ltd
> -----Original Message-----
> From: A mailing list for discussion about Sun Microsystem's
> Java Servlet
> API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of
> Rajesh Kumar
> Sent: Thursday, August 26, 1999 1:27 AM
> To: [EMAIL PROTECTED]
> Subject: How to get a return value from unix to servlet?
>
>
> Hi List,
> I would like to get the boolean value by executing a unix command
> (ie. ls -ld servlets)
> on a solaris machine through a servlet.
> SAY :
> If "servlets" directory exists then the boolean value is TRUE,
> otherwise FALSE.
>
> Executing a unix command through servlets is OK. But how
> can I get
> the boolean result by
> just executing a unix command?
> Any suggestions/code snippet?
>
> Thanks in Advance
> Rajesh Kumar.
>
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html