-
1. Re: Editor and resource paths handling
bleathem Jul 27, 2011 11:12 AM (in response to lfryc)Hey Lukas - that's a tricky problem to solve! Here are my thoughts:
1) Agreed would be hard to maintain.
2) is too fragile - who knows what mappings some people might use.
3) The problem is it can circumvent an applications page security if they are using web.xml to secure their resources. Imgine they put protection on /admin/* and un benownst to them, there admin section is now available under /org.richfaces.resources/
Rather than a FacesServlet mapping, can we provide our own custom servlet to serve only these resources? This would be mapped to a url as you proposed above, but would be secure as it would only serve the resources you intend.
-
2. Re: Editor and resource paths handling
nbelaevski Jul 29, 2011 12:21 AM (in response to bleathem)Hi all,
1) WDYT about interpreting links in common CSS files as JSF resource links? This can be a runtime/compile time enhancement over standard CSS (maybe just for selected resource libraries).
2) IMHO most people use suffix mapping, so this won't work.
3) I agree this can conflict with either security configuration as integration with 3rd party libraries.
-
3. Re: Editor and resource paths handling
lfryc Jul 29, 2011 8:35 AM (in response to lfryc)Thanks for sharing your thoughts,
I have implemented ResourceServlet which serves resources only from /org.richfaces.ckeditor/ library and which delegates to FacesServlet.
https://github.com/richfaces/core/blob/2bd64aacd89f49640a12cd3607ef5912b5c3f3be/impl/src/main/java/org/richfaces/webapp/ResourceServlet.java
I'm going also reference common CSS and JS files as JSF resource links so browser will be able to pre-cache them.