Hello,
I have setup jersey with grizzly using below code and it works great. Now I need to serve a static xml (which is not part of jersey) in the root of the server. I can put this xml file in a filesystem or dynamically create using servlet.
http://localhost:9988/xyz.xml
How do I configure grizzly in the below code to add this xml?
Map<String, String> initParams = new HashMap<String, String>();
initParams.put("com.sun.jersey.config.property.packages",
"com.xxx");
ResourceConfig config = new ResourceConfig(initParams, store);
RuntimeDelegate rd = RuntimeDelegate.getInstance();
Adapter a = rd.createEndpoint(config, Adapter.class);
logger.info("Starting grizzly...");
try
{
//TODO read url from config
URI BASE_URI =
UriBuilder.fromUri("
http://localhost/").port(9998).build();
threadSelector = GrizzlyServerFactory.create(BASE_URI,
a);
logger.info("Grizzly Started. WADL: " + BASE_URI +
"application.wadl");
}
catch(IOException ex)
{
logger.info("Error while starting grizzly...", ex);
}
Thanks
Ben