cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eduardo Godoy Vega" <>
Subject [C2] What am I doing wrong?
Date Tue, 09 Oct 2001 16:23:00 GMT
here is my problem ... I can't pass parameter from Action to XSP ...

Here goes my code ...

this is my sitemap (a part of)
 <map:action name="unveil-it" src="com.unveil.taglib.cocoon.UnveilAction"/>

<map:match pattern="process-unveil">
  <map:act type="unveil-it" >
   <map:generate type="serverpages" src="do_unveil.xsp"/>
   <map:transform src="stylesheets/llbean-html.xsl"/>


my ActionClass is :

public class UnveilAction extends AbstractAction {
private static java.lang.String UNVEIL_INPUT_FIELD = "Question";

public Map act (Redirector redirector,
                  SourceResolver resolver,
                  Map objectModel,
                  String source,
                  Parameters params) {
Request request  = (Request) objectModel.get (Constants.REQUEST_OBJECT);
if (request == null){
         getLogger().debug ("UnveilAction: no request object");
           return null;
HashMap sitemapParams = new HashMap();
String sQuestion = request.getParameter(UNVEIL_INPUT_FIELD);
if (sQuestion == null){
       getLogger().debug ("UnveilAction: Question is null");
       return null;
sitemapParams.put("result","From Action:"+sQuestion);
request.setAttribute("unveil_result","From Action:"+sQuestion);
return sitemapParams;

and my do_unveil.xsp:
<xsp:page languaje="java" xmlns:xsp=""
<para>GET: <xsp-request:get-parameter name="unveil_result"/>.</para>

BUT unveil_result is always NULL !!

Please check that your question has not already been answered in the
FAQ before posting. <>

To unsubscribe, e-mail: <>
For additional commands, e-mail: <>

View raw message