I have two web apps. PuchaseProj and PayProj. I have configured crossContext="true" of tomcat. Now i want to add some data to context of PayProj in PurchaseProj. But I cant get the data in PayProj. I have tried following. Any help will be appreciated.
ServletContext siblingContext = req.getSession().getServletContext().getContext("/PurchaseProj");
req.setAttribute("requestParam", requestparam);
req.setAttribute("shippingDtls", encryptedShippingparam);
siblingContext.setAttribute("requestParam", requestparam);
siblingContext.setAttribute("shippingDtls", encryptedShippingparam);
Here I am adding 2 parameters to other context objects. But i am not able to get it.
String requestParam=(String)ctx.getAttribute("requestParam");
String shippingDtls=(String)ctx.getAttribute("shippingDtls");
this is code in PayProj.