Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jetty-dev] WebInfConfiguration.unpack() unpacks WEB-INF/* from a ResourceCollection, breaking JSP reloading with ResourceCollections

Hi,

We're starting our WebappContext with a  ResourceCollection where the
first resource in the collection is the developer's src/main/webapp
directory.

This gives us a fast paced development cycle which is an important
reason we've learned to love Jetty so much!

Ok, enough flatter, here's the issue of the day:

When upgrading from Jetty 6.1.x to 7.0.1, JSPs are no longer
recompiled from source when the source changes.

I've nailed the issue down to WebInfConfiguration.unpack.

If the base resource is a ResourceCollection, the unpack method will
extract the ResourceCollection's WEB-INF/ path to a working directory
and put the unpacked resource in a new ResourceCollection, before the
original ResourceCollection.

So Jetty will now always pick the unpacked JSP before the source JSP.

This change seems to fix the problem:

        // Do we need to extract WEB-INF/lib?
-        Resource web_inf= web_app.addPath("WEB-INF/");
+        Resource web_inf= web_app.addPath("WEB-INF/lib/");
         if (web_inf instanceof ResourceCollection ||


Reading the comment makes me think this is the intended behaviour, but
there might be some non-obvious reasons for unpacking all of WEB-INF?

I'll probably be able to create a workaround that removes the new
ResourceCollection, but I do think this also deserves a fix in Jetty
proper.

Thanks,
Eirik.


Back to the top