Actually i have deployed two ears test.ear and test1.ear on jboss 5.x server.
test.ear contains index.jsp page in this jsp i have set a session variable like :
session.setAttribute("Initiated","true")
From index.jsp i am forwarding control to action(struts2 action class) class present in test1.ear.
But when i am retrieving variable from action class,it is null
Map session = (Map)ActionContext.getContext().getSession();
String sessionExistence=(String)session.get("Initialted");
So How can i share session variable from jsp of test.ear to struts2 action class present in test1.ear.
You cannot have sharing session across different applications. The reason is simple, there will be conflicts in attribute names which might result in overriding values.
You can only send parameters along with the request while forwarding to another application.