tuscany-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Sebastien Delfino <jsdelf...@apache.org>
Subject Support for Servlets with Jetty and Tomcat
Date Sun, 15 Apr 2007 17:19:35 GMT
I just made some changes to the tuscany-http-* modules to allow servlets 
to be registered with a Tomcat or Jetty server. I guess this is going to 
be useful in Servlet based bindings like the WebService or JSONRPC bindings.

Here's how to use this capability.

In a binding, do this:
ExtensionPointRegistry extensionPointRegistry; <-- passed to your 
ModuleActivator start method.
ServletHostExtensionPoint servletHosts = 

The ServletHost interface from module tuscany-http replaces the old 
ServletHost interface from tuscany-core-spi, which will have to be deleted.

In a sample or integration test:
- Add the tuscany-http-tomcat or tuscany-http-jetty to your 
dependencies, depending on which server you want to use.

Here's how it works:
- I have defined ServletHostExtensionPoint in tuscany-http. That module 
contributes the extension point in its ModuleActivator.
- The tuscany-http-jetty and tuscany-http-tomcat respectively register 
in this extension point their ServletHost extensions.

More to do later:
- change the addServletMapping to take more configuration info (like the 
HTTPS port number for example).
- add logic to the ServletHostExtensionPoint to handle multiple 
ServletHosts and select the best one from what's passed to 

Hope this helps...


To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org

View raw message