You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Michael Edge <mi...@db.com> on 2002/11/08 10:24:09 UTC

Displaying 'progress' screen for long running reports

Hi

I have a Cocoon application that provides a front-end to a reporting system, and some of the reports take quite a while to run - in the order of 5-10 minutes. I need to provide a feature whereby the user submits the report request and a screen appears that polls the report every 10 seconds or so to determine if the reporting file has been created. When it has, it will be displayed, otherwise the screen will keep displaying a helpful message to the user. Any ideas on how to do this using Cocoon?

The workflow is something like this:
1) User clicks 'Run Report'
2) Request is submitted to reporting system and a helpful 'progress' screen is returned to the user
3) The progress screen checks for the report by submitting a URL. If a 404 is returned, continue to display the 'progress' screen, otherwise display the report.

Regards

Michael



--

This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.



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


complete failure to integrate an additional servlet into cocoon

Posted by Hussayn Dabbous <da...@saxess.com>.
Hy;

  Does anyone know, if the following Wiki-Howto applies to
  cocoon-2.0.3 or does it apply for newer releases only???

     http://outerthought.net/wiki/Wiki.jsp?page=IntegrateAServlet


  Could someone tell me, if there is a difference between
  this notation:

     <map:pipeline>
      <map:match pattern="**/app">
       <map:generate src="/metasearch/internal/app"/>
       ...
       <map:serialize/>
      </map:match>
     </map:pipeline>

  compared to this one:

     <map:pipeline match="**/app">
       <map:generate src="/metasearch/internal/app"/>
       ...
       <map:serialize/>
     </map:pipeline>

  Anyway both notations won't work for me.
  I am completely stuck after hours and hours of try and
  error with my servlet integration ...
  My problem is described below. I posted it into the
  cocoon-user list, but nobody could help so far.
  maybe someone from this list could give me a hint .... please ???

  regards, Hussayn

> Hussayn Dabbous wrote:
> 
>> Hy;
>>
>> I tried to add another servlet to the cocoon webapp.
>> i found a HOWTO in the cocoon-wiki, but it doesn't
>> work (for me) as expected. I'm shure, the solution
>> to this is trivial, but i don't see it.
>>
>> what i want to achieve:
>>
>> I want to call a servlet and it's output shall be
>> placed into a pipeline for further processing with cocoon.
>> I need the servlet in the cocoon context because i want
>> to keep things simple (maybe a wrong assumption :-))
>> and i need the session context also within my servlet.
>>
>> Here is what i did so far:
>>
>> 1.) add the new servlet spec to cocoon/WEB-INF/web.xml:
>>
>>   <servlet>
>>     <servlet-name>Zoro</servlet-name>
>>     <servlet-class>com.saxess.zob.Zoro</servlet-class>
>>     <load-on-startup>1</load-on-startup>
>>   </servlet>
>>
>>   <servlet-mapping>
>>     <servlet-name>Zoro</servlet-name>
>>     <url-pattern>*internal/app</url-pattern>
>>   </servlet-mapping>
>>
>>   What i want here is:
>>   every request, that ends with "...internal/app"
>>   shall be mapped to the servlet "Zoro"
>>
>>   How can i test, that the servlet is really called and
>>   executed without interfering with the cocoon sitemap?
>>
>> 2.) add a sitemap entry:
>>
>>   <map:match pattern="**/app">
>>     <map:generate src="/metasearch/internal/app"/>
>>     ...
>>     <map:serialize/>
>>   </map:match>
>>
>>   what i want here is:
>>   The servlet is called and it's result is streamed into the pipeline
>>   and  processed further ...
>>
>>   Unfortunately the system does NOT attempt to call the servlet,
>>   but tries to load a file. i get following exception:
>>
>>   Exception during processing of file:/metasearch/internal/app
>>
>>   I also tried using
>>
>>   <map:generate src="context::/metasearch/internal/app"/>
>>
>>   although i don't uinderstand, what i'm doing there. In fact it also
>>   didn't work ;-(
>>
>> An now i'm stuck again. OK, people, i promise you, if i get my
>> app finally working, i will write down all bits and peaces and
>> donate this to the cocoon documentation , the wiki and whatever
>> is reasonable.
>>
>> Any comment would help again...
>>
>> regards, Hussayn
>>
>>
>>
>> ---------------------------------------------------------------------
>> 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>
>>
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: HOWTO integrate a servlet into cocoon

Posted by SAXESS - Hussayn Dabbous <da...@saxess.com>.
Hy again;

Does anyone know, if the following Wiki Howto applies to
cocoon-2.0.3 or does it apply for newer releases only???

    http://outerthought.net/wiki/Wiki.jsp?page=IntegrateAServlet

I am still stuck after hours and hours of try and error with
my servlet integration ...

anyone any idea, what might go wrong ?

Could someone tell me, if there is a difference between
this notation:

    <map:pipeline>
     <map:match pattern="**/app">
      <map:generate src="/metasearch/internal/app"/>
      ...
      <map:serialize/>
     </map:match>
    </map:pipeline>

