Agreed that my solution does nto attempt to cache anything and will suffer
performance issues.  But I am using Jetty 6.1.1 and you need to add your own
static content loader.  I could not figure out how to configure Jetty to use
its DefaultServlet to load content from classpath.

On 4/15/07, Will Glass-Husain <[EMAIL PROTECTED]> wrote:

Although -- quick note from practical experience-- it's much better to
have the container (Apache or Tomcat) send static files whenever possible.
In particular, to implement browser caching there's a host of HTTP headers
that have to be set properly.  Without them your web app will be
significantly slower.

WILL

On 4/15/07, Will Glass-Husain <[EMAIL PROTECTED]> wrote:
>
> Well, Velocity can load any text files, but there's a risk it might
> process random characters as FML.  (e.g. "##" as a comment).  And binary
> files such as images are problematic.
>
> Maybe use ClassLoader.getSystemResourceAsStream () instead?
>
> WILL
>
> On 4/14/07, David Donohue < [EMAIL PROTECTED]> wrote:
> >
> > I am enjoying using VelocityLayoutServlet with
> > ClasspathResourceLoader.  VM
> > files load great, and the layout loads wonderfully too. The trick is:
> > how
> > can I get images, CSS, and other static content to load via classpath
> > as
> > well?  Or how can I get them load at all?
> > THANKS!
> > David
> >
>
>
>
> --
> Forio Business Simulations
>
> Will Glass-Husain
> [EMAIL PROTECTED]
> www.forio.com




--
Forio Business Simulations

Will Glass-Husain
[EMAIL PROTECTED]
www.forio.com

Reply via email to