That was the answer I was hoping for.
Yes, that configuration works.
Thank you - very much appreciated!
Strange thing is, that if I use configuration:
<static-files>
<include path="**.nocache.*" expiration="1s"/>
<include path="/**.cache.*" expiration="3000d"/>
<include path="/**.png" expiration="30d"/>
<include path="/**.gif" expiration="30d"/>
<include path="/**.jpg" expiration="30d"/>
<include path="/**.css" expiration="30d"/>
<include path="/**.html" expiration="30d"/>
</static-files>
it doesn't work (Bad request error, Found more than 100 URLMap entries
in application configuration),
but if I use configuration (omit <include path="**.nocache.*"
expiration="1s"/>):
<static-files>
<include path="/**.cache.*" expiration="3000d"/>
<include path="/**.png" expiration="30d"/>
<include path="/**.gif" expiration="30d"/>
<include path="/**.jpg" expiration="30d"/>
<include path="/**.css" expiration="30d"/>
<include path="/**.html" expiration="30d"/>
</static-files>
or
<static-files>
<include path="**.nocache.*" expiration="1s"/>
<include path="**" expiration="30d"/>
</static-files>
it works fine with the same web.xml file in all cases.
All in all, many thanks for that.
Marcin
On 4 Sty, 19:49, Don Schwarz <[email protected]> wrote:
> I believe that the suggested configuration for GWT is:
>
> <static-files>
> <include path="**.nocache.*" expiration="1s"/>
> <include path="**" expiration="30d"/>
> </static-files>
>
> Does that work?
>
> If not, please send me your web.xml and appengine-web.xml (privately if you
> want) and I'll determine why this configuration is blowing up to > 100
> URLMap entries. There's a combinatorial issue here between static-file
> patterns, authentication patterns, and filter patterns that could be causing
> trouble.
>
> On Fri, Jan 1, 2010 at 3:16 PM, Nohu <[email protected]> wrote:
> > Hello
>
> > I am developing some application written in GWT on App Engine. I'm on
> > optimalization stage,
> > so i want to allow browsers to cache as much of static files as
> > possible.
>
> > If I don't put any static files in appengine-web.xml directly, App
> > Engine threat all files in
> > "war" directory as static files (except WEB-INF directory) and when I
> > deploy my application
> > I have about 450 of them.
>
> > I read (http://code.google.com/p/googleappengine/issues/detail?
> > id=1662 <http://code.google.com/p/googleappengine/issues/detail?id=1662>)
> > that App Engine sets default
> > cache expiration time to 10 minutes (which is too short).
>
> > So, if I want to set different time I need to define all my static
> > files in appengine-web.xml
> > (because if I define even one static file, App Engine abandon his
> > default behavior, and don't
> > look automatically for other static files) and set my expiration time
> > for them in "expiration" attribiute.
>
> > And then we come to my problem. When I put all my static files in
> > appengine-web.xml for example like this:
>
> > <static-files>
> > <include path="/**.cache.*" expiration="3000d"/>
> > <include path="/**.png" expiration="30d"/>
> > <include path="/**.gif" expiration="30d"/>
> > <include path="/**.jpg" expiration="30d"/>
> > <include path="/**.css" expiration="30d"/>
> > <include path="/**.html" expiration="30d"/>
> > </static-files>
>
> > on deploy I have error:
>
> > Unable to update app: Error posting to URL:xxx
> > 400 Bad Request
> > Error when loading application configuration:
> > Invalid object:
> > Found more than 100 URLMap entries in application configuration
>
> > See the deployment console for more details
>
> > As I understand App Engine maps every of my defined static files to
> > URL's, and it exceeds some
> > limits (http://code.google.com/p/googleappengine/issues/detail?
> > id=1444 <http://code.google.com/p/googleappengine/issues/detail?id=1444>),
> > but why was that
> > working when I didn't specify static files in appengine-web.xml? App
> > Engine choosed even more static
> > files then (all from "war" directory).
>
> > GWT generates many static files for its own (many js files, that can
> > be cached forever),
> > and if you use runAsync code splitting, there are even more of them.
> > It's essential in GWT to allow
> > cache this files, because that's what GWT is! If they are downloaded
> > every time when user requests
> > page, it doesn't have sense (at least in performance meaning).
>
> > I assume that App Engine and GWT combination has strong support from
> > Google
> > (Eclipse plugin for example makes developing with them so easy), so I
> > think that there have to
> > be some solution.
>
> > Is there any workaround for it? I just want to set cache expiration
> > time for my static files.
>
> > Marcin
>
> > --
>
> > You received this message because you are subscribed to the Google Groups
> > "Google App Engine for Java" group.
> > To post to this group, send email to
> > [email protected].
> > To unsubscribe from this group, send email to
> > [email protected]<google-appengine-java%[email protected]>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/google-appengine-java?hl=en.
--
You received this message because you are subscribed to the Google Groups
"Google App Engine for Java" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-appengine-java?hl=en.