Loading static resources & templates from classpath

65 views
Skip to first unread message

Andres Almiray

unread,
Jun 20, 2011, 11:34:56 AM6/20/11
to Gretty Web Framework
Hi all,

Given the current crop of examples posted by Alex it seems to me that
resources are expected to be located somewhere in the file system,
where the running script has access. This is cool but it certainly
hinders Gretty's ability to be embeddable (say a Griffon app (What?! I
can't deny I only think about Griffon) ;-).

It would be great if Gretty had an option to search for its resources
in the classpath. We did this for the RatcPack server as well so I
figure it shouldn't be that difficult.

Thoughts?

Alex Tkachman

unread,
Jun 20, 2011, 11:41:59 AM6/20/11
to gre...@googlegroups.com
Use staticResources instead of static. It should work.

Andres Almiray

unread,
Jun 20, 2011, 11:50:36 AM6/20/11
to Gretty Web Framework
Thanks for the prompt response Alex. Would you happen to have an
example of staticResources in action? :-)

Alex Tkachman

unread,
Jun 20, 2011, 11:55:20 AM6/20/11
to gre...@googlegroups.com

Andres Almiray

unread,
Jun 20, 2011, 12:09:09 PM6/20/11
to Gretty Web Framework
Sweet! That's precisely what I needed.
Thanks again Alex.

On Jun 20, 5:55 pm, Alex Tkachman <alex.tkach...@gmail.com> wrote:
> Seehttps://github.com/alextkachman/gretty/blob/master/Examples/_._._toIm...

Alex Tkachman

unread,
Jun 20, 2011, 12:19:38 PM6/20/11
to Gretty Web Framework
Just for records - static files from file system is fastest possible
way (after CDN) of handling static resources
Reply all
Reply to author
Forward
0 new messages