You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by Mario Ivankovits <ma...@ops.co.at> on 2007/01/24 10:22:22 UTC
myfaces resource loader and lastModified time
Hi!
Now that I am again working around in MyFacesResourceLoader I've had a
look at its lastModified stuff.
You know, we create a properties file with a date generated during the
build process to determine the last modified time we have to send to the
browser.
There the method states:
* Unfortunately this is not possible with files inside jars.
Instead, the
* MyFaces build process ensures that there is a file
AddResource.properties
* which has the datestamp of the time the build process was run.
This method
* simply gets that value and returns it.
Which is wrong IMHO. At least the URLConnection has a method called
getLastModified() :-)
So we can extend this class to use the real lastModified date and even
further, we can check the date we get from the browser and send back a
correct http status code in case the resource has not changed.
Any objections?
Ciao,
Mario
Re: myfaces resource loader and lastModified time
Posted by Mike Kienenberger <mk...@gmail.com>.
Go for it :-) Can't be any worse that the current broken behavior :-)
On 1/24/07, Mario Ivankovits <ma...@ops.co.at> wrote:
> Hi!
>
> Now that I am again working around in MyFacesResourceLoader I've had a
> look at its lastModified stuff.
>
> You know, we create a properties file with a date generated during the
> build process to determine the last modified time we have to send to the
> browser.
>
> There the method states:
>
> * Unfortunately this is not possible with files inside jars.
> Instead, the
> * MyFaces build process ensures that there is a file
> AddResource.properties
> * which has the datestamp of the time the build process was run.
> This method
> * simply gets that value and returns it.
>
> Which is wrong IMHO. At least the URLConnection has a method called
> getLastModified() :-)
>
> So we can extend this class to use the real lastModified date and even
> further, we can check the date we get from the browser and send back a
> correct http status code in case the resource has not changed.
>
>
> Any objections?
>
> Ciao,
> Mario
>
>