You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pivot.apache.org by tv...@apache.org on 2009/11/23 22:28:02 UTC
svn commit: r883504 - in /incubator/pivot/trunk: build.xml
demos/www/jnlp_common.jsp demos/xsl/demo.jnlp.xsl
Author: tvolkert
Date: Mon Nov 23 21:28:01 2009
New Revision: 883504
URL: http://svn.apache.org/viewvc?rev=883504&view=rev
Log:
Removed jnlp_common.jsp and moved the code to the jnlp XSL file
Removed:
incubator/pivot/trunk/demos/www/jnlp_common.jsp
Modified:
incubator/pivot/trunk/build.xml
incubator/pivot/trunk/demos/xsl/demo.jnlp.xsl
Modified: incubator/pivot/trunk/build.xml
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/build.xml?rev=883504&r1=883503&r2=883504&view=diff
==============================================================================
--- incubator/pivot/trunk/build.xml (original)
+++ incubator/pivot/trunk/build.xml Mon Nov 23 21:28:01 2009
@@ -447,8 +447,10 @@
<delete file="${folder.lib}/${jar.demos}"/>
<clean-www project="demos"/>
<delete>
- <fileset dir="demos/www" includes="*.html" excludes="index.html"/>
- <fileset dir="demos/www" includes="*.jnlp"/>
+ <fileset dir="demos/www">
+ <include name="*.html"/>
+ <include name="*.jnlp"/>
+ </fileset>
</delete>
</target>
Modified: incubator/pivot/trunk/demos/xsl/demo.jnlp.xsl
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/demos/xsl/demo.jnlp.xsl?rev=883504&r1=883503&r2=883504&view=diff
==============================================================================
--- incubator/pivot/trunk/demos/xsl/demo.jnlp.xsl (original)
+++ incubator/pivot/trunk/demos/xsl/demo.jnlp.xsl Mon Nov 23 21:28:01 2009
@@ -29,7 +29,27 @@
<?xml version="1.0" encoding="UTF-8" ?>
<%@ page language="java" contentType="application/x-java-jnlp-file" pageEncoding="UTF-8" %>
- <%@ include file="jnlp_common.jsp" %>
+ <%
+ // response.setHeader("Cache-Control", "no-cache");
+ // response.setHeader("Pragma", "no-cache");
+ // response.setDateHeader("Expires", 0);
+
+ String requestURL = request.getRequestURL().toString();
+ int lastSlash = requestURL.lastIndexOf('/');
+ String codebase = "";
+ String href = "";
+ if (requestURL != null) {
+ if (lastSlash < 0) {
+ lastSlash = 0;
+ }
+
+ codebase = requestURL.substring(0, lastSlash + 1);
+ if ((lastSlash + 1) < requestURL.length()) {
+ href = requestURL.substring(lastSlash + 1);
+ }
+
+ }
+ %>
<jnlp spec="1.6+" codebase="<%= codebase %>" href="<%= href %>">
<information>