This content has been marked as final.
Show 1 reply
-
1. Re: share an object between diferents war
rafaelsource May 4, 2006 5:36 AM (in response to rafaelsource)ok.. i have a solution
1. Add to the context the object to share in WAR1ServletContext sc = session.getServletContext(); sc.setAttribute("object2Share",objectInstance);
2. In WAR2 access to the context of WAR1 withServletContext sc2 = session.getServletContext(); sc2 = sc2.getContext("/WAR1");
Is necesary that the both wars have in /WEB-INF/lib the same library (content the class, evident) and the file \deploy\jbossweb-tomcat55.sar\context.xml have the value crossContext="true"
Thats all Folks!