* @param request
* The HTTP Servlet request.
* @return The new HTTP server handling calls.
*/
public HttpServerHelper createServer(HttpServletRequest request) {
HttpServerHelper result = null;
Component component = getComponent();
Application application = getApplication();
if ((component != null) && (application != null)) {
// First, let's locate the closest component
Server server = new Server(component.getContext(),
(List<Protocol>) null, request.getLocalAddr(), request
.getLocalPort(), component);
result = new HttpServerHelper(server);
// Attach the application
String uriPattern = request.getContextPath()
+ request.getServletPath();
component.getDefaultHost().attach(uriPattern, application);