Hi,
I'm using a ChibaServlet with an alternate action-url that already
contains parameters on the querystring. After switching to the trunk of
chiba-web and chiba-sandbox I saw a ?sessionKey on the querystring.
Since this produces URL's that don't work I've created the following
patch. It tests whether or not the $action-url contains a '?'. If it
does, it appends the sessionKey with '&' otherwise it appends it
with '?'.
### Eclipse Workspace Patch 1.0
#P chiba-web
Index: web/resources/xslt/html4.xsl
===================================================================
RCS file: /cvsroot/chiba/chiba-web/web/resources/xslt/html4.xsl,v
retrieving revision 1.5
diff -u -r1.5 html4.xsl
--- web/resources/xslt/html4.xsl 6 Sep 2006 11:41:18 -0000 1.5
+++ web/resources/xslt/html4.xsl 13 Sep 2006 14:09:42 -0000
@@ -74,6 +74,13 @@
<xsl:variable name="default-hint-appearance" select="'bubble'"/>
+ <xsl:variable name="querystring-appender">
+ <xsl:choose>
+ <xsl:when test="contains($action-url, '?')">&</xsl:when>
+ <xsl:otherwise>?</xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
<xsl:output method="html" version="4.01" encoding="UTF-8" indent="yes"
doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"
doctype-system="http://www.w3.org/TR/html4/loose.dtd"/>
@@ -358,7 +365,7 @@
<xsl:choose>
<xsl:when test="not($uses-upload) and
$scripted='true'">javascript:return false;</xsl:when>
<xsl:otherwise>
- <xsl:value-of
select="concat($action-url,'?sessionKey=',$sessionKey)"/>
+ <xsl:value-of
select="concat($action-url,$querysting-appender,'sessionKey=',$sessionKey)"/>
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
@@ -390,7 +397,7 @@
<xsl:choose>
<xsl:when test="not($uses-upload) and
$scripted='true'">javascript:return false;</xsl:when>
<xsl:otherwise>
- <xsl:value-of
select="concat($action-url,'?sessionKey=',$sessionKey)"/>
+ <xsl:value-of
select="concat($action-url,$querystring-appender,'sessionKey=',$sessionKey)"/>
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
Also, since I'm a big fan of maven, I've created POM files that can
build chiba-web and chiba-sandbox. This way it's no longer necessary to
have all the jars in the CVS. Except for the patched jxpath library. You
have to install that one in a local repository before you can use it.
Anyone interested?
PS. Is the source for the patched jxpath lib available? Not that it's
important to me, but I think the Apache licence might require it? In any
case, I'd rather not use patched libraries given the choice. So maybe
some effort could be made to fix the problems upstream.
--
Matthijs Wensveen
Func. Internet Integration
W http://www.func.nl
T +31 20 4230000
F +31 20 4223500
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
|