Hi-

I was playing with the session example (in
http://xml.apache.org/cocoon/userdocs/xsp/sessions.html).
After getting it to partially work. I made a change to get the
'xsp-request:get-session-id' (see below) and received this error:
Original exception :
org.apache.cocoon.components.language.LanguageException: Error compiling
welcome_xsp: Line 242, column 4: Invalid expression statement. Line 0,
column 0: 1 error at
org.apache.cocoon.components.language.programming.java.JavaLanguage.compile(
JavaLanguage.java:205) at
org.apache.cocoon.components.language.programming.CompiledProgrammingLanguag
e.load(CompiledProgrammingLanguage.java:140) at
org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.generat
eResource(ProgramGeneratorImpl.java:332)


The offending snippet from the generated file is:
    this.contentHandler.startElement("", "xsp-request:session-id",
"xsp-request:session-id", xspAttr);
    xspAttr.clear();
    (XSPRequestHelper.getSessionId(objectModel))   <----- line 242
    this.contentHandler.endElement("", "xsp-request:session-id",
"xsp-request:session-id");



After some tracing and verifying XSPRequestHelper, I changed request.xsl at
{build}/src/java/org/apache/cocoon/components/language/markup/xsp/java.
Line #128 was changed from
          (XSPRequestHelper.getSessionId(objectModel))
to
            XSPRequestHelper.getSessionId(objectModel);
(Also lines #428 & 451)

Shutdown tomcat.
Rebuilt the .war file and copied it to {tomcat}/webapps. (I confirmed the
changed file was there)
Restarted tomcat
Even shutdown all instances of IE
I have the same error - What step(s) did I miss? Am I changing the wrong
file?

Cocoon sitemap Snippet: ===================
  <!-- play pipeline -->
  <map:pipeline>
   <map:match pattern="play/**">
    <map:mount uri-prefix="play" src="play/" check-reload="yes"/>
   </map:match>
  </map:pipeline>



Sub sitemap snippet: ======================
  <map:pipeline>

  <map:match pattern="">
    <map:redirect-to session="true" uri="welcome.html"/>
  </map:match>
  <map:match pattern="**welcome.html*">
    <map:generate type="serverpages" src="docs/welcome.xsp"/>
    <!-- map:transform src="stylesheets/dynamic-page2html.xsl"/  -->
 <map:transform src="stylesheets/apache.xsl"/>
    <map:serialize/>
  </map:match>
...
 </map:pipeline>



welcome.xsp ==========================
<?xml version="1.0" encoding="iso-8859-1"?>

<xsp:page
   language="java"
   xmlns:xsp="http://apache.org/xsp";
   xmlns:session="http://apache.org/xsp/session/2.0";
   xmlns:xsp-request="http://apache.org/xsp/request/2.0";
>

<document>
  <header>
    <title>Play Home Page</title>
  </header>
  <body>
    <s1 title="Play Page">
      <p>
        Welcome to my play page:
      </p>
      <ul>
        <li><link href="sessionpage.html">MySession Page</link></li>
      </ul>
    </s1>
    <para> URI = '<xsp-request:get-uri as="xml"/>' </para> <br/>
    <para> Session ID = '<xsp-request:get-session-id as="xml"/>' </para> <br
/>
  </body>
</document>

</xsp:page>

If I comment out the get-session-id, it displays - I get the URI without the
tomcat sessionid.

Configuration:
Cocoon 2.0.1
tomcat 3.3a
Sun jdk 1.3.1.02
Windows XP

Any assistance would be appreciated. If you need more info, please let me
know.
Thanks,
Dave.....................



_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>

Reply via email to