<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    隨筆-10  評論-23  文章-32  trackbacks-0

        首先到web space 安裝目錄下,找到web space server 的自定義配置文件,應該在:<root-dir>/webspace-for-gfv2/var/webspace/war-workspace/customs/webspace/WEB-INF/classes 下。

        很多同類產品可以直接修改默認的配置文件,不管需不需要的配置信息都會出現在默認配置文件里,一眼看去讓人畏懼,而web space server允許用戶不需要進入默認配置文件,使用自定義配置文件(porttal-ext.properties)配置參數。這樣可以有一個簡潔明了的自定義配置文件,只包含我們自己的配置。這樣的配置方式使配置web space server非常便捷。

        實際上,真正的web space server 默認配置文件是存儲在portal-impl.jar中的portal.properties文件。portal-impl.jar包存在與<GlassFishhome>/domains/domain1/application/j2ee-modules/webspace/WEB-INF/lib下。研究這些配置最好的方法是復制此jar包到某個文件夾,解壓之后研究根目錄下的portal.properties文件,里面對每個配置參數都有詳細說明.

        最常用到的是在portlet中加入自己的js和css,這里有一段重要的代碼在:D:\worksoft\webspace-gfv2\var\webspace\war-workspace\sources\webspace\html\common\themes\top_head.jsp

    <%-- Portal JavaScript References --%>
    <%@ include file="/html/common/themes/top_js.jspf" %>
    <%@ include file="/html/common/themes/top_js-ext.jspf" %>
    <%-- Portlet JavaScript References --%>
    <c:if test="<%= portlets != null %>">
    	<%
    	Set<String> headerPortalJavaScriptPaths = new LinkedHashSet<String>();
    	for (Portlet portlet : portlets) {
    		List<String> headerPortalJavaScriptList = portlet.getHeaderPortalJavaScript();
    		for (String headerPortalJavaScript : headerPortalJavaScriptList) {
    			String headerPortalJavaScriptPath = request.getContextPath() + headerPortalJavaScript;
    			if (!headerPortalJavaScriptPaths.contains(headerPortalJavaScriptPath) && !themeDisplay.isIncludedJs(headerPortalJavaScriptPath)) {
    				headerPortalJavaScriptPaths.add(headerPortalJavaScriptPath);
    				headerPortalJavaScriptPath = HtmlUtil.escape(PortalUtil.getStaticResourceURL(request, headerPortalJavaScriptPath, portlet.getTimestamp()));
    	%>
    				<script src="<%= headerPortalJavaScriptPath %>" type="text/javascript"></script>
    	<%
    			}
    		}
    	}
    	Set<String> headerPortletJavaScriptPaths = new LinkedHashSet<String>();
    	for (Portlet portlet : portlets) {
    		List<String> headerPortletJavaScriptList = portlet.getHeaderPortletJavaScript();
    		for (String headerPortletJavaScript : headerPortletJavaScriptList) {
    			String headerPortletJavaScriptPath = portlet.getContextPath() + headerPortletJavaScript;
    			if (!headerPortletJavaScriptPaths.contains(headerPortletJavaScriptPath)) {
    				headerPortletJavaScriptPaths.add(headerPortletJavaScriptPath);
    				headerPortletJavaScriptPath = HtmlUtil.escape(PortalUtil.getStaticResourceURL(request, headerPortletJavaScriptPath, portlet.getTimestamp()));
    	%>
    				<script src="<%= headerPortletJavaScriptPath %>" type="text/javascript"></script>
    	<%
    			}
    		}
    	}
    	%>
    </c:if>
    <%-- Raw Text --%>
    <%
    List<String> markupHeaders = (List<String>)request.getAttribute(MimeResponse.MARKUP_HEAD_ELEMENT);
    if (markupHeaders != null) {
    	for (String markupHeader : markupHeaders) {
    %>
    		<%= markupHeader %>
    <%
    	}
    }
    StringBuilder pageTopSB = (StringBuilder)request.getAttribute(WebKeys.PAGE_TOP);
    %>
    <c:if test="<%= pageTopSB != null %>">
    	<%= pageTopSB.toString() %>
    </c:if>
    <%-- Theme CSS --%>
    <link href="<%= HtmlUtil.escape(PortalUtil.getStaticResourceURL(request, themeDisplay.getPathThemeCss() + "/main.css")) %>" rel="stylesheet" type="text/css" />
    <style type="text/css">
    	/* <![CDATA[ */
    		<c:if test="<%= !themeDisplay.getCompanyLogo().equals(StringPool.BLANK) %>">
    			#banner .logo a {
    				background: url(<%= HtmlUtil.escape(themeDisplay.getCompanyLogo()) %>) no-repeat;
    				display: block;
    				font-size: 0;
    				height: <%= themeDisplay.getCompanyLogoHeight() %>px;
    				text-indent: -9999em;
    				width: <%= themeDisplay.getCompanyLogoWidth() %>px;
    			}
    		</c:if>
    		<c:if test="<%= BrowserSnifferUtil.isIe(request) && (BrowserSnifferUtil.getMajorVersion(request) < 7) %>">
    			img, .png {
    				position: relative;
    				behavior: expression(
    					(this.runtimeStyle.behavior = "none") &&
    					(
    						this.pngSet || (this.src && this.src.toLowerCase().indexOf('spacer.png') > -1) ?
    							this.pngSet = true :
    								(
    									this.nodeName == "IMG" &&
    									(
    										(this.src.toLowerCase().indexOf('.png') > -1) ||
    										(this.className && ([''].concat(this.className.split(' ')).concat(['']).join('|').indexOf('|png|')) > -1)
    									) ?
    										(
    											this.runtimeStyle.backgroundImage = "none",
    											this.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + this.src + "', sizingMethod='image')",
    											this.src = "<%= themeDisplay.getPathThemeImages() %>/spacer.png"
    										) :
    											(
    											   (
    													(this.currentStyle.backgroundImage.toLowerCase().indexOf('.png') > -1) ||
    													(this.className && ([''].concat(this.className.split(' ')).concat(['']).join('|').indexOf('|png|')) > -1)
    												) ?
    													(
    															this.origBg = this.origBg ?
    																this.origBg :
    																this.currentStyle.backgroundImage.toString().replace('url("','').replace('")',''),
    																this.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + this.origBg + "', sizingMethod='crop')",
    																this.runtimeStyle.backgroundImage = "none"
    													) :
    														''
    											)
    								),
    								this.pngSet = true
    					)
    				);
    			}
    		</c:if>
    	/* ]]> */
    </style>
    <%-- User Inputted Layout CSS --%>
    <c:if test="<%= (layout != null) && Validator.isNotNull(layout.getCssText()) %>">
    	<style type="text/css">
    		<%= layout.getCssText() %>
    	</style>
    </c:if>
    <%-- User Inputted Portlet CSS --%>
    <c:if test="<%= portlets != null %>">
    	<style type="text/css">
    		<%
    		for (Portlet portlet : portlets) {
    			PortletPreferences portletSetup = PortletPreferencesFactoryUtil.getLayoutPortletSetup(layout, portlet.getPortletId());
    			String portletSetupCss = portletSetup.getValue("portlet-setup-css", StringPool.BLANK);
    		%>
    			<c:if test="<%= Validator.isNotNull(portletSetupCss) %>">
    				<%
    				try {
    				%>
    					<%@ include file="/html/common/themes/portlet_css.jspf" %>
    				<%
    				}
    				catch (Exception e) {
    					if (_log.isWarnEnabled()) {
    						_log.warn(e.getMessage());
    					}
    				}
    				%>
    			</c:if>
    		<%
    		}
    		%>
    	</style>
    </c:if>
    posted on 2010-04-16 18:30 liuyimx 閱讀(600) 評論(0)  編輯  收藏

    只有注冊用戶登錄后才能發表評論。


    網站導航:
     
    主站蜘蛛池模板: 性做久久久久久免费观看| 免费看一级一级人妻片 | 亚洲AV无码一区二区三区DV| 国产免费久久精品丫丫| 亚洲成av人在片观看| 一本大道一卡二大卡三卡免费| 亚洲AV无码一区二区三区在线观看| 美女被暴羞羞免费视频| 国产成人亚洲精品影院| 你是我的城池营垒免费观看完整版 | 亚洲精品中文字幕无码A片老| 成年大片免费视频| 国产精品手机在线亚洲| 四虎精品亚洲一区二区三区| a一级毛片免费高清在线| 亚洲精品国产品国语在线| 国产99视频精品免费专区| 亚洲精品韩国美女在线| 免费福利网站在线观看| 亚洲av无码成人精品国产| 亚洲国产成人精品91久久久| 在线免费观看h片| 亚洲国产人成在线观看| 国产嫩草影院精品免费网址| 一级免费黄色大片| 亚洲最大成人网色| 日本一道在线日本一道高清不卡免费| 午夜成人无码福利免费视频| 亚洲欧洲在线观看| 在线免费不卡视频| 中文字幕无码免费久久9一区9 | 亚洲人色大成年网站在线观看| 精品久久久久久久免费人妻| www一区二区www免费| 亚洲理论片在线观看| 免费观看四虎精品国产永久| 久久伊人免费视频| 亚洲av成人片在线观看| 亚洲va中文字幕无码久久不卡| 免费在线观看的网站| 成在线人视频免费视频|