I have seen this subject (Cocoon with Servlets) in a huge number of archive
Anyway no one can explain me how my problem can be solved (I do not find the right one !!)
The problem is : how can I retrieve java object in a cocoon session ?
My example:
I have a cocoon XLM / XSL showing a HTML page (That works !)
This HTML contains a form which call my Servlet1 (That works !)
<form action=""Servlet1"" method="post>
Your name: <input type="text" name="thename"/>
</form>
This Servlet1 make a senRedirect to ../Cocoon/servlet2 (Good that works)
the site map contains:
<map:pipeline>
<map:match pattern="servlet2">
<map:generate src=""http://localhost:8080/Cocoontest/servlet/cocontest.Servlet2"/>
<map:transform src=""appl/servlet2.xsl"/>
<map:serialize/>
</map:match>
</map:pipeline>
The cocoontest.Servlet2 write a xml layout in the generator
this one is transformed by the "appl/servlet2.xsl"
and serialized in a HTML page.
All this stuff works well.
In my Servlet1 I put some attributes in the session:
HttpSession session = request.getSession();
session.setAttribute=("test","cocoon is great !!");
In my Servlet2 I get this attribute:
String value = (String) session.getAttribute("test");
This instruction return a null in the String value.
Does that means that the session of the first called servlet and the session of the second calling servlet are not the same ?
If no: ====> what is wrong ?
if yes: how can I put objects in session that can be retrieved by servlets writing in the Cocoon generator ?
Thanks a lot for advice and help
René Clais