cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tony Giaccone <>
Subject Serving Static content...
Date Mon, 14 May 2012 22:21:44 GMT

Hi, my first posting and I have looked over the mailing list and a host of other web sites
for the life of me I can't figure out how solve my problem. 

First a general description, I'm creating a Restful Web Service that manages a persistent

entity (eventually many but for now one).  I'm using Spring, Spring Security, Jackson and

Apache CXF. I'm using maven for my builds and deploying to jetty. 

I have a servlet that responds to incoming requests and routes them to the correct service

implementation.  The WebService part works just fine. 

What I want do do now, is include a page of HTML which includes css and javascript in the

application so that I can use to test the web services.  I want to deploy the service and
static html/javascript/css in the same war file. 

Essentially I have this file layout:

	webapp +
			-----> static - +
			|                       |
			|                       | - MyTestCode.html
                        |                       |
                        |                       | -> css (contains css files)
                        |                       |
                        |                       | -> js (contains javascript included in
the MyTestCode.htm file)
			----->WEB-INF -+
			|                            | -- > applicationContext.xml
			|                            |
			|                            |--> web.xml
			|--- index.jsp

Assume I have a servlet named myServlet,  I want all the requests that go to my 


to map to a Restful service implementation. 

So for example:

	http://localhost:8080/myServlet/server/user/getAll   - calls a method on the service implementation.

I want this URL


To return the data from the file of html 

I'm aware of this page:

But I've not been able to figure out how to get this to work.  Do I have to use both a 
redirect servlet and a static-resource-list? I've tried every combination I can think of to
get this to 
work but had zero success. 

Can someone point me in the right direction? 

Tony Giaccone

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message