Hi,

I am writing a small Struts webapp to use as portlet in Jahia (4.1.1). I
need to read a configuration file and I use the getRealPath method of
the ServletContext :

String path =
request.getSession().getServletContext().getRealPath("/WEB-INF/conf/db.p
roperties");

But the context returned is jahias context and the path is
"TOMCAT_HOME/webapps/jahia/WEB-INF/conf/db.properties" when what I wish
to get is
"TOMCAT_HOME/webapps/mywebapp_myjahiasite/WEB-INF/conf/db.properties".

What would be a simple way to get there ?


Pierre Henry

Reply via email to