views:

43

answers:

2

Hi All,

We have a big application having 13 modules. We want to create war file for each module and deploy the app as an EAR. We navigate to different pages through top menu which contains link for all modules. Now problem is that each module have their own context. In order to switch the context we are using an external.jsp

<html>
<head>

<%@ include file="/private/jsp/header.jsp"%>
<%
String link= request.getQueryString();
%>
</head>

<body>
<iframe id="ekawarframe" src="<%=link%>" width="100%" height="80%" scrolling="auto" frameborder="0">
</iframe>
</body>
</html>

and using urls in this format "/external.jsp?/app/newDerivativeTrade.do?method=loadNewDerivativeTrade&isFreight=false". Is there any other elegant way to navigate links between multiple wars.

A: 

If you are using maven as a build tool you can add a dependency in ech module to a common war. This will then be merged with the module war.

You can then distribute the header jsp (and other common stuff like css, images and javascript) from a single common module and you do not need the iframe anymore.

Peter Tillemans
+1  A: 

Well, you can simply link to the other modules using <a href="/anothermodule/">link</a>. The only problem is sharing the http session. Your application server may allow sharing the http session.

Bozho
We have decided to share the links by specifying the context only as suggested by you..we have usercontext in session..Jboss doesn't allow sharing the session among multiple wars..We are using JOSSO for single sign on which generates an session id..we will use ehcache to share the usercontext using combination of josso session id and usercontext as a key.