I have a service (subclass of GenericService) that needs to find the path to the deploy directory [under the application server's install directory] at run-time without hard-coding it; that path varies between the many environments in which we work on a daily basis.
I found how do this from within a JSP file, the following gives exactly what I need, but I cannot find a ServeLetContext:
ServletContext context = session.getServletContext();
String path = context.getRealPath("/my/path");
However, I don't have the request or session objects in the service, or do I? I've been looking at
getAdminServlet().getServletConfig().getServletContext().getRealPath("/my/path");
but I'm not getting a context back.
We are using ATG 9.1 on JBoss 4.2.
I appreciate any assistance.