cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Graaf, Edgar de (fin)" <Edgar.de.Gr...@ordina.nl>
Subject RE: Actions Programming
Date Wed, 01 May 2002 08:04:37 GMT
Michael,

I see 'request.setAttribute("hello", "world");'

but you request the parameter hello and not the attribute hello.
try:
<xsp-request:get-attribute name = "hello"/>

regards

Edgar

-----Oorspronkelijk bericht-----
Van: Michael Mangeng [mailto:m1k3@vis.at]
Verzonden: woensdag 1 mei 2002 9:20
Aan: cocoon-users@xml.apache.org
Onderwerp: Re: Actions Programming


Hi

here more information...

my hello_world.xsp:
-----------
<?xml version="1.0" encoding="UTF-8"?>
<xsp:page 
          language="java" 
          xmlns:xsp="http://apache.org/xsp"
          xmlns:xsp-request="http://apache.org/xsp/request/2.0"
          xmlns:i18n="http://apache.org/cocoon/i18n/2.0">

<para>Hello <xsp-request:get-parameter name="hello"/>.</para>
</xsp:page>
-----------

=> There is no typo and the XSP Namespace is declared...

sitemap:

 <map:components>
...
  <map:actions>
    <map:action name="hw" src="vis.HelloWorldAction"/>
  </map:actions>
...
</map:components>
<map:pipelines>
   <map:pipeline>
    <map:match pattern="hw">
  <map:act type="hw"> 
    <map:generate type="serverpages" src="xsp/{world}_world.xsp"/>
  </map:act>
  <map:serialize/>
</map:match>
...
--------------

HelloWorldAction.java:
-------
... package declaration, bunch of imports, class start, method start

    Map sitemapParams = new HashMap();
    sitemapParams.put("world", "hello");

    Request request = (Request) objectModel.get(Constants.REQUEST_OBJECT);
    request.setAttribute("hello", "world");
    return sitemapParams;
-------

i hop this will help..

greetings mike


---------------------------------------------------------------------
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: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>

---------------------------------------------------------------------
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: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message