You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Bartomeu Adrover <to...@uib.es> on 2002/03/20 08:36:00 UTC
Problem in
Hello, I use cocoon 2.01 with apache tomcat 4.01 in windows nt. I
construct an page with varius xml source with <ma:part> tag:
<map:match pattern="index.xml">
<map:aggregate element="root">
<map:part src="cocoon:/noticies.xsrc"/>
<map:part src="personalsci.xml"/>
<map:part src="index.xml"/>
</map:aggregate>
<map:act type="request">
<map:transform src="xsl/principal.xsl">
<map:parameter name="use-request-parameters" value="true"/>
<map:parameter name="homePath" value="{context}/sci"/>
</map:transform>
</map:act>
<map:serialize type="html-iso"/>
</map:match>
The problem is the part <map:part src="cocoon:/noticies.xsrc"/>. This
part get the informatio from other server and sometimes this service is
unaviable. If I consult the url direcly "http://www.uib.es....." when is
unavible all the pipeline return an error.
I thing a solution: use an pipeline that request this url and if an
error happens then process the xml error code and return an usefull xml
for my first pipeline:
<map:pipeline>
<map:match pattern="noticies.xsrc">
<map:generate
src="http://swww.uib.es:9080/Noticies/fllistat.not?p_ubi_codalf=SCI&p_ubi_codalf=SCIIncidencies"/>
<map:serialize type="xml-iso"/>
</map:match>
<map:handle-errors>
<map:transform src="xsl/noticies_error.xsl"/>
<map:serialize type="xml-iso" status-code="200"/>
</map:handle-errors>
</map:pipeline>
When I request the second pipeline I recive the correct xml, but in the
first pipeline continue return an error (url unaviable).
Have one any idea?.
Tanks.
Re: Problem in
Posted by Bartomeu Adrover <to...@uib.es>.
I stop the tomcat and delete the work directory (somtimes don't delete the cache
only stoping the server) and I start the tomcat.
If I remove the line <map:part src="cocoon:/noticies.xsrc"/> the page don't give
me an error, only don't display the information.
The error message reported is: can't access to the url
"http://swww.uib.es:9080/Noticies/fllistat.not?p_ubi_codalf=SCI&p_ub
i_codalf=SCIIncidencies".
Nicola Ken Barozzi wrote:
> From: "Bartomeu Adrover" <to...@uib.es>
>
> > Hello, I use cocoon 2.01 with apache tomcat 4.01 in windows nt. I
> > construct an page with varius xml source with <ma:part> tag:
> > <map:match pattern="index.xml">
> > <map:aggregate element="root">
> > <map:part src="cocoon:/noticies.xsrc"/>
> > <map:part src="personalsci.xml"/>
> > <map:part src="index.xml"/>
> > </map:aggregate>
> > <map:act type="request">
> > <map:transform src="xsl/principal.xsl">
> > <map:parameter name="use-request-parameters" value="true"/>
> > <map:parameter name="homePath" value="{context}/sci"/>
> > </map:transform>
> > </map:act>
> > <map:serialize type="html-iso"/>
> > </map:match>
> > The problem is the part <map:part src="cocoon:/noticies.xsrc"/>. This
> > part get the informatio from other server and sometimes this service is
> > unaviable. If I consult the url direcly "http://www.uib.es....." when is
> > unavible all the pipeline return an error.
> > I thing a solution: use an pipeline that request this url and if an
> > error happens then process the xml error code and return an usefull xml
> > for my first pipeline:
> > <map:pipeline>
> > <map:match pattern="noticies.xsrc">
> > <map:generate
> >
> src="http://swww.uib.es:9080/Noticies/fllistat.not?p_ubi_codalf=SCI&p_ub
> i_codalf=SCIIncidencies"/>
> >
> > <map:serialize type="xml-iso"/>
> > </map:match>
> >
> > <map:handle-errors>
> > <map:transform src="xsl/noticies_error.xsl"/>
> > <map:serialize type="xml-iso" status-code="200"/>
> > </map:handle-errors>
> > </map:pipeline>
> > When I request the second pipeline I recive the correct xml, but in the
> > first pipeline continue return an error (url unaviable).
> > Have one any idea?.
>
> Sorry for the very simple question, but are you sure that all the other
> files in the first pipeline are really available?
> Without <map:part src="cocoon:/noticies.xsrc"/> in the first pipeline do
> you still get an error?
> Are you sure you're not getting cached stuff?
>
> --
> Nicola Ken Barozzi nicolaken@apache.org
> - verba volant, scripta manent -
> (discussions get forgotten, just code remains)
> ---------------------------------------------------------------------
>
> ---------------------------------------------------------------------
> 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: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
Re: Problem in
Posted by Nicola Ken Barozzi <ni...@apache.org>.
From: "Bartomeu Adrover" <to...@uib.es>
> Hello, I use cocoon 2.01 with apache tomcat 4.01 in windows nt. I
> construct an page with varius xml source with <ma:part> tag:
> <map:match pattern="index.xml">
> <map:aggregate element="root">
> <map:part src="cocoon:/noticies.xsrc"/>
> <map:part src="personalsci.xml"/>
> <map:part src="index.xml"/>
> </map:aggregate>
> <map:act type="request">
> <map:transform src="xsl/principal.xsl">
> <map:parameter name="use-request-parameters" value="true"/>
> <map:parameter name="homePath" value="{context}/sci"/>
> </map:transform>
> </map:act>
> <map:serialize type="html-iso"/>
> </map:match>
> The problem is the part <map:part src="cocoon:/noticies.xsrc"/>. This
> part get the informatio from other server and sometimes this service is
> unaviable. If I consult the url direcly "http://www.uib.es....." when is
> unavible all the pipeline return an error.
> I thing a solution: use an pipeline that request this url and if an
> error happens then process the xml error code and return an usefull xml
> for my first pipeline:
> <map:pipeline>
> <map:match pattern="noticies.xsrc">
> <map:generate
>
src="http://swww.uib.es:9080/Noticies/fllistat.not?p_ubi_codalf=SCI&p_ub
i_codalf=SCIIncidencies"/>
>
> <map:serialize type="xml-iso"/>
> </map:match>
>
> <map:handle-errors>
> <map:transform src="xsl/noticies_error.xsl"/>
> <map:serialize type="xml-iso" status-code="200"/>
> </map:handle-errors>
> </map:pipeline>
> When I request the second pipeline I recive the correct xml, but in the
> first pipeline continue return an error (url unaviable).
> Have one any idea?.
Sorry for the very simple question, but are you sure that all the other
files in the first pipeline are really available?
Without <map:part src="cocoon:/noticies.xsrc"/> in the first pipeline do
you still get an error?
Are you sure you're not getting cached stuff?
--
Nicola Ken Barozzi nicolaken@apache.org
- verba volant, scripta manent -
(discussions get forgotten, just code remains)
---------------------------------------------------------------------
---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
RE: Problem in
Posted by Vadim Gritsenko <va...@verizon.net>.
> From: Bartomeu Adrover [mailto:tomeu.adrover@uib.es]
>
> Hello, I use cocoon 2.01 with apache tomcat 4.01 in windows nt. I
> construct an page with varius xml source with <ma:part> tag:
> <map:match pattern="index.xml">
> <map:aggregate element="root">
> <map:part src="cocoon:/noticies.xsrc"/>
> <map:part src="personalsci.xml"/>
> <map:part src="index.xml"/>
> </map:aggregate>
> <map:act type="request">
> <map:transform src="xsl/principal.xsl">
> <map:parameter name="use-request-parameters" value="true"/>
> <map:parameter name="homePath" value="{context}/sci"/>
> </map:transform>
> </map:act>
> <map:serialize type="html-iso"/>
> </map:match>
> The problem is the part <map:part src="cocoon:/noticies.xsrc"/>. This
> part get the informatio from other server and sometimes this service
is
> unaviable. If I consult the url direcly "http://www.uib.es....." when
is
> unavible all the pipeline return an error.
> I thing a solution: use an pipeline that request this url and if an
> error happens then process the xml error code and return an usefull
xml
> for my first pipeline:
> <map:pipeline>
> <map:match pattern="noticies.xsrc">
> <map:generate
>
src="http://swww.uib.es:9080/Noticies/fllistat.not?p_ubi_codalf=SCI&
p_ubi_
> codalf=SCIIncidencies"/>
>
> <map:serialize type="xml-iso"/>
> </map:match>
>
> <map:handle-errors>
> <map:transform src="xsl/noticies_error.xsl"/>
> <map:serialize type="xml-iso" status-code="200"/>
> </map:handle-errors>
> </map:pipeline>
> When I request the second pipeline I recive the correct xml, but in
the
> first pipeline continue return an error (url unaviable).
> Have one any idea?.
This map:handle-errors is not executed when you invoke the pipeline from
internally, using cocoon: uri. Instead, add this handle-error to the
first pipeline with the aggregate.
Vadim
---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>