01: /*
02: * $Id: org.eclipse.jdt.ui.prefs 5004 2006-03-17 20:47:08 -0800 (Fri, 17 Mar 2006) jannehietamaki $
03: * $Revision: 5004 $
04: * $Date: 2006-03-17 20:47:08 -0800 (Fri, 17 Mar 2006) $
05: *
06: * ==============================================================================
07: * Licensed under the Apache License, Version 2.0 (the "License"); you may not
08: * use this file except in compliance with the License. You may obtain a copy of
09: * the License at
10: *
11: * http://www.apache.org/licenses/LICENSE-2.0
12: *
13: * Unless required by applicable law or agreed to in writing, software
14: * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
15: * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
16: * License for the specific language governing permissions and limitations under
17: * the License.
18: */
19: package wicket.protocol.http.portlet;
20:
21: import org.apache.commons.logging.Log;
22: import org.apache.commons.logging.LogFactory;
23:
24: import wicket.markup.html.pages.AccessDeniedPage;
25: import wicket.protocol.http.IWebApplicationFactory;
26: import wicket.protocol.http.WebApplication;
27: import wicket.protocol.http.WicketServlet;
28:
29: /**
30: *
31: * Dummy utility servlet to support dynamic resources with portlets
32: *
33: * See:
34: *
35: * http://weblogs.java.net/blog/wholder/archive/2005/02/session_session.html
36: * http://issues.apache.org/jira/browse/PLUTO-53
37: *
38: * @author Janne Hietamäki
39: */
40: public class WicketPortletServlet extends WicketServlet {
41: private static final Log log = LogFactory
42: .getLog(WicketPortletServlet.class);
43:
44: /**
45: *
46: */
47: private static final long serialVersionUID = 1L;
48:
49: protected final IWebApplicationFactory getApplicationFactory() {
50: return new IWebApplicationFactory() {
51:
52: public WebApplication createApplication(
53: WicketServlet servlet) {
54: return new WebApplication() {
55:
56: public Class getHomePage() {
57: return AccessDeniedPage.class;
58: }
59: };
60: }
61:
62: };
63: }
64: }
|