dcsimg
October 16, 2018
Hot Topics:

Integrate Legacy Web Applications as Full Page IFrames in WebLogic Portal

  • June 12, 2008
  • By Scott Nelson
  • Send Email »
  • More Articles »

Your goal here is to fill the portal page with an IFrame, and all of the extra markup from the gridlayout, placeholder, and window (you dropped the titlebar in your portlet properties) is what makes it hard to do what you want. The solution is to create a theme that only uses the page. The theme requires all of the skeleton files listed above, that make up a page for compilation purposes, even though you won't be using them. All but page.jsp should be empty files. page.jsp will look like this:

<%@ page import="java.net.URLDecoder,
   com.bea.netuix.servlets.controls.page.PagePresentationContext,
   com.bea.netuix.servlets.controls.page.BookPresentationContext,
   org.apache.beehive.netui.pageflow.scoping.ScopedServletUtils"
%>
<%@ page session="false"%>
<%@ taglib
    uri="http://www.bea.com/servers/portal/tags/netuix/render"
    prefix="render" %>
<%! static final String URL_KEY = "urlKey";%>
<render:beginRender>
<%
   PagePresentationContext pageCtx =
      PagePresentationContext.getPagePresentationContext(request);
   String urlKey    = pageCtx.getPresentationId();
   String iFrameUrl = ScopedServletUtils.getOuterRequest(request).
      getSession().getServletContext().getInitParameter(urlKey);
%>
<div style="margin-top:-5px">
   <IFRAME id="<%=urlKey %>"
           NAME="<%=urlKey %>"
           SRC="<%=iFrameUrl %>"
           frameborder="0"
           width="100%"
           height="100%"
           align="middle"
           marginheight="0"
           marginwidth="10"
           scrolling="auto">
   </IFRAME>
</render:beginRender>
<render:endRender>
</div>
</render:endRender>

Your two variables (urlKey and iFrameUrl) are what give you extensibility. urlKey is defined in your page properties at design time. Then, you set the iFrameUrl in web.xml as follows:

   <context-param>
      <param-name>IFRAME_URL1</param-name>
      <param-value>http://www.developer.com/</param-value>
   </context-param>

Running our example in a portal, the resulting HTML is much simpler:

<div class="bea-portal-book-primary-content">
   <span class="bea-portal-theme-iframe2">
      <div style="margin-top:-5px">
         <IFRAME id="IFRAME_URL1"
                 NAME="IFRAME_URL1"
                 SRC=http://www.developer.com/
                 frameborder="0"
                 width="100%"
                 height="100%"
                 align="middle"
                 marginheight="0"
                 marginwidth="10"
                 scrolling="auto">
         </IFRAME>
      </div>
   </span>
</div>

And, your screen fills up the way you want it to, as shown in Figure 2:



Click here for a larger image.

Figure 2: IFrame Page Theme





Page 2 of 3



Comment and Contribute

 


(Maximum characters: 1200). You have characters left.

 

 


Enterprise Development Update

Don't miss an article. Subscribe to our newsletter below.

By submitting your information, you agree that developer.com may send you developer offers via email, phone and text message, as well as email offers about other products and services that developer believes may be of interest to you. developer will process your information in accordance with the Quinstreet Privacy Policy.

Sitemap

Thanks for your registration, follow us on our social networks to keep up-to-date