Hi;

in my servlet I am trying to run a dos application which take  two
string  as parameters(one as source file string and the other as the
file destination string). the destination file is laid in the dos
application. it seems the dos application is not permitted to write  in
 in  tomcat temp directory

is there a way I can change this ( NT 4 + apache + tomcat) ?

thanks for any hint

Mohammed

a snippet of code:

tomcat_tempdir =
(getServletContext().getAttribute("javax.servlet.context.tempdir")).toString();

Cfile= tomcat_tempdir +"\\"+ "X"+ cooks[0].getValue()+ ".stl";
 fileb =  tomcat_tempdir + "\\"+ cooks[0].getValue()+ ".stl";
System.out.println(" I try to run mesh");
         Runtime runtime=Runtime.getRuntime();
             // String command[]={"mesh", "-f", "-b",Cfile,fileb};
          String command = "mesh" + " " + "-f" + " " + "-b"+ " " + Cfile

+ " " +fileb;
          System.out.println( " command is " + command);
          try{
          Process myprocess =runtime.exec(command);
           int myint = myprocess.waitFor();
          System.out.println("waitFro() reurned :"+ myint);
          }
           catch (InterruptedException e){
          System.out.println("InterruptedException" + e);

          }

___________________________________________________________________________
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

Reply via email to