Dear All,
I'm trying to implement session besed forms and have run into the following error: ERROR (2002-09-03) 18:56.26:764 [sitemap] (/tc/test-form.html) HttpProcessor[8080][4]/PipelineNode: Error while processing pipeline at jndi:/localhost/tc/sitemap.xmap:440:19 org.apache.cocoon.ProcessingException: Exception in ServerPagesGenerator.generate(): java.lang.IllegalArgumentException: CreateContext: Session is required at org.apache.cocoon.generation.ServerPagesGenerator.generate(ServerPagesGenerator.java:281) at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.processXMLPipeline(AbstractProcessingPipeline.java:502) at org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.processXMLPipeline(AbstractCachingProcessingPipeline.java:204) ... It seems that my xsp page (which is processed by the session transformer) is attempting to access session context without there being a session. I was under the (perhaps incorrect) assumption that when you use the session transformer that it creates a session if necessary. The session documentation doesn't say very much on this issue. Many thanks in advance for any tips (or pointers to relevant docs/howtos). My ultimate goal is to implement forms with validation, but I haven't yet studied all the XMLForms or Schematron stuff (any advice for which one to look at first or pointers to examples?). Best wishes to all, Alan Hodgkinson P.S. Here are portions of the revelent files: ----- The pipeline from the sitemap <!-- Form Handler --> <map:match pattern="*-form.html"> <map:generate type="serverpages" src="xsp/{1}-form.xsp"/> <map:transform type="session"/> <map:transform src="xsp/form2html.xslt"/> <map:transform src="xsp/simple-page2html.xsl"/> <map:serialize/> </map:match> ----- The XSP page that caused the error: user-form.xsp (Which is called with the url user-form.html) <xsp:page language="java" create-session="yes" xmlns:xsp="http://apache.org/xsp" xmlns:session="http://cocoon.apache.org/session/1.0"> <page> <title>New User Entry</title> <!-- Question: is this needed? --> <session:createcontext name="userdata"/> <content> Enter information about the new user: <session:form name="userInfo"> <session:action>user-info.html</session:action> <session:content> <table> <tr> <td>User ID</td> <td><session:inputxml context="userdata" path="/user/userId" name="userId" type="text"/> </td> ... </table> <!-- Question: coocon seems to need context & path, why? --> <session:inputxml context="userdata" path="/usr/submit" name="submit" type="submit" value="Create User"/> </session:content> </session:form> </content> </page> </xsp:page> ------ --------------------------------------------------------------------- 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]>