Expose jar resources over web

Posted by Heavy Bytes on Stack Overflow See other posts from Stack Overflow or by Heavy Bytes
Published on 2010-04-06T19:05:46Z Indexed on 2010/04/06 19:23 UTC
Read the original article Hit count: 156

Filed under:
|
|
|
|

I have a web-service (with Spring-WS).

I have a jar with several schemas (schema1.xsd, schema2.xsd and schema3.xsd) which I include in my web service.

Is there a way to expose the schemas from the jar through a servlet somehow in my web-service wep app?

My Spring MessageDispatcherServlet is mapped to /ws/

I would like my schemas to be exposed to /schemas/schema1.xsd /schemas/schema2.xsd and so on.

I have an idea how to do it with a servlet, but it's too verbose and there has to be a nicer way.

The way I am thinking is have a servlet filter and everything that hits /schemas/ check if it is in my list of allowed resources and display it.

This has to be a server agnostic solution. (For instance http://tuckey.org/urlrewrite/ will not work).

Thanks.

© Stack Overflow or respective owner

Related posts about java

Related posts about spring