Action vs. Request

2001-09-17 Thread Tobias Luikard

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

 XMLActionTest.java

?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-storetrue/use-store
use-request-parametersfalse/use-request-parameters

use-browser-capabilities-dbfalse/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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


AW: Action vs. Request

2001-09-17 Thread Jorn Heid

That's it, isn't it:
request.getAttribute is not equal to request.getParameter



-Ursprungliche Nachricht-
Von: Tobias Luikard [mailto:[EMAIL PROTECTED]]
Gesendet: Montag, 17. September 2001 16:30
An: [EMAIL PROTECTED]
Betreff: Re: Action vs. Request


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-storetrue/use-store
 
use-request-parametersfalse/use-request-parameters
 
use-browser-capabilities-dbfalse/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: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]

 -
 Please check that your question has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon

Re: Action vs. Request

2001-09-17 Thread Christian Haul

On 17.Sep.2001 -- 04:29 PM, Tobias Luikard wrote:
 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/
  
  request.setAttribute(XMLString, XMLString);
   ^
Obviously, you need to xsp-request:get-attribute name=XMLString default=EGAL/
^
Chris.

-- 
C h r i s t i a n   H a u l
[EMAIL PROTECTED]
fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08

-
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Action vs. Request

2001-09-17 Thread Tobias Luikard

I just copied the example from the docu...

See http://xml.apache.org/cocoon2/actions.html

there is also a attribute set and a parameter requested. Sorry. But now it works

Thanks a lot

Tobias

Christian Schmitt wrote:

 Hi Tobias,
 OK, I see. But I believe you're mixing up request attributes and
 request parameters.
 If you do something like: request.setAttribute(MyAttribute, whatever);
 you can't do: request.getParameter(MyAttribute);

 Hth,
 Christian

 On Mon, Sep 17, 2001 at 04:29:44PM +0200, Tobias Luikard wrote:
  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-storetrue/use-store
  
use-request-parametersfalse/use-request-parameters
  
use-browser-capabilities-dbfalse/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

Re: Action vs. Request

2001-09-17 Thread Giacomo Pati

Quoting Tobias Luikard [EMAIL PROTECTED]:

 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/

You are reading the Parameter XMLString not the Attribute.

Giacomo

 
 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-storetrue/use-store

 use-request-parametersfalse/use-request-parameters

 use-browser-capabilities-dbfalse/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: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
 
  -
  Please check that your question has not already been answered in the
  FAQ