Hi, my first posting and I have looked over the mailing list and a host of
other web sites but
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 the
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
myServlet/service
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
http://locahost:8080/myServlet/static/MyTestCode.html
To return the data from the file of html
I'm aware of this page: http://cxf.apache.org/docs/servlet-transport.html
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