You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by "Vince M. Clark" <vc...@globalera.com> on 2008/11/23 02:10:13 UTC

Problem with stylesheet when I change a webapp to root mount point

In CommonScreens.xml I have the following line: 
<set field="layoutSettings.styleSheets[+0]" value="${productStore.styleSheet}" default-value="/hgl/images/ecommain.css" global="true"/> 

I have a custom component in hot-deploy called "hgl" 

When I mount the webapp in ofbiz-component.xml as "/hgl" everything works fine. However, when I change it to mount as the URL root I no longer have a webapp mounted as "hgl" and the style sheet isn't found. 

Re: Problem with stylesheet when I change a webapp to root mount point

Posted by "Vince M. Clark" <vc...@globalera.com>.
OK the Apache setup for the images is a good tip. However, if you change the configuration to be specific to each webapp (/accounting/, etc.) then how would OfBiz get requests at the root URL? 

Can I do something like: 
ProxyPass / ajp://localhost:8009/webapp 


----- Original Message ----- 
From: "BJ Freeman" <bj...@free-man.net> 
To: user@ofbiz.apache.org 
Sent: Saturday, December 6, 2008 2:26:27 PM (GMT-0700) America/Denver 
Subject: Re: Problem with stylesheet when I change a webapp to root mount point 

there are some things mention here that you have not shown. 
http://docs.ofbiz.org/display/OFBIZ/FAQ+-+Tips+-+Tricks+-+Cookbook+-+HowTo#FAQ-Tips-Tricks-Cookbook-HowTo-HTTPD 


Vince M. Clark sent the following on 12/6/2008 1:04 PM: 
> I don't see a "context prefix" in the website settings, only "content prefix." 
> 
> I have tried two different approaches to getting my custom app to load at the root: 
> 1) Use Apache proxy_ajp and the following in the VirtualHost config: 
> <Location / > 
> ProxyPass ajp://localhost:8009/webapp/ 
> ProxyPassReverse ajp://localhost:8009/webapp/ 
> </Location> 
> 
> 2) Set the mount point in ofbiz-component.xml to "/" 
> 
> Either one of these approaches makes resources that must be referenced by a URL such as images and style sheets unreachable. 
> Any ideas are appreciated. In the meantime, I am going to create another webapp in my custom component for the sole purpose of storing resources. Something analogous to /images/ in the framework component. 
> 
> However, this then begs the question, why don't I just let Apache serve those resources. I would love to do that, but would still have URL issues because I am currently passing all requests to OfBiz. 
> 
> Any ideas on how to configure Apache so that the root url: www.mydomainname.com is passed to OfBiz but I can still reference other URL's that will be served by Apache like: 
> www.mydomainname.com/images 
> 
> 
> ----- Original Message ----- 
> From: "Abhishake Agarwal" <ab...@gmail.com> 
> To: user@ofbiz.apache.org 
> Sent: Saturday, November 22, 2008 9:56:01 PM (GMT-0700) America/Denver 
> Subject: Re: Problem with stylesheet when I change a webapp to root mount point 
> 
> I think you have to change stylesheet path in store settings and also try 
> changing the context prefix under website in catalog. 
> 
> On Sun, Nov 23, 2008 at 6:40 AM, Vince M. Clark <vc...@globalera.com>wrote: 
> 
>> In CommonScreens.xml I have the following line: 
>> <set field="layoutSettings.styleSheets[+0]" 
>> value="${productStore.styleSheet}" default-value="/hgl/images/ecommain.css" 
>> global="true"/> 
>> 
>> I have a custom component in hot-deploy called "hgl" 
>> 
>> When I mount the webapp in ofbiz-component.xml as "/hgl" everything works 
>> fine. However, when I change it to mount as the URL root I no longer have a 
>> webapp mounted as "hgl" and the style sheet isn't found. 
>> 
> 

Re: Problem with stylesheet when I change a webapp to root mount point

Posted by BJ Freeman <bj...@free-man.net>.
there are some things mention here that you have not shown.
http://docs.ofbiz.org/display/OFBIZ/FAQ+-+Tips+-+Tricks+-+Cookbook+-+HowTo#FAQ-Tips-Tricks-Cookbook-HowTo-HTTPD


