分析一下Portal的部分页面组成

1.Portal的Default.jsp页面    

    所有屏幕聚集都从 Default.jsp 开始。用于缺省主题的 Default.jsp 位于 wp_root/app/wps.
ear/wps.war/themes/html 。这个 JSP 包含其它用于显示标题、工具栏的 JSP 以及用于往可用
位置及页面植入内容的 JSP。在 Default.jsp 的末尾处, screenRender JSP 标记选择被请求的
屏幕(例如 login 或 forgotpassword )。首先简单的分析下Default.jsp的结构:

<%@ page session="false" buffer="none" %> <%-- Must be Transitional DTD or Mozilla/Netscape 6 will not correctly display tables used for visual layout. --%> <%-- Licensed Materials - Property of IBM, 5724-B88, (C) Copyright IBM Corp. 2001, 2003 - All Rights reserved. --%> <%@ taglib uri="/WEB-INF/tld/engine.tld" prefix="wps" %> <%@ include file="./extension/TagLibInclude.jsp" %> <%-- This includes Extend/Express specific tag libraries. --%> <%@ include file="./Head.jsp" %> <%-- Set margins to 0 here in addition to stylesheet to support old versions of Netscape --%> onLoad="if ( document.forms['wpsPageGroupSelectionForm'] != null ) document.forms['wpsPageGroupSelectionForm'].reset();" > <%@ include file="./extension/PageBeginInclude.jsp" %> <%-- This includes Extend/Express specific page logic. --%> <%-- This table is here so the banner is the same width as the portlets --%>

<%@ include file="./ToolBarInclude.jsp" %> <%@ include file="./PlaceBarInclude.jsp" %> <%@ include file="./PageBarInclude.jsp" %>
<%@ include file="./extension/PageEndInclude.jsp" %> <%-- This includes Extend/Express specific page logic. --%>

上面是一个Default.jsp的代码。从中我们可以看出几个特点:

(1) default.jsp用include包含了几个页面:Head.jsp,ToolBarInclude.jsp,PlaceBarInclude.jsp,PageBarInclude.jsp。

(2) default.jsp用标签执行选择被请求的屏幕(例如 login 或 forgotpassword )。

(3) Default.jsp 文件包含一个 JSP 标记库 engine.tld ,该库使用下列 URI:

          <%@ taglib uri="/WEB-INF/tld/engine.tld" prefix="wps" %>
            这一标记库提供了植入位置名称、页面以及在所要求的主题和皮肤定位图像所需的 JSP 标记。

(4)  Default.jsp 中使用了 constants JSP 标记(为获取门户网站的基本 URL 以及文档 URL)。这一元素使得下列两个脚本变量

          可用于该页面。wpsBaseURL:用于获取门户网站 URL。wpsDocURL:用于生成指向门户网站帮助文件的链接。

(5) Default.jsp 包含 extension/PageEndInclude.jsp 。这个 JSP 只包含用于WebSphere Portal Enable 版的注释;

 

2.Head.jsp页面

   Head.jsp 生成标题并嵌入指向样式表文件的链接。它还定义了支持 BIDI(双向)文本所需的变量。这个 JSP 的内容将在这里描述。

3.ToolBarInclude.jsp

   显示公司徽标、欢迎消息以及为用户提供的链接 工具栏。门户网站上显示什么样的链接工具栏取决于用户上下文。例如,登录的用户看到 Edit Layout、 Edit my profile和 Log Off之类的链接;

你可能感兴趣的:(开发技术,include,jsp,file,websphere,constants,stylesheet)