[Commits] (bcm) add a baseurl tag file that calculates the base url of this cosmo server based

commits at osafoundation.org commits at osafoundation.org
Fri Apr 8 11:38:21 PDT 2005


Commit by: bcm
Modified files:
server/web/web/WEB-INF/jsp/welcome.jsp 1.3 1.4
server/webapps/console/web/WEB-INF/tags/baseurl.tag None 1.1

Log message:
add a baseurl tag file that calculates the base url of this cosmo server based
on the request scheme, server name and port number. usage: <cosmo:baseurl
var="baseurl"/>. use the tag file in the welcome page.


ViewCVS links:
http://cvs.osafoundation.org/index.cgi/server/web/web/WEB-INF/jsp/welcome.jsp.diff?r1=text&tr1=1.3&r2=text&tr2=1.4
http://cvs.osafoundation.org/index.cgi/server/webapps/console/web/WEB-INF/tags/baseurl.tag?rev=1.1&content-type=text/vnd.viewcvs-markup

Index: server/web/web/WEB-INF/jsp/welcome.jsp
diff -u server/web/web/WEB-INF/jsp/welcome.jsp:1.3 server/web/web/WEB-INF/jsp/welcome.jsp:1.4
--- server/web/web/WEB-INF/jsp/welcome.jsp:1.3	Fri Apr  8 11:22:00 2005
+++ server/web/web/WEB-INF/jsp/welcome.jsp	Fri Apr  8 11:38:20 2005
@@ -3,15 +3,7 @@
 
 <cosmo-core:user var="user"/>
 <cosmo:homedir var="homedir" user="${user}"/>
-
-<c:set var="homedirBase"
-       value="${pageContext.request.scheme}://${pageContext.request.serverName}"/>
-<c:if test="${(pageContext.request.secure &&
-            pageContext.request.serverPort != 443) ||
-            (pageContext.request.serverPort != 80)}">
-  <c:set var="homedirBase"
-         value="${homedirBase}:${pageContext.request.serverPort}"/>
-</c:if>
+<cosmo:baseurl var="baseurl"/>
 
 <p>
   <fmt:message key="Welcome.WelcomeMsg">
@@ -25,7 +17,7 @@
   <p>
     <fmt:message key="Welcome.HomeDirectory"/>
     <html:link page="${homedir}">
-      <b>${homedirBase}${homedir}</b>
+      <b>${baseurl}${homedir}</b>
     </html:link>
   </p>
   <p>



More information about the Commits mailing list