Hi- Small update. For a couple reasons, after pulling down the CVS version I deleted my {tomcat}/webapps/cocoon directory and my {tomcat}/work/.../cocoon directory. Then allowed Cocoon to rebuild its directories & samples. Then added my files/changes back in. Now both xsp-request: and xsp-session are working for me. Even get session ids :-). Per your suggestion, I'll stick with the xsp-session routines as appropriate.
I look forward to the samples (session & other) being included in a future release. Thanks again, Dave................ ----- Original Message ----- From: "Dave Covert" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, March 31, 2002 9:40 PM Subject: Re: compile error on 'xsp-request:get-session-id' > Thanks. After pulling down the latest CVS (first time) and rebuilding, I > still get the error on xsp-request:get-session-id but using the > xsp-session:* is working. > I keep getting blank values though. It appears I get the session id once but > not after that. Unfortunately, I'll have to come back to the whole session > thing later. > Dave............... > > ----- Original Message ----- > From: "Vadim Gritsenko" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Sunday, March 31, 2002 11:42 AM > Subject: RE: compile error on 'xsp-request:get-session-id' > > > > Fixed in the CVS. However, I recommend to use xsp-session:get-id instead > > of xsp-request. > > > > Vadim > > > > > From: Dave Covert [mailto:[EMAIL PROTECTED]] > > > > > > 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.comp > > ile( > > > JavaLanguage.java:205) at > > > > > org.apache.cocoon.components.language.programming.CompiledProgrammingLan > > guag > > > e.load(CompiledProgrammingLanguage.java:140) at > > > > > org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.gen > > erat > > > 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..................... > > > > > > --------------------------------------------------------------------- > > 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]> > > > > > > _________________________________________________________ > 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]> _________________________________________________________ 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]>