Lajos,

sure this is more elegant, but also slower than using the web-server directly... I 
hate going back to the Application server if not
absolutely necessary :(

Regards,

---------------------------------------------
               Luca Morandini
               GIS Consultant
              [EMAIL PROTECTED]
http://utenti.tripod.it/lmorandini/index.html
---------------------------------------------


> -----Original Message-----
> From: Lajos [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, February 13, 2003 6:48 PM
> To: [EMAIL PROTECTED]
> Subject: Re: how can i get static files REALLY been processed by apache
> ???
>
>
> Hi Hussayn -
>
> Here is what I do in almost every cocoon app I do:
>
> <map:match pattern="styles.css">
>   <map:read mime-type="text/css" src="/styles/styles.css"/>
> </map:match>
> <map:match pattern="**/styles.css">
>   <map:read mime-type="text/css" src="/styles/styles.css"/>
> </map:match>
>
> <map:match pattern="*.gif">
>   <map:read mime-type="image/gif" src="/images/{1}.gif"/>
> </map:match>
> <map:match pattern="**/*.gif">
>   <map:read mime-type="image/gif" src="/images/{2}.gif"/>
> </map:match>
>
> Any gif or css (and you can do the same for jpg, js, etc.) gets
> redirected to the appropriate directory off the webserver root, and
> hence is served by Apache. So, under Apache's DocumentRoot I have
> /images, /styles, /scripts, etc., etc.
>
> Regards,
>
> Lajos
>
>
> SAXESS - Hussayn Dabbous wrote:
> > hy,
> >
> > thats a very pragmatic idea. i like such approaches.
> > but, hmm... wouldn't this need lots of "static" links
> > in your pages ???
> >
> > i mean, you really must point to the myapp-static pages
> > with absolute links. What about maintenance ... ???
> >
> > seems as if i need to do it in this way, or let cocoon
> > serve everything ;-(
> >
> > Maybe i can plugin something in to apache, or would it be
> > a big problem to get mod_JK do what i want (hacking ...) ???
> > I'll go and ask the apache-group ...
> > and report back, what i get from there maybe in a Wiki ;-) ?
> >
> > anyway thanks for the tip...
> >
> > regards, hussayn
> >
> >
> > Luca Morandini wrote:
> >
> >> Hussayn,
> >>
> >> I know it is not a smart solution, but it worked for me.
> >>
> >> 1) Setup mod_jk to redirect everything starting with "myapp" to
> >> Tomcat/Cocoon
> >> 2) Setup an alias named "myapp-static" pointed to a directory
> >> containing your static files
> >> 3) Use URI like "/myapp/dynamic.htlm" for dynamic content and URI like
> >> "/myapp-static/static.html" for static content
> >>
> >> This has the advantage of scaling up well: we have three web-servers
> >> serving the static content ("/myapp-static/*") and one
> >> app-server serving the Cocoon-generated content ("/myapp/*").
> >>
> >> Regards.
> >>
> >> ---------------------------------------------
> >>                Luca Morandini
> >>                GIS Consultant
> >>               [EMAIL PROTECTED]
> >> http://utenti.tripod.it/lmorandini/index.html
> >> ---------------------------------------------
> >>
> >>
> >>
> >>> -----Original Message-----
> >>> From: SAXESS - Hussayn Dabbous [mailto:[EMAIL PROTECTED]]
> >>> Sent: Thursday, February 13, 2003 6:14 PM
> >>> To: [EMAIL PROTECTED]
> >>> Subject: how can i get static files REALLY been processed by apache ???
> >>>
> >>>
> >>> Hy;
> >>>
> >>> When i setup apache/tomcat/cocoon, i run into following
> >>> fancy problem. Although what i want seems trivial, but i did not
> >>> manage to get it done (I might not know the magic command to get
> >>> round it)
> >>>
> >>> Here is the problem:
> >>>
> >>> 1.) I want all static files been served by apache, i.e.:
> >>>
> >>>     *.gif, *.html, *.jpg
> >>>
> >>> 2.) I want *ALL* other files be served by cocoon.
> >>>
> >>>
> >>> Now how should i setup mod_jk.conf ????
> >>>
> >>> this doesn't help:
> >>>
> >>> <IfModule mod_jk.c>
> >>>   JkWorkersFile /etc/httpd/conf/workers.properties
> >>>   JkLogFile     /var/log/httpd/mod_jk.log
> >>>   JkLogLevel error
> >>>   JkMount /cocoon   cocoon
> >>>   JkMount /cocoon/  cocoon
> >>>   JkMount /cocon/*  cocoon
> >>> </IfModule>
> >>>
> >>> because it redirects everything to cocoon. But apache shall
> >>> serve the files mentioned above ...
> >>>
> >>> This is not complete (Indeed it can never be complete):
> >>> <IfModule mod_jk.c>
> >>>   JkWorkersFile /etc/httpd/conf/workers.properties
> >>>   JkLogFile     /var/log/httpd/mod_jk.log
> >>>   JkLogLevel error
> >>>   JkMount /cocoon/*.xml   cocoon
> >>>   JkMount /cocoon/*.jsp   cocoon
> >>>   JkMount /cocon/*.foo    cocoon
> >>>   ...
> >>> </IfModule>
> >>>
> >>> The list could potentially go down endlessly.
> >>> There MUST be an obvious solution to this!
> >>>
> >>> Anyone can help me here ?
> >>>
> >>> regards, Hussayn
> >>>
> >>> --
> >>> 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:  [EMAIL PROTECTED]
> >>>
> >>>
> >>> ---------------------------------------------------------------------
> >>> 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:     <[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/faq/index.html>
> >>
> >> To unsubscribe, e-mail:     <[EMAIL PROTECTED]>
> >> For additional commands, e-mail:   <[EMAIL PROTECTED]>
> >>
> >
>
>
> --
>
>
>
>                     Lajos Moczar
>        ----------------------------------------
>      Open Source Support, Consulting and Training
>        ----------------------------------------
>              Cocoon Developer's Handbook
>   (www.amazon.com/exec/obidos/tg/detail/-/0672322579)
>
>                     _      _____
>                    / \         /
>                   /___\      /
>                  /     \   /____
>
>       http://www.galatea.com -- powered by AzSSL
>
>
> ---------------------------------------------------------------------
> 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:     <[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/faq/index.html>

To unsubscribe, e-mail:     <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>

Reply via email to