cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Edwin Quita <edwin.qu...@gmail.com>
Subject Re: Cannot get to /images
Date Tue, 08 Mar 2011 08:44:11 GMT
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 <newmanw10@gmail.com> 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?
>

Mime
View raw message