If your service is implemented within axis, then it is running as part of the axis servlet. You can get the servlet context via the MessageContext, and access paths within the webapp containing that servlet. I think you get the HttpServletRequest from the MessageContext, get the ServletContext from that request.
There is probably something tomcat-specific as well, but the above will work in any servlet container. Jeff On 3/2/07, Freakazoid <[EMAIL PROTECTED]> wrote:
Hi. I have a little web service, which needs to write a temp file on a tomcat server where the axis2-webapp is running. If I just use a name for the file without any path, on a standard tomcat-server as unzipped from the archive, the file appears in the bin file of the tomcat-server. I could then get to the temp-directory by using "../temp/filename", which works on a standard tomcat-server. But I have it installed under gentoo linux, where the bin-directory is not in the same directory as the temp-directory, and so I cannot get there with "../temp/filename". My Question is, if there is some kind of environment-variable or something like that, which I can use to get to the temp-directory and would the code look like? I have seen something like that in a servlet but could not use it in my service, because it is not a servlet :) I hope it is not to much a tomcat question for this mailing-list. Greets Christoph Heyen --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
