Resource search order

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Resource search order

David Goodenough
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
Reply | Threaded
Open this post in threaded view
|

Re: Resource search order

vijay Si
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 <[hidden email]> 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
>
Reply | Threaded
Open this post in threaded view
|

Re: Resource search order

Abhishake Agarwal-2
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 <[hidden email]> 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 <[hidden email]> 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
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: Resource search order

BJ Freeman
In reply to this post by David Goodenough
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
>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Resource search order

Abhishake Agarwal-2
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 <[hidden email]> 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
> >
> >
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: Resource search order

David Goodenough
In reply to this post by Abhishake Agarwal-2
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 <[hidden email]> 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 <[hidden email]> 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


Reply | Threaded
Open this post in threaded view
|

Re: Resource search order

David Goodenough
In reply to this post by vijay Si
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 <[hidden email]> 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


Reply | Threaded
Open this post in threaded view
|

Re: Resource search order

David Goodenough
In reply to this post by BJ Freeman
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


Reply | Threaded
Open this post in threaded view
|

Re: Resource search order

BJ Freeman
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
>
>
>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Resource search order

Abhishake Agarwal
In reply to this post by David Goodenough
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 <[hidden email]> 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
>
>
>