Vince M. Clark sent the following on 12/6/2008 1:04 PM:
> I don't see a "context prefix" in the website settings, only "content prefix." 
> 
> I have tried two different approaches to getting my custom app to load at the root: 
> 1) Use Apache proxy_ajp and the following in the VirtualHost config: 
> <Location / > 
> ProxyPass ajp://localhost:8009/webapp/ 
> ProxyPassReverse ajp://localhost:8009/webapp/ 
> </Location> 
> 
> 2) Set the mount point in ofbiz-component.xml to "/" 
> 
> Either one of these approaches makes resources that must be referenced by a URL such as images and style sheets unreachable. 
> Any ideas are appreciated. In the meantime, I am going to create another webapp in my custom component for the sole purpose of storing resources. Something analogous to /images/ in the framework component. 
> 
> However, this then begs the question, why don't I just let Apache serve those resources. I would love to do that, but would still have URL issues because I am currently passing all requests to OfBiz. 
> 
> Any ideas on how to configure Apache so that the root url: www.mydomainname.com is passed to OfBiz but I can still reference other URL's that will be served by Apache like: 
> www.mydomainname.com/images 
> 
> 
> ----- Original Message ----- 
> From: "Abhishake Agarwal" <ab...@gmail.com> 
> To: user@ofbiz.apache.org 
> Sent: Saturday, November 22, 2008 9:56:01 PM (GMT-0700) America/Denver 
> Subject: Re: Problem with stylesheet when I change a webapp to root mount point 
> 
> I think you have to change stylesheet path in store settings and also try 
> changing the context prefix under website in catalog. 
> 
> On Sun, Nov 23, 2008 at 6:40 AM, Vince M. Clark <vc...@globalera.com>wrote: 
> 
>> In CommonScreens.xml I have the following line: 
>> <set field="layoutSettings.styleSheets[+0]" 
>> value="${productStore.styleSheet}" default-value="/hgl/images/ecommain.css" 
>> global="true"/> 
>>
>> I have a custom component in hot-deploy called "hgl" 
>>
>> When I mount the webapp in ofbiz-component.xml as "/hgl" everything works 
>> fine. However, when I change it to mount as the URL root I no longer have a 
>> webapp mounted as "hgl" and the style sheet isn't found. 
>>
> 

Re: Problem with stylesheet when I change a webapp to root mount point

Posted by "Vince M. Clark" <vc...@globalera.com>.
I don't see a "context prefix" in the website settings, only "content prefix." 

I have tried two different approaches to getting my custom app to load at the root: 
1) Use Apache proxy_ajp and the following in the VirtualHost config: 
<Location / > 
ProxyPass ajp://localhost:8009/webapp/ 
ProxyPassReverse ajp://localhost:8009/webapp/ 
</Location> 

2) Set the mount point in ofbiz-component.xml to "/" 

Either one of these approaches makes resources that must be referenced by a URL such as images and style sheets unreachable. 
Any ideas are appreciated. In the meantime, I am going to create another webapp in my custom component for the sole purpose of storing resources. Something analogous to /images/ in the framework component. 

However, this then begs the question, why don't I just let Apache serve those resources. I would love to do that, but would still have URL issues because I am currently passing all requests to OfBiz. 

Any ideas on how to configure Apache so that the root url: www.mydomainname.com is passed to OfBiz but I can still reference other URL's that will be served by Apache like: 
www.mydomainname.com/images 


----- Original Message ----- 
From: "Abhishake Agarwal" <ab...@gmail.com> 
To: user@ofbiz.apache.org 
Sent: Saturday, November 22, 2008 9:56:01 PM (GMT-0700) America/Denver 
Subject: Re: Problem with stylesheet when I change a webapp to root mount point 

I think you have to change stylesheet path in store settings and also try 
changing the context prefix under website in catalog. 

On Sun, Nov 23, 2008 at 6:40 AM, Vince M. Clark <vc...@globalera.com>wrote: 

> In CommonScreens.xml I have the following line: 
> <set field="layoutSettings.styleSheets[+0]" 
> value="${productStore.styleSheet}" default-value="/hgl/images/ecommain.css" 
> global="true"/> 
> 
> I have a custom component in hot-deploy called "hgl" 
> 
> When I mount the webapp in ofbiz-component.xml as "/hgl" everything works 
> fine. However, when I change it to mount as the URL root I no longer have a 
> webapp mounted as "hgl" and the style sheet isn't found. 
> 

Re: Problem with stylesheet when I change a webapp to root mount point

Posted by Abhishake Agarwal <ab...@gmail.com>.
I think you have to change stylesheet path in store settings and also try
changing the context prefix under website in catalog.

On Sun, Nov 23, 2008 at 6:40 AM, Vince M. Clark <vc...@globalera.com>wrote:

> In CommonScreens.xml I have the following line:
> <set field="layoutSettings.styleSheets[+0]"
> value="${productStore.styleSheet}" default-value="/hgl/images/ecommain.css"
> global="true"/>
>
> I have a custom component in hot-deploy called "hgl"
>
> When I mount the webapp in ofbiz-component.xml as "/hgl" everything works
> fine. However, when I change it to mount as the URL root I no longer have a
> webapp mounted as "hgl" and the style sheet isn't found.
>