01: //========================================================================
02: //$Id: Jsr77ServletHandler.java 1208 2006-11-13 21:38:44Z janb $
03: //Copyright 2006 Mort Bay Consulting Pty. Ltd.
04: //------------------------------------------------------------------------
05: //Licensed under the Apache License, Version 2.0 (the "License");
06: //you may not use this file except in compliance with the License.
07: //You may obtain a copy of the License at
08: //http://www.apache.org/licenses/LICENSE-2.0
09: //Unless required by applicable law or agreed to in writing, software
10: //distributed under the License is distributed on an "AS IS" BASIS,
11: //WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12: //See the License for the specific language governing permissions and
13: //limitations under the License.
14: //========================================================================
15:
16: package org.mortbay.jetty.servlet.jsr77;
17:
18: import org.mortbay.jetty.servlet.ServletHandler;
19: import org.mortbay.jetty.servlet.ServletHolder;
20: import org.mortbay.jetty.webapp.WebAppContext;
21:
22: public class Jsr77ServletHandler extends ServletHandler {
23: WebAppContext _webAppContext;
24:
25: public void setWebAppContext(WebAppContext wac) {
26: _webAppContext = wac;
27: }
28:
29: public WebAppContext getWebAppContext() {
30: return _webAppContext;
31: }
32:
33: public ServletHolder newServletHolder() {
34: Jsr77ServletHolder holder = new Jsr77ServletHolder();
35: holder.setWebAppContext(_webAppContext);
36: return holder;
37: }
38:
39: public ServletHolder newServletHolder(Class servlet) {
40: Jsr77ServletHolder holder = new Jsr77ServletHolder(servlet);
41: holder.setWebAppContext(_webAppContext);
42: return holder;
43: }
44: }
|