You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Mike Ash <ma...@euronetworldwide.com> on 2002/08/28 18:31:57 UTC
Request-parameter matcher and cinclude
When I use this combination below I get out of memory errors, the first
request to the server works fine I get the login2.xsp (its below as well).
When the second request comes up (button is pressed from the login page) it
throw out of memory errors. If I don't do the cinclude in the
request-parameter matcher the "footer.xsp" works fine. Am I just using
things wrong?
Here is my pipeline
<map:pipeline>
<map:match pattern="">
<map:generate src="xsp/login2.xsp" type="serverpages"/>
<map:transform type="cinclude"/>
<map:transform src="xsl/simple.xsl"/>
<map:serialize />
</map:match>
<map:match pattern="MyWelcome" type="request-parameter">
<map:generate type="serverpages" src="xsp/footer.xsp" />
<map:transform type="cinclude"/>
<map:transform src="xsl/simple.xsl"/>
<map:serialize />
</map:match>
<map:match pattern="**.xsp">
<map:generate type="serverpages" src="xsp/{1}.xsp"/>
<map:transform type="i18n"/>
<map:serialize type="xml"/>
</map:match>
</map:pipeline
*****login2.xsp *****
<?xml version="1.0" encoding="UTF-8"?>
<xsp:page language="java"
xmlns:xsp="http://apache.org/xsp"
xmlns:cinclude="http://apache.org/cocoon/include/1.0"
>
<page>
<cinclude:include src="cocoon://loginEntity2.xsp"/>
</page>
</xsp:page>
*******loginEntity2.xsp ******
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsp:page language="java"
xmlns:xsp="http://apache.org/xsp"
>
<content>
<form method="POST" >
<structure>
<row>
<column width="36%" align="right">
<span class="formLabel"> </span>
</column>
<column>
<input type="submit" id="MyWelcome"
name="MyWelcome" value="MyLogin"/>
</column>
</row>
</structure>
</form>
</content>
</xsp:page>
****welcome.xsp******
<?xml version="1.0" encoding="UTF-8"?>
<xsp:page language="java"
xmlns:xsp="http://apache.org/xsp"
xmlns:cinclude="http://apache.org/cocoon/include/1.0"
>
<cinclude:include src="cocoon://footer.xsp"/>
</xsp:page>
****footer.xsp*******
<?xml version="1.0" encoding="UTF-8"?>
<xsp:page language="java"
xmlns:xsp="http://apache.org/xsp"
xmlns:i18n="http://apache.org/cocoon/i18n/2.0"
>
<footer>
<copyright>
Copyright (c) 2002 Euronet Worldwide, Inc. All
Rights Reserved.
</copyright>
</footer>
</xsp:page>
Re: Request-parameter matcher and cinclude
Posted by Vadim Gritsenko <va...@verizon.net>.
Mike Ash wrote:
> When I use this combination below I get out of memory errors, the
> first request to the server works fine I get the login2.xsp (its below
> as well). When the second request comes up (button is pressed from
> the login page) it throw out of memory errors. If I don't do the
> cinclude in the request-parameter matcher the "footer.xsp" works
> fine. Am I just using things wrong?
>
Don't see anything wrong here. Assuming you don't create infinite loops,
this should work fine. Try increasing memory for the Java VM.
Vadim
> Here is my pipeline
>
> <map:pipeline>
>
> <map:match pattern="">
> <map:generate src="xsp/login2.xsp" type="serverpages"/>
> <map:transform type="cinclude"/>
> <map:transform src="xsl/simple.xsl"/>
> <map:serialize />
> </map:match>
>
>
> <map:match pattern="MyWelcome" type="request-parameter">
> <map:generate type="serverpages" src="xsp/footer.xsp" />
> <map:transform type="cinclude"/>
> <map:transform src="xsl/simple.xsl"/>
> <map:serialize />
> </map:match>
>
> <map:match pattern="**.xsp">
> <map:generate type="serverpages" src="xsp/{1}.xsp"/>
> <map:transform type="i18n"/>
> <map:serialize type="xml"/>
> </map:match>
> </map:pipeline
>
>
> *****login2.xsp *****
>
> <?xml version="1.0" encoding="UTF-8"?>
> <xsp:page language="java"
> xmlns:xsp="http://apache.org/xsp"
>
> xmlns:cinclude="http://apache.org/cocoon/include/1.0"
> >
> <page>
> <cinclude:include src="cocoon://loginEntity2.xsp"/>
> </page>
> </xsp:page>
>
>
> *******loginEntity2.xsp ******
>
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <xsp:page language="java"
> xmlns:xsp="http://apache.org/xsp"
> >
>
> <content>
> <form method="POST" >
> <structure>
> <row>
> <column width="36%" align="right">
> <span class="formLabel"> </span>
> </column>
> <column>
> <input type="submit" id="MyWelcome"
> name="MyWelcome" value="MyLogin"/>
> </column>
> </row>
> </structure>
> </form>
> </content>
> </xsp:page>
>
>
> ****welcome.xsp******
>
> <?xml version="1.0" encoding="UTF-8"?>
> <xsp:page language="java"
> xmlns:xsp="http://apache.org/xsp"
>
> xmlns:cinclude="http://apache.org/cocoon/include/1.0"
> >
> <cinclude:include src="cocoon://footer.xsp"/>
> </xsp:page>
>
>
> ****footer.xsp*******
>
> <?xml version="1.0" encoding="UTF-8"?>
> <xsp:page language="java"
> xmlns:xsp="http://apache.org/xsp"
>
> xmlns:i18n="http://apache.org/cocoon/i18n/2.0"
> >
> <footer>
> <copyright>
> Copyright (c) 2002 Euronet Worldwide, Inc.
> All Rights Reserved.
> </copyright>
> </footer>
> </xsp:page>
>
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>