cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tom stuart <>
Subject Re: Sessions & Cookies
Date Wed, 19 Apr 2000 15:43:20 GMT
On Wed, 19 Apr 2000, Laurent Eskenazi wrote:

> I am supposed to use the Java method response.encodeUrl() on every URL
> to add the session reference in this URL.
> My problem is that I don't know how to use some Java code in my XSL. How do
> people handle this problem ?

That's what XSP is for. Like JSP (Java Server Pages) to some extent, XSP
lets you use Java code in your XML and XSL. There's more information at:

To give you some idea of what it's all about, the example cited in the
documentation is:


<?xml version="1.0"?>
<?cocoon-process type="xsp"?>
<?cocoon-process type="xslt"?>
<?xml-stylesheet href="sample.xsl" type="text/xsl"?>

<xsp:page language="java" xmlns:xsp="">
  <page title="Time of Day">
      // Define a variable to hold the time of day
      Date now = new Date();
      To the best of my knowledge, it's now
      <!-- Substitute time of day here -->


XSP should be able to do what you need.


View raw message