Note that there are some explanatory texts on larger screens.

plurals
  1. POComposite web application without frames
    text
    copied!<p>I have built two web applications lets call them App1 and App2.</p> <p>App1 has multiple pages (Page1.jsp and Page2.jsp). App1 is a standalone application which has a menu which links to the two pages.</p> <p>App2 has multiple pages (Page3.jsp and Page4.jsp). App2 is also a standalone application which has a menu which links to the two pages.</p> <p>Now I would like to combine App1 and App2 into a super-application without modifying App1 or App2. This super-application should have a menu which links to App1/Page1.jsp, App1/Page2.jsp, App2/Page3.jsp, and App2/Page4.jsp.</p> <p>I think of a couple of approaches to doing this:</p> <p><strong>Solution 1: Frames</strong></p> <p>I can create a menu frame which has a menu which links to the pages of App1 and App2.</p> <p>I can have a seperate frame which is used to display the content for App1 and App2.</p> <p>However, I am not keen to use frames (<a href="http://www.html-faq.com/htmlframes/?framesareevil" rel="nofollow">http://www.html-faq.com/htmlframes/?framesareevil</a>).</p> <p><strong>Solution 2: Dynamically build the menu based on URL parameter</strong></p> <p>Super application can have a div-based menu which links to App1 and App2. It can pass a parameter on the URL, e.g. App1/Page1.jsp?parent=SuperApp.</p> <p>App1 and App2 can dynamically build a menu based on the parent parameter.</p> <p>For example, if the parent parameter is not present then App1 will use its normal menu which links to Page1.jsp and Page2.jsp.</p> <p>However, if the parent parameter is present then App1 will use the SuperApp menu (SuperApp/header.html) - it will dynamically include this HTML in the JSP page. This SuperApp menu will link to all the pages provided in App1 and App2.</p> <p>This second solution will work without using frames, but I wanted to explore if there are other solutions I haven't considered?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload