You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by David Goodenough <da...@linkchoose.co.uk> on 2007/09/25 16:06:55 UTC

Resource search order

I seem to recall reading somewhere that ofbiz has a set of places it looks
to find things like images and css files.  As I recall the search order
is first in the application/<app>/webapp/ directory, then in the framework
directory.  Do I recall this right, if not what determines which directory
a given URL will be resolved against.

In particular I am trying to include my own .css file for the ecommerce
application, I have copied it from framework/images/webapp/images/ to
applications/ecommerce/webapp/ecommerce/images (it being ecommain.css)
but the browser still seems to get the old one.  Do I have to delete (or
rename) the old one in order to get the new one loaded?  I do have caching
turned off in Firefox).  By getting the old one I mean that I changed
something (a font size) and the font remained the same size when I refreshed
the page.

Both the main css and the blog css seem to be found using /images/<name>.css
which I think means that I have recalled this right, but I am confused as to 
why the copy does not seem to have worked.

David

Re: Resource search order

Posted by David Goodenough <da...@linkchoose.co.uk>.
On Tuesday 25 September 2007, Abhishake Agarwal wrote:
> Hi,
>
> I think you can set the path at
> applications/product/config/catalog.properties file (image.server.path).
That is fine for images, but I am asking about things like .css files.

David
>
> Regards,
> Abhishake
>
> On 9/25/07, vijay Si <st...@gmail.com> wrote:
> > Hi, i had the same question some time back,
> >
> > i think the order is ..framework/images
> >                              web.xml
> >                              webapp
> >
> > it think .......yes this was it.
> >
> > On 9/25/07, David Goodenough <da...@linkchoose.co.uk> wrote:
> > > I seem to recall reading somewhere that ofbiz has a set of places it
> >
> > looks
> >
> > > to find things like images and css files.  As I recall the search order
> > > is first in the application/<app>/webapp/ directory, then in the
> >
> > framework
> >
> > > directory.  Do I recall this right, if not what determines which
> >
> > directory
> >
> > > a given URL will be resolved against.
> > >
> > > In particular I am trying to include my own .css file for the ecommerce
> > > application, I have copied it from framework/images/webapp/images/ to
> > > applications/ecommerce/webapp/ecommerce/images (it being ecommain.css)
> > > but the browser still seems to get the old one.  Do I have to delete
> > > (or rename) the old one in order to get the new one loaded?  I do have
> >
> > caching
> >
> > > turned off in Firefox).  By getting the old one I mean that I changed
> > > something (a font size) and the font remained the same size when I
> > > refreshed
> > > the page.
> > >
> > > Both the main css and the blog css seem to be found using
> > > /images/<name>.css
> > > which I think means that I have recalled this right, but I am confused
> >
> > as
> >
> > > to
> > > why the copy does not seem to have worked.
> > >
> > > David



Re: Resource search order

Posted by Abhishake Agarwal <ab...@ibaazar.com>.
Hi,

I think you can set the path at
applications/product/config/catalog.properties file (image.server.path).

Regards,
Abhishake

On 9/25/07, vijay Si <st...@gmail.com> wrote:
>
> Hi, i had the same question some time back,
>
> i think the order is ..framework/images
>                              web.xml
>                              webapp
>
> it think .......yes this was it.
>
>
> On 9/25/07, David Goodenough <da...@linkchoose.co.uk> wrote:
> >
> > I seem to recall reading somewhere that ofbiz has a set of places it
> looks
> > to find things like images and css files.  As I recall the search order
> > is first in the application/<app>/webapp/ directory, then in the
> framework
> > directory.  Do I recall this right, if not what determines which
> directory
> > a given URL will be resolved against.
> >
> > In particular I am trying to include my own .css file for the ecommerce
> > application, I have copied it from framework/images/webapp/images/ to
> > applications/ecommerce/webapp/ecommerce/images (it being ecommain.css)
> > but the browser still seems to get the old one.  Do I have to delete (or
> > rename) the old one in order to get the new one loaded?  I do have
> caching
> > turned off in Firefox).  By getting the old one I mean that I changed
> > something (a font size) and the font remained the same size when I
> > refreshed
> > the page.
> >
> > Both the main css and the blog css seem to be found using
> > /images/<name>.css
> > which I think means that I have recalled this right, but I am confused
> as
> > to
> > why the copy does not seem to have worked.
> >
> > David
> >
>

Re: Resource search order

Posted by David Goodenough <da...@linkchoose.co.uk>.
On Tuesday 25 September 2007, vijay Si wrote:
> Hi, i had the same question some time back,
>
> i think the order is ..framework/images
>                              web.xml
>                              webapp
>
> it think .......yes this was it.
Well I think this list is incomplete, it seems to look in the application
directory as well (see below).

David
>
> On 9/25/07, David Goodenough <da...@linkchoose.co.uk> wrote:
> > I seem to recall reading somewhere that ofbiz has a set of places it
> > looks to find things like images and css files.  As I recall the search
> > order is first in the application/<app>/webapp/ directory, then in the
> > framework directory.  Do I recall this right, if not what determines
> > which directory a given URL will be resolved against.
> >
> > In particular I am trying to include my own .css file for the ecommerce
> > application, I have copied it from framework/images/webapp/images/ to
> > applications/ecommerce/webapp/ecommerce/images (it being ecommain.css)
> > but the browser still seems to get the old one.  Do I have to delete (or
> > rename) the old one in order to get the new one loaded?  I do have
> > caching turned off in Firefox).  By getting the old one I mean that I
> > changed something (a font size) and the font remained the same size when
> > I refreshed
> > the page.
> >
> > Both the main css and the blog css seem to be found using
> > /images/<name>.css
> > which I think means that I have recalled this right, but I am confused as
> > to
> > why the copy does not seem to have worked.
> >
> > David



Re: Resource search order

Posted by vijay Si <st...@gmail.com>.
Hi, i had the same question some time back,

i think the order is ..framework/images
                             web.xml
                             webapp

it think .......yes this was it.


On 9/25/07, David Goodenough <da...@linkchoose.co.uk> wrote:
>
> I seem to recall reading somewhere that ofbiz has a set of places it looks
> to find things like images and css files.  As I recall the search order
> is first in the application/<app>/webapp/ directory, then in the framework
> directory.  Do I recall this right, if not what determines which directory
> a given URL will be resolved against.
>
> In particular I am trying to include my own .css file for the ecommerce
> application, I have copied it from framework/images/webapp/images/ to
> applications/ecommerce/webapp/ecommerce/images (it being ecommain.css)
> but the browser still seems to get the old one.  Do I have to delete (or
> rename) the old one in order to get the new one loaded?  I do have caching
> turned off in Firefox).  By getting the old one I mean that I changed
> something (a font size) and the font remained the same size when I
> refreshed
> the page.
>
> Both the main css and the blog css seem to be found using
> /images/<name>.css
> which I think means that I have recalled this right, but I am confused as
> to
> why the copy does not seem to have worked.
>
> David
>

Re: Resource search order

Posted by Abhishake Agarwal <ab...@ibaazar.com>.
Hi,
you can also look at ecommerce/widget/CommonScreens.xml:main-decorator

<set field="layoutSettings.styleSheets[+0]"
value="/ecommerce/images/blog.css" global="true"/>
                <set field="layoutSettings.styleSheets[+0]" value="${
productStore.styleSheet}" default-value="/images/ecommain.css"
global="true"/>

Regards,
Abhishake

On 9/25/07, BJ Freeman <bj...@free-man.net> wrote:
>
> please note which SVN version you are using.
>
>
> David Goodenough sent the following on 9/25/2007 7:06 AM:
> > I seem to recall reading somewhere that ofbiz has a set of places it
> looks
> > to find things like images and css files.  As I recall the search order
> > is first in the application/<app>/webapp/ directory, then in the
> framework
> > directory.  Do I recall this right, if not what determines which
> directory
> > a given URL will be resolved against.
> >
> > In particular I am trying to include my own .css file for the ecommerce
> > application, I have copied it from framework/images/webapp/images/ to
> > applications/ecommerce/webapp/ecommerce/images (it being ecommain.css)
> > but the browser still seems to get the old one.  Do I have to delete (or
> > rename) the old one in order to get the new one loaded?  I do have
> caching
> > turned off in Firefox).  By getting the old one I mean that I changed
> > something (a font size) and the font remained the same size when I
> refreshed
> > the page.
> >
> > Both the main css and the blog css seem to be found using
> /images/<name>.css
> > which I think means that I have recalled this right, but I am confused
> as to
> > why the copy does not seem to have worked.
> >
> > David
> >
> >
> >
>

Re: Resource search order

Posted by BJ Freeman <bj...@free-man.net>.
it was more your description of how you thought ofbiz did things that
prompted the question.
in the last 12 months there has been considerable structure changes.
I did not want to talk about a version you did not have.
however you have gotten a good answer from
Abhishake Agarwal
	 	

David Goodenough sent the following on 9/25/2007 9:44 AM:
> On Tuesday 25 September 2007, BJ Freeman wrote:
>> please note which SVN version you are using.
> I checked out a version a couple of days ago.  Why, has this changed
> recently?
> 
> David
>> David Goodenough sent the following on 9/25/2007 7:06 AM:
>>> I seem to recall reading somewhere that ofbiz has a set of places it
>>> looks to find things like images and css files.  As I recall the search
>>> order is first in the application/<app>/webapp/ directory, then in the
>>> framework directory.  Do I recall this right, if not what determines
>>> which directory a given URL will be resolved against.
>>>
>>> In particular I am trying to include my own .css file for the ecommerce
>>> application, I have copied it from framework/images/webapp/images/ to
>>> applications/ecommerce/webapp/ecommerce/images (it being ecommain.css)
>>> but the browser still seems to get the old one.  Do I have to delete (or
>>> rename) the old one in order to get the new one loaded?  I do have
>>> caching turned off in Firefox).  By getting the old one I mean that I
>>> changed something (a font size) and the font remained the same size when
>>> I refreshed the page.
>>>
>>> Both the main css and the blog css seem to be found using
>>> /images/<name>.css which I think means that I have recalled this right,
>>> but I am confused as to why the copy does not seem to have worked.
>>>
>>> David
> 
> 
> 
> 
> 