compared to this one:

    <map:pipeline match="**/app">
      <map:generate src="/metasearch/internal/app"/>
      ...
      <map:serialize/>
    </map:pipeline>

I'm clueless... any comment ???

regards, Hussayn

Hussayn Dabbous wrote:
> Hy;
> 
> I tried to add another servlet to the cocoon webapp.
> i found a HOWTO in the cocoon-wiki, but it doesn't
> work (for me) as expected. I'm shure, the solution
> to this is trivial, but i don't see it.
> 
> what i want to achieve:
> 
> I want to call a servlet and it's output shall be
> placed into a pipeline for further processing with cocoon.
> I need the servlet in the cocoon context because i want
> to keep things simple (maybe a wrong assumption :-))
> and i need the session context also within my servlet.
> 
> Here is what i did so far:
> 
> 1.) add the new servlet spec to cocoon/WEB-INF/web.xml:
> 
>   <servlet>
>     <servlet-name>Zoro</servlet-name>
>     <servlet-class>com.saxess.zob.Zoro</servlet-class>
>     <load-on-startup>1</load-on-startup>
>   </servlet>
> 
>   <servlet-mapping>
>     <servlet-name>Zoro</servlet-name>
>     <url-pattern>*internal/app</url-pattern>
>   </servlet-mapping>
> 
>   What i want here is:
>   every request, that ends with "...internal/app"
>   shall be mapped to the servlet "Zoro"
> 
>   How can i test, that the servlet is really called and
>   executed without interfering with the cocoon sitemap?
> 
> 2.) add a sitemap entry:
> 
>   <map:match pattern="**/app">
>     <map:generate src="/metasearch/internal/app"/>
>     ...
>     <map:serialize/>
>   </map:match>
> 
>   what i want here is:
>   The servlet is called and it's result is streamed into the pipeline
>   and  processed further ...
> 
>   Unfortunately the system does NOT attempt to call the servlet,
>   but tries to load a file. i get following exception:
> 
>   Exception during processing of file:/metasearch/internal/app
> 
>   I also tried using
> 
>   <map:generate src="context::/metasearch/internal/app"/>
> 
>   although i don't uinderstand, what i'm doing there. In fact it also
>   didn't work ;-(
> 
> An now i'm stuck again. OK, people, i promise you, if i get my
> app finally working, i will write down all bits and peaces and
> donate this to the cocoon documentation , the wiki and whatever
> is reasonable.
> 
> Any comment would help again...
> 
> regards, Hussayn
> 
> 
> 
> ---------------------------------------------------------------------
> 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>
> 

-- 
Dr. Hussayn Dabbous
SAXESS Software Design GmbH
Neuenhöfer Allee 125
50935 Köln
Telefon: +49-221-56011-0
Fax:     +49-221-56011-20
E-Mail:  dabbous@saxess.com


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


HOWTO integrate a servlet into cocoon (wiki-howto incorrect?)

Posted by Hussayn Dabbous <da...@saxess.com>.
Hy;

I tried to add another servlet to the cocoon webapp.
i found a HOWTO in the cocoon-wiki, but it doesn't
work (for me) as expected. I'm shure, the solution
to this is trivial, but i don't see it.

what i want to achieve:

I want to call a servlet and it's output shall be
placed into a pipeline for further processing with cocoon.
I need the servlet in the cocoon context because i want
to keep things simple (maybe a wrong assumption :-))
and i need the session context also within my servlet.

Here is what i did so far:

1.) add the new servlet spec to cocoon/WEB-INF/web.xml:

   <servlet>
     <servlet-name>Zoro</servlet-name>
     <servlet-class>com.saxess.zob.Zoro</servlet-class>
     <load-on-startup>1</load-on-startup>
   </servlet>

   <servlet-mapping>
     <servlet-name>Zoro</servlet-name>
     <url-pattern>*internal/app</url-pattern>
   </servlet-mapping>

   What i want here is:
   every request, that ends with "...internal/app"
   shall be mapped to the servlet "Zoro"

   How can i test, that the servlet is really called and
   executed without interfering with the cocoon sitemap?

2.) add a sitemap entry:

   <map:match pattern="**/app">
     <map:generate src="/metasearch/internal/app"/>
     ...
     <map:serialize/>
   </map:match>

   what i want here is:
   The servlet is called and it's result is streamed into the pipeline
   and  processed further ...

   Unfortunately the system does NOT attempt to call the servlet,
   but tries to load a file. i get following exception:

   Exception during processing of file:/metasearch/internal/app

   I also tried using

   <map:generate src="context::/metasearch/internal/app"/>

   although i don't uinderstand, what i'm doing there. In fact it also
   didn't work ;-(

An now i'm stuck again. OK, people, i promise you, if i get my
app finally working, i will write down all bits and peaces and
donate this to the cocoon documentation , the wiki and whatever
is reasonable.

Any comment would help again...

regards, Hussayn



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