cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tobias Luikard <t.luik...@exxcellent.de>
Subject Re: Action vs. Request
Date Mon, 17 Sep 2001 14:29:44 GMT
Hi,

this isn't the problem.

In the Action I try to set XMLString as seen. But when I try to read it in the XSP with the
following statement it's empty (I get
"EGAL" as result):
   <xsp-request:get-parameter name="XMLString" default="EGAL"/>

When I call the pipeline in my Browser like:

http://localhost:8080/cocoon/XMLDB_EVAL/XMLTest.html?TestString=ABCDEFG

The ABCDEFG apperars in the XSP Site (in the response in the Web-Browser) but the System.out.println
only prints "null".

So it seems there are different independent request objects.

Any other hint?

Tobias


Christian Schmitt wrote:

> Hi,
> in your Action source code you are doing:
> request.setAttribute("XMLString", XMLString);
>                       ^^^^^^^^^
> but then
> System.out.println(request.getAttribute("TestString"));
>                                          ^^^^^^^^^^
> May be that's the problem?!
>
> Hth,
> Christian
>
> On Mon, Sep 17, 2001 at 11:59:38AM +0200, Tobias Luikard wrote:
> > Hi all,
> >
> > its me again.
> >
> > I tried to write a Action which adds a Attibute to the request. But
> > somehow a different request is used. When I try to access a request
> > attibute its "null". When I add a attibute, its null in the XSP Site...
> >
> > Has anyone a hint?
> >
> > Thanks
> >
> > By
> >
> > Tobi
> >
> > P.S. I added my sitemap.xmap and the actor
>
> > <?xml version="1.0"?>
> > <!-- edited with XML Spy v3.5 NT (http://www.xmlspy.com) by Tobias Luikard (Exxcellent)
-->
> > <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
> >       <!-- =========================== Components ================================
-->
> >       <map:components>
> >               <map:generators default="file">
> >                       <map:generator label="content" name="file" src="org.apache.cocoon.generation.FileGenerator"/>
> >                       <map:generator label="content" name="serverpages" src="org.apache.cocoon.generation.ServerPagesGenerator"/>
> >               </map:generators>
> >               <map:transformers default="xslt">
> >                       <map:transformer name="xslt" src="org.apache.cocoon.transformation.TraxTransformer">
> >                               <use-store>true</use-store>
> >                               <use-request-parameters>false</use-request-parameters>
> >                               <use-browser-capabilities-db>false</use-browser-capabilities-db>
> >                       </map:transformer>
> >               </map:transformers>
> >               <map:readers default="resource">
> >                       <map:reader name="resource" src="org.apache.cocoon.reading.ResourceReader"/>
> >               </map:readers>
> >               <map:serializers default="html">
> >                       <map:serializer name="links" src="org.apache.cocoon.serialization.LinkSerializer"/>
> >                       <map:serializer mime-type="text/xml" name="xml" src="org.apache.cocoon.serialization.XMLSerializer"/>
> >                       <map:serializer mime-type="text/html" name="html" src="org.apache.cocoon.serialization.HTMLSerializer"/>
> >               </map:serializers>
> >               <map:selectors default="browser"/>
> >               <map:matchers default="wildcard">
> >                       <map:matcher name="wildcard" src="org.apache.cocoon.matching.WildcardURIMatcherFactory"/>
> >               </map:matchers>
> >               <map:actions default="XMLProducer">
> >                       <map:action name="XMLProducer" src="de.exxcellent.cocoon.acting.XMLActionTest"/>
> >               </map:actions>
> >       </map:components>
> >       <!-- =========================== Pipelines =================================
-->
> >       <map:pipelines>
> >               <map:pipeline>
> >                       <map:match pattern="">
> >                               <map:redirect-to uri="ot.html"/>
> >                       </map:match>
> >                       <map:match pattern="ot.html">
> >                               <map:generate src="ot.xml"/>
> >                               <map:transform src="ot.xsl"/>
> >                               <map:serialize/>
> >                       </map:match>
> >                       <map:match pattern="XMLTest.html">
> >                               <map:act type="XMLProducer">
> >                               <map:generate type="serverpages" src="XMLTest.xsp"/>
> >                               <map:serialize type="xml"/>
> >                               </map:act>
> >                       </map:match>
> >               </map:pipeline>
> >       </map:pipelines>
> > </map:sitemap>
> > <!-- end of file -->
> >
>
> > ---------------------------------------------------------------------
> > 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>


---------------------------------------------------------------------
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