Re: how to serve static content from webserver?

2002-12-03 Thread Jakob

Alex McLintock said:
> At 14:04 03/12/02, you wrote:
>>I want static files (images, js, css) be served by the web server
>> (apache port 80).
>
> You set up your Apache front end to serve static content - eg from a
> directory called images, or js, or static, and you set up apache to
> forward  dynamic stuff to your java servlet engine and thus Cocoon.
>
> What precisely is the problem you are having?

Actually, in the meantime I have investigated a bit further.

To recall: in my httpd.conf, I added the following line:
Alias /rules/ "E:/temp/rules/"

In the E:/temp/rules/ directory are all the images, js, css.  Apache
restarted ...

If I have my stylesheet generate a URL like
http://localhost:80/rules/go_cocoon.js";>

this works.  However, if I instruct it to only generate


it won't find the resource.

Well, I am already happy to have it kind of working, but it's not very
portable if I have to construct a full URL for each resource.  There
probably is still a better way than that.

Thanks for your responses so far.

Cheers,
Jakob.



-
Please check that your question  has not already been answered in the
FAQ before posting. 

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




Re: how to serve static content from webserver?

2002-12-03 Thread Geoff Howard
by specifying :8080 you have forced (tomcat) to handle
the image - apache is only listening on 80.  Are you
saying that when you try the same url with default
port 80 you are not seeing the image?  If so,
something is wrong in your first two steps.  Once you
have configured apache to handle the images, you don't
need any of the resource pipeline setup you have
described below.  

How are you serving your dynamic pages?  If they are
on :8080 (no connector to apache, no port forwarding)
then the images are at 80, but you'll have to
construct absolute references to them
(http://localhost/rules/img/[imgname].gif).  Relative
references (/rules...) will reference back to :8080
and bypass.

If, on the other hand you are using some method to
cause your servlet container to be accessed on default
port 80, you need to look into how you are
accomplishing that and whether it is overriding your
attempt to let apache handle static images.

HTH, 
Geoff Howard

--- Jakob <[EMAIL PROTECTED]> wrote:
> 
> Hi there,
> 
> I want static files (images, js, css) be served by
> the web server (apache
> port 80).
> 
> I have found a FAQ "How can I improve performance by
> making the web-server
> deliver the static contents?" which partly answers
> this questions.
> 
> I have successfully followed steps 1 and 2.
> 
> However, the third list item  "3. Reference the
> static contents in your
> Cocoon app ..." is not clear at all to me.  What am
> I supposed to do
> exactly?
> 
> My XSLT stylesheet produces HTML output where, for
> example all images
> paths are created as "/rules/img/[imgname].gif". 
> Thus, I have created a
>  element as this:
> 
> 
>  
>   
>  
> 
> 
> Ok, then I have created this resources snippet which
> I thought should be
> called when the pattern is matched:
> 
>   
>
> 
>
>   
> 
> However, the url of an image is still
> "localhost:8080/rules/img/[image].gif"
> 
> So, I guess this is the wrong approach.  Anybody?
> 
> Thanks in advance,
> Jakob.
> 
> 
> -- 
> Jakob.
> 
> 
> 
>
-
> Please check that your question  has not already
> been answered in the
> FAQ before posting.
> 
> 
> To unsubscribe, e-mail:
> <[EMAIL PROTECTED]>
> For additional commands, e-mail:  
> <[EMAIL PROTECTED]>
> 


__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

-
Please check that your question  has not already been answered in the
FAQ before posting. 

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




Re: how to serve static content from webserver?

2002-12-03 Thread Alex McLintock
At 14:04 03/12/02, you wrote:

I want static files (images, js, css) be served by the web server (apache
port 80).


You set up your Apache front end to serve static content - eg from a 
directory called images, or js, or static, and you set up apache to forward 
dynamic stuff to your java servlet engine and thus Cocoon.

What precisely is the problem you are having?

Alex



Openweb Analysts Ltd, London.
Software For Complex Websites http://www.OWAL.co.uk/
Open Source Software Companies please register here 
http://www.OWAL.co.uk/oss_support/


-
Please check that your question  has not already been answered in the
FAQ before posting. 

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