Unfortunately this makes no difference. The cocoon version is 2.03 Going to try downloading the 2.03 for JDK 1.4 binary - see if this makes any difference . . .
-----Original Message----- From: Antonio A. Gallardo Rivera [mailto:agallardo@;agsoftware.dnsalias.com] Sent: 12 November 2002 10:25 To: [EMAIL PROTECTED] Subject: RE: <xsp-session> : Bug with Cocoon? or Bug with programmer? I dont make use of it. But I use XSP. :-D Try to change the order of the namespaces to: <xsp:page xmlns:xsp-session="http://apache.org/xsp/session/2.0" create-session="true" xmlns:xsp="http://apache.org/xsp"> The check again the Java code. It is a interesting error. What version are you using? Regards, Antonio Gallardo. Tom Place dijo: > After searching the created "Java" file (apologies for my earlier > mistake), the request helper is the only place it could be trying to set > the variable. > For example the following XSP (entire file) : > > +---------------------------------------------------------+ > <?xml version="1.0"?> > > <xsp:page > xmlns:xsp="http://apache.org/xsp" > xmlns:xsp-session="http://apache.org/xsp/session/2.0" > create-session="true"> > > <page> > <xsp-session:set-attribute > name="fruit">Apple</xsp-session:set-attribute> > <fruit><xsp-session:get-attribute name="fruit"/></fruit> > </page> > > </xsp:page> > +---------------------------------------------------------+ > > Generates the following Java > > +---------------------------------------------------------+ > public class test_xsp extends XSPGenerator { > > static { > dateCreated = 1037088922427L; > dependencies = new File[]{ > }; > } > > /* Built-in parameters available for use */ > // context - ServletContext > // request - HttpServletRequest > // response - HttpServletResponse > // parameters - parameters defined in the sitemap > > /* User Class Declarations */ > > > /** > * Generate XML data. > */ > public void generate() throws SAXException, IOException, > ProcessingException { > > > > this.contentHandler.startDocument(); > AttributesImpl xspAttr = new AttributesImpl(); > > > > this.contentHandler.startPrefixMapping("xml", > "http://www.w3.org/XML/1998/namespace"); > > this.contentHandler.startPrefixMapping("xsp", > "http://apache.org/xsp"); > > this.contentHandler.startPrefixMapping("xsp-session", > "http://apache.org/xsp/session/2.0"); > > > this.contentHandler.startElement("", "page", "page", xspAttr); > > xspAttr.clear(); > > > this.characters("\n "); > > XSPRequestHelper.setSessionAttribute(objectModel, > String.valueOf("fruit"), > this.characters("Apple"); > ); > > this.characters("\n "); > > > this.contentHandler.startElement("", "fruit", "fruit", xspAttr); > > xspAttr.clear(); > > > > XSPObjectHelper.xspExpr(contentHandler, > > XSPRequestHelper.getSessionAttribute(objectModel, > > String.valueOf("fruit"), "")); > > > this.contentHandler.endElement("", "fruit", "fruit"); > > > this.characters("\n "); > > > this.contentHandler.endElement("", "page", "page"); > > > this.contentHandler.endPrefixMapping("xml"); > > this.contentHandler.endPrefixMapping("xsp"); > > this.contentHandler.endPrefixMapping("xsp-session"); > > > this.contentHandler.endDocument(); > } > } > > +---------------------------------------------------------+ > > So as you can see from the above the only place it is possible creating > the session variable is > XSPRequestHelper.setSessionAttribute(objectModel, > String.valueOf("fruit"), > this.characters("Apple"); > ); > And this is where the rogue semicolon appears. > > I can remove the rogue semicolon by creating the String "Apple" and > reverencing that string through <xsp:expr> tags. But this leads to a > nullPointerException. > > I think that either I am being really dim with this or some powers that > I can't control are at work here! > > Thanks for everyone's help so far > > Tom Place > > > --------------------------------------------------------------------- > Please check that your question has not already been answered in the > FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html> > > To unsubscribe, e-mail: <[EMAIL PROTECTED]> > For additional commands, e-mail: <[EMAIL PROTECTED]> --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html> To unsubscribe, e-mail: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]> --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html> To unsubscribe, e-mail: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>