<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 閱讀(604) 評論(0)  編輯  收藏

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


    網站導航:
     
    主站蜘蛛池模板: 亚洲同性男gay网站在线观看| 国产亚洲综合久久| 妞干网在线免费视频| 曰批全过程免费视频免费看 | 一级毛片免费观看| 亚洲国产成人九九综合| 免费看国产精品麻豆| 久久午夜无码免费| 亚洲国产成人无码AV在线| 国产精品亚洲片在线观看不卡 | 国产亚洲一卡2卡3卡4卡新区| 亚洲毛片αv无线播放一区| 国产免费av片在线看| 最近免费字幕中文大全| 亚洲三级高清免费| 国产亚洲欧洲精品| 在线永久免费观看黄网站| 桃子视频在线观看高清免费视频| 亚洲AV无码成人网站在线观看| 亚洲av色影在线| 免费一级特黄特色大片在线| 91麻豆最新在线人成免费观看| 巨胸喷奶水视频www免费视频| 亚洲依依成人亚洲社区| 亚洲bt加勒比一区二区| 亚洲第一永久AV网站久久精品男人的天堂AV | 亚洲国产精品线观看不卡 | 国产99久久亚洲综合精品| 亚洲高清无在码在线电影不卡| 亚洲国产精品嫩草影院久久| 动漫黄网站免费永久在线观看| 成全视频在线观看免费| 一区二区三区四区免费视频 | 亚洲Av永久无码精品三区在线| 免费在线不卡视频| 在线观看无码的免费网站| 亚欧在线精品免费观看一区| 免费国产在线视频| 久久九九久精品国产免费直播| 麻豆一区二区三区蜜桃免费| 亚洲精品无码久久久久久|