Hello everyone, I have an issue about the static file mapping.

The Application_**.properties can't be found in out demo. but it works well
when I bring it out into tomcat.

2009-8-7 13:59:08 org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor
processRequest
Warning: .No root resource matching request path
/main/index/Application_en-US.properties is found.
2009-8-7 13:59:08 org.apache.cxf.jaxrs.impl.WebApplicationExceptionMapper
toResponse
Warning: WebApplicationException has been caught : no cause is available

following is my demo code.

public class JAXRSServer {

        protected JAXRSServer() throws Exception {
                JAXRSServerFactoryBean sf = new JAXRSServerFactoryBean();
                sf.setResourceClasses(CustomerService.class);
                //sf.setResourceProvider(CustomerService.class, new
SingletonResourceProvider(new CustomerService()));
                sf.setAddress("http://localhost:9000/";);

                sf.create();
        }

        public static void main(String args[]) throws Exception {
                new JAXRSServer();
                serveHTML();
                System.out.println("Server ready...");

                Thread.sleep(5 * 600 * 1000);
                System.out.println("Server exiting");
                System.exit(0);
        }

        private static void serveHTML() throws Exception {
                Bus bus = BusFactory.getDefaultBus();
                ServerRegistry sr = bus.getExtension(ServerRegistry.class);
                JettyHTTPServerEngineFactory jhsef =
bus.getExtension(JettyHTTPServerEngineFactory.class);
                ServerImpl si = (ServerImpl) sr.getServers().get(0);
                JettyHTTPDestination jhd = (JettyHTTPDestination) 
si.getDestination();
                JettyHTTPServerEngine engine = (JettyHTTPServerEngine) 
jhd.getEngine();
                org.mortbay.jetty.Server server = engine.getServer();
                Handler serverHandler = server.getHandler();
                ContextHandlerCollection contextHandlerCollection =
(ContextHandlerCollection) serverHandler;
                HandlerList handlerList = new HandlerList();
                ResourceHandler resourceHandler = new ResourceHandler();
                handlerList.addHandler(resourceHandler);
                handlerList.addHandler(contextHandlerCollection);
                server.setHandler(handlerList);
                handlerList.start();
                resourceHandler.setResourceBase("./WebContent");
        }

can everyone give me some suggestion?



-- 
View this message in context: 
http://www.nabble.com/static-properties-file-can%27t-be-found-in-JAXRSInInterceptor-tp24859608p24859608.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to