001/* 002 * Licensed to the Apache Software Foundation (ASF) under one or more 003 * contributor license agreements. See the NOTICE file distributed with 004 * this work for additional information regarding copyright ownership. 005 * The ASF licenses this file to You under the Apache License, Version 2.0 006 * (the "License"); you may not use this file except in compliance with 007 * the License. You may obtain a copy of the License at 008 * 009 * http://www.apache.org/licenses/LICENSE-2.0 010 * 011 * Unless required by applicable law or agreed to in writing, software 012 * distributed under the License is distributed on an "AS IS" BASIS, 013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 014 * See the License for the specific language governing permissions and 015 * limitations under the License. 016 */ 017package org.apache.wicket.protocol.http; 018 019 020/** 021 * Custom WicketServlet that reloads the web applications when classes are modified. In order to 022 * reload your own classes, use include and exclude patterns using wildcards. And in web.xml, point 023 * to the reloading wicket servlet instead of the original one. 024 * 025 * <p> 026 * <b>Example denoting the built-in patterns:</b> 027 * 028 * <pre> 029 * public class MyServlet extends ReloadingWicketServlet 030 * { 031 * static 032 * { 033 * ReloadingClassLoader.excludePattern("org.apache.wicket.*"); 034 * ReloadingClassLoader.includePattern("org.apache.wicket.examples.*"); 035 * } 036 * } 037 * </pre> 038 * 039 * @see ReloadingWicketFilter for complete documentation, and for proper integration with Spring 040 * 041 * @author <a href="mailto:jbq@apache.org">Jean-Baptiste Quenot</a> 042 */ 043public class ReloadingWicketServlet extends WicketServlet 044{ 045 /** 046 * 047 */ 048 private static final long serialVersionUID = 1L; 049 050 @Override 051 protected WicketFilter newWicketFilter() 052 { 053 return new ReloadingWicketFilter(); 054 } 055}