Hi all friends, I am running Tomcat4.1.24 as a NT service.And I have created it through below batch file:- tomcat -install "Apache Tomcat" "C:\jdk1.3.0_02\jre\bin\classic\jvm.dll" -Xmx256m -Xms128m -Djava.class.path="d:\Tomcat\jakarta-tomcat-4.1.24\bin\bootstrap.jar" -Dcatalina.home="d:\Tomcat\jakarta-tomcat-4.1.24" -start org.apache.catalina.startup.BootstrapService -params start -stop org.apache.catalina.startup.BootstrapService -params stop -out "d:\Tomcat\jakarta-tomcat-4.1.24\logs\stdout.log" -err "d:\Tomcat\jakarta-tomcat-4.1.24\logs\stderr.log" And it also created service on my WinNT4.0 server successfully.And I have also tested it by opening the home page of Tomcat server on IE by typing in address bar (http://127.0.0.1:8080) and also shows me the home page successfully.But my problem is when I start my application for uploading files then Tomcat server not working(means not writing file on destination).My application is a Uploading software for transfering files from one destination to another and I have used swing for front end(for reading files) and for back end I have used servlet(for writing files).But when I use Tomcat as a stand alone not as NT service then it is working fine.Can any one plz guide me how I can slove my problem.Eagerly waiting for reply. Regards Bikash [ May 08, 2003: Message edited by: Bikash Paul ]
This probably occurs because the service treats the current directory different than what you want it to be. One way is to append the following to the code (as given in your post) for installing the service
SCJP2, SCWCD 1.4
Joined: Dec 04, 2001
Hi, First of all thanks for ur reply but in this way what u have suggested me not slove my problem.If I hard code target directory then user can't change the target directory.In my swing application I have given facility to user so that they can change target computer,directory and folder whereever they want to upload file.From my application when user wants to upload file they first type destination(for example: //192.168.4.70//c//Upload) in my destination text box and my application takes that path in one variable and upload file on destination supplied by user.Can u plz guide me how i can slove this problem. Thanks & Regards Bikash
Hi, Iam trying to write file from my WinNT4.0 computer on which Tomcat is running as a service on my network computer's "D:\" directory(\\192.168.3.2\d\weft3.zip)through my swing interface.Then it is giving me below error in my servlet log file.Plz help me Iam facing this problem for last one month but till now I couldn't find any proper solution of it.Eagerly waiting for someone reply. 2003-05-27 11:16:03 StandardWrapperValve[RecvServlet_data]: Servlet.service() for servlet RecvServlet_data threw exception java.io.FileNotFoundException: \\192.168.3.2\d\weft3.zip (Access is denied) at java.io.FileOutputStream.open(Native Method) at java.io.FileOutputStream.<init>(FileOutputStream.java:102 at java.io.FileOutputStream.<init>(FileOutputStream.java:62) at java.io.FileOutputStream.<init>(FileOutputStream.java:132)
subject: Tomcat4.1.24 not working as a NT service??