i had the same problem - all i did was i fed FileOutputStream with a real
path, where i wanted files to be stored. ie.
FileOutputStream  output = new
FileOutputStream("/and/directories/follow/file.name");

if anybody has more elegant solution, i'll be grateful.

regards,
vVolf


> -----Oryginalna wiadomooeæ-----
> Od: Alexander Batzios [mailto:[EMAIL PROTECTED]]
> Wys³ano: 14 marca 2001 06:12
> Do: [EMAIL PROTECTED]
> Temat: Set application's working path?
> 
> 
> Hello.
> 
> I am using a JSP file to call a class, say myClass, which is 
> a pure java 
> application. From that class, I then need to call a method, 
> say myMethod. The 
> part of the JSP file that does the above is like:
> 
> myClass mc = new myClass(parameters);
> mc.myMethod();
> 
> Part of myMethod() functionality is reading/writting files. 
> Well, the thing is 
> that it only works in the /bin directory of tomcat (where the 
> startup,shutdown 
> scripts are). That is, it expects to find files there, and it 
> creates files 
> there. How can I change it's working path to a virtual path 
> of the webserver? 
> Or to where the JSP file that calls it lives?
> 
> Any help will be greatly appreciated.
> 
> Thanks,
> alex
> 
> ------------------------------------------------------------
>  Get your FREE web-based e-mail and newsgroup access at:
>                 http://MailAndNews.com
> 
>  Create a new mailbox, or access your existing IMAP4 or
>  POP3 mailbox from anywhere with just a web browser.
> ------------------------------------------------------------
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]
> 

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

Reply via email to