Hi

On Tue, Mar 8, 2011 at 1:34 PM, Billy Newman <[email protected]> wrote:

> So there is no way to get cxf to ignore services/images/*?
>
> What does static-resources-list really do?  Was hoping this was a way
> to have cxf ignore certain urls.
>
>
This actually has to work.  CXFServlet expects the value of the static
resource list to contain one (or more comma-separated) regular expressions -
I'll need to update the docs.

/images/.*

should probably fix it.

Now, what will happen is that CXFServlet will attempt to serve those
resources itself.
Instead you may want to  redirect to a default servlet. For this to work try
to use redirect parameters instead:

Set "redirects-list" to "/images/.*"
Set "redirects-servlet-name" to "default"

(or whatever the name of the Default servlet is)

Let me know if it works please
Cheers, Sergey

Thanks again for the help.
>
> Sent from my iPhone
>
> On Mar 8, 2011, at 1:44 AM, Edwin Quita <[email protected]> wrote:
>
> > hi Billy,
> >
> > if you really want to have your images prefixed with the /services
> > path (i.e., /services/images/image_dir/anotherimage.png), use a
> > different url pattern for your CXFServlet:
> >
> > <servlet-mapping>
> >  <servlet-name>CXFServlet</servlet-name>
> >  <url-pattern>/wsapi/*</url-pattern>
> > </servlet-mapping>
> >
> > and your project's folder structure should be:
> > src/main/webapp/services/images/image_dir/anotherimage.png
> >
> >
> > On Tue, Mar 8, 2011 at 6:01 AM, Billy Newman <[email protected]>
> wrote:
> >> In the root of my war I have an images directory.  My problem is that
> from
> >> my wars context I cannot get to the images directory.  I.E. in my
> javascript
> >> I need to be able to get to my images */services/images/.....*.
> >>
> >> I tried adding a static-resource-list as follows but that was not help
> >> either:
> >>
> >> <servlet>
> >> <servlet-name>CXFServlet</servlet-name>
> >> <display-name>CXF Servlet</display-name>
> >> <servlet-class>
> >> org.apache.cxf.transport.servlet.CXFServlet
> >> </servlet-class>
> >> <init-param>
> >>       <param-name>static-resources-list</param-name>
> >> *        <param-value>/images/*</param-value> *
> >>       </init-param>
> >> <load-on-startup>1</load-on-startup>
> >> </servlet>
> >>
> >>       <servlet-mapping>
> >> <servlet-name>CXFServlet</servlet-name>
> >> <url-pattern>/services/*</url-pattern>
> >> </servlet-mapping>
> >>
> >> So I think that I do not want to hit the CXFServlet when I go to
> >> /services/images/myimage.png or
> /services/images/image_dir/anotherimage.png.
> >>
> >> Any ideas?
> >>
>



-- 
Sergey Beryozkin

Application Integration Division of Talend <http://www.talend.com>
http://sberyozkin.blogspot.com

Reply via email to