Alexander,
I would suggest that you have a couple of options here:
1) HttpServletRequest has the following methods getRealPath() and
getTranslatedPath(). You could use these to get the path to you application
directory structure.
2) Lookup the context attribute javax.servlet.context.tempdir to get a private
directory for you servlet context.
Take Care
Jason Kary
Alexander Batzios wrote:
> 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]