0

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.

Aditya Ekbote
  • 1,375
  • 3
  • 13
  • 24
  • [check it:](http://stackoverflow.com/questions/13435678/does-requestdispatcher-work-over-multiple-webapps-in-one-servlet-container) – tanmoy Dec 05 '14 at 06:52
  • possible duplicate of [Request dispatching to another web application in struts2](http://stackoverflow.com/questions/27270787/request-dispatching-to-another-web-application-in-struts2) – Roman C Dec 05 '14 at 09:24

0 Answers0