Re: Resource search order

Posted by Abhishake Agarwal <ab...@gmail.com>.
Hello David,

I was able to load the css from
/applications/ecommerce/webapp/ecommerce/images/webapp/images

following is the steps I followed to resolve this,

1) I had copied the  /framework/images folder to
/applications/ecommerce/webapp/ecommerce/ folder.

NOTE: structure of images folder copied should also contain
ofbiz-component.xml (same as /framework/images/ofbiz-component.xml)

2) following entry has been inserted to /framework/component-load.xm file,

<load-component component-location="${ofbiz.home
}/applications/ecommerce/webapp/ecommerce/images"/>

3) restart your server and also clear your browser cache

now you will able to see all the css get render from your ecommerce part and
not from framework.

I tried this and it is working.

Regards,
Abhishake






On 9/25/07, David Goodenough <da...@linkchoose.co.uk> wrote:
>
> On Tuesday 25 September 2007, BJ Freeman wrote:
> > please note which SVN version you are using.
> I checked out a version a couple of days ago.  Why, has this changed
> recently?
>
> David
> >
> > David Goodenough sent the following on 9/25/2007 7:06 AM:
> > > I seem to recall reading somewhere that ofbiz has a set of places it
> > > looks to find things like images and css files.  As I recall the
> search
> > > order is first in the application/<app>/webapp/ directory, then in the
> > > framework directory.  Do I recall this right, if not what determines
> > > which directory a given URL will be resolved against.
> > >
> > > In particular I am trying to include my own .css file for the
> ecommerce
> > > application, I have copied it from framework/images/webapp/images/ to
> > > applications/ecommerce/webapp/ecommerce/images (it being ecommain.css)
> > > but the browser still seems to get the old one.  Do I have to delete
> (or
> > > rename) the old one in order to get the new one loaded?  I do have
> > > caching turned off in Firefox).  By getting the old one I mean that I
> > > changed something (a font size) and the font remained the same size
> when
> > > I refreshed the page.
> > >
> > > Both the main css and the blog css seem to be found using
> > > /images/<name>.css which I think means that I have recalled this
> right,
> > > but I am confused as to why the copy does not seem to have worked.
> > >
> > > David
>
>
>

Re: Resource search order

Posted by David Goodenough <da...@linkchoose.co.uk>.
On Tuesday 25 September 2007, BJ Freeman wrote:
> please note which SVN version you are using.
I checked out a version a couple of days ago.  Why, has this changed
recently?

David
>
> David Goodenough sent the following on 9/25/2007 7:06 AM:
> > I seem to recall reading somewhere that ofbiz has a set of places it
> > looks to find things like images and css files.  As I recall the search
> > order is first in the application/<app>/webapp/ directory, then in the
> > framework directory.  Do I recall this right, if not what determines
> > which directory a given URL will be resolved against.
> >
> > In particular I am trying to include my own .css file for the ecommerce
> > application, I have copied it from framework/images/webapp/images/ to
> > applications/ecommerce/webapp/ecommerce/images (it being ecommain.css)
> > but the browser still seems to get the old one.  Do I have to delete (or
> > rename) the old one in order to get the new one loaded?  I do have
> > caching turned off in Firefox).  By getting the old one I mean that I
> > changed something (a font size) and the font remained the same size when
> > I refreshed the page.
> >
> > Both the main css and the blog css seem to be found using
> > /images/<name>.css which I think means that I have recalled this right,
> > but I am confused as to why the copy does not seem to have worked.
> >
> > David



Re: Resource search order

Posted by BJ Freeman <bj...@free-man.net>.
please note which SVN version you are using.


David Goodenough sent the following on 9/25/2007 7:06 AM:
> I seem to recall reading somewhere that ofbiz has a set of places it looks
> to find things like images and css files.  As I recall the search order
> is first in the application/<app>/webapp/ directory, then in the framework
> directory.  Do I recall this right, if not what determines which directory
> a given URL will be resolved against.
> 
> In particular I am trying to include my own .css file for the ecommerce
> application, I have copied it from framework/images/webapp/images/ to
> applications/ecommerce/webapp/ecommerce/images (it being ecommain.css)
> but the browser still seems to get the old one.  Do I have to delete (or
> rename) the old one in order to get the new one loaded?  I do have caching
> turned off in Firefox).  By getting the old one I mean that I changed
> something (a font size) and the font remained the same size when I refreshed
> the page.
> 
> Both the main css and the blog css seem to be found using /images/<name>.css
> which I think means that I have recalled this right, but I am confused as to 
> why the copy does not seem to have worked.
> 
> David
> 
> 
>