[ https://issues.apache.org/jira/browse/CAMEL-4363?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13097977#comment-13097977 ]
Willem Jiang commented on CAMEL-4363: ------------------------------------- I just did some test on the current Jetty component, and found that jetty component use one servlet is because we will face the handler already start issue if we create on servlet per jetty endpoint. {code} java.lang.IllegalStateException: STARTED at org.eclipse.jetty.server.handler.HandlerWrapper.setServer(HandlerWrapper.java:124) at org.eclipse.jetty.server.handler.ContextHandler.setServer(ContextHandler.java:237) at org.eclipse.jetty.server.handler.HandlerCollection.setHandlers(HandlerCollection.java:85) at org.eclipse.jetty.server.handler.HandlerCollection.addHandler(HandlerCollection.java:277) {code} Now I didn't find a way to fix this issue as we can't stop the server and start the handler again which is dangerous when the server is handling an important request. So I suggest to close this issue as there is a way to workaround this issue by applying a custom processor to deal with the resource request. > Allow for static file handlers to be added to the jetty component > ----------------------------------------------------------------- > > Key: CAMEL-4363 > URL: https://issues.apache.org/jira/browse/CAMEL-4363 > Project: Camel > Issue Type: New Feature > Components: camel-jetty > Affects Versions: 2.6.0 > Reporter: Joshua Watkins > Assignee: Willem Jiang > Priority: Minor > Labels: camel-jetty, handler, jetty > > As per the discussion here: > http://camel.465427.n5.nabble.com/Serving-static-pages-with-JettyComponent-td4711870.html > A Jetty ResourceHandler or a ServletContextHandler cannot be added to the > jetty server to serve up pages that are not processed via camel routes. It > would be nice to utilize the currently running jetty server to serve up > pages/resources other than those represented via camel routes. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira