Hi Pasquale,
Sorry no this problem has not yet been addressed. Basically the problem is that we are passing Jahia's session instead of the application's session. I'm not sure if I'll have the time to look at it before 4.0.5 and after that we will probably rewrite the whole dispatching process to integrate with Jetspeed 2.
Regards, Serge Huber.
Pasquale Rossiello wrote:
Hello,
I need to access web app config files by using the ServletContext and using Struts 1.1.
Writing the following code within an action class:
...
System.out.println("httpServletRequest: " + httpServletRequest);
System.out.println("httpServletRequest.getSession(): " + httpServletRequest.getSession());
*System.out.println("httpServletRequest.getSession().getServletContext(): " + httpServletRequest.getSession().getServletContext());
System.out.println("httpServletRequest.getSession().getServletContext().getResourceAsStream(\"/config/ApplyForRequest.config.properties\"): " + httpServletRequest.getSession().getServletContext().getResourceAsStream("/config/ApplyForRequest.config.properties"));
InputStream is = httpServletRequest.getSession().getServletContext() .getResourceAsStream("/config/ApplyForRequest.config.properties");
and executing it under Jahia, in (*) get a null pointer, corresponding to the ServletContext. Obviusly, no problems under Tomcat.
Has problems in http://list.jahia.org/dev_list/msg01140.html been solved? I tried with Jahia 4.0.4 (release) and still the problem arise.
Thank you
Pasquale Rossiello
