Hi
It is not possible to configure a single CXF servlet this way.
Just a quick question: do you really need to have .css and .js resource
paths overlapping with CXFServlet resource/endpoint path ?
Example, CXFServlet may be having a "/services/*" URL pattern, do you
need to have "/services/a.css", "/services/b.css", etc, or can you have
"/styles/a.css", etc, instead of haveing a common '/services/' segment ?
That would be the simplest option.
Assuming you do need to deal with the overlapping URLs, why don't you try:
<init-param>
<param-name>redirects-list</param-name>
<param-value>
(\w)+.css,
(\w)+.js
</param-value>
</init-param>
<init-param>
<param-name>redirect-servlet-name</param-name>
<param-value>default</param-value>
</init-param>
and just let the default Servlet engine load all of these static
resources ? Or just use
<init-param>
<param-name>static-resources-list</param-name>
<param-value>
(\w)+.css,
(\w)+.js
</param-value>
</init-param>
and let CXFServlet load them ?
or may be
<init-param>
<param-name>redirects-list</param-name>
<param-value>
(\w)+.css,
(\w)+.js
</param-value>
</init-param>
<init-param>
<param-name>redirect-servlet-path</param-name>
<param-value>/Resources</param-value>
</init-param>
with your custom servlet handling both types of these resources ?
Sergey
On 29/05/15 10:08, Voss, Marko wrote:
Hello,
how to define multiple redirects for static resources?
I need to define the two static resource redirects from below as one definition:
<init-param>
<param-name>redirects-list</param-name>
<param-value>(\w)+.css</param-value>
</init-param>
<init-param>
<param-name>redirect-servlet-path</param-name>
<param-value>/Styles</param-value>
</init-param>
<init-param>
<param-name>redirects-list</param-name>
<param-value>(\w)+.js</param-value>
</init-param>
<init-param>
<param-name>redirect-servlet-path</param-name>
<param-value>/js</param-value>
</init-param>
Thank you very much.
Marko