Author: ehillenius
Date: Tue Jan 30 17:56:35 2007
New Revision: 501689

URL: http://svn.apache.org/viewvc?view=rev&rev=501689
Log:
WICKET-126

Added:
    
incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/protocol/http/ReloadingWicketServlet.java
Modified:
    
incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/protocol/http/ReloadingWicketFilter.java

Modified: 
incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/protocol/http/ReloadingWicketFilter.java
URL: 
http://svn.apache.org/viewvc/incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/protocol/http/ReloadingWicketFilter.java?view=diff&rev=501689&r1=501688&r2=501689
==============================================================================
--- 
incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/protocol/http/ReloadingWicketFilter.java
 (original)
+++ 
incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/protocol/http/ReloadingWicketFilter.java
 Tue Jan 30 17:56:35 2007
@@ -24,7 +24,31 @@
 
 /**
  * Custom WicketFilter that reloads the web applications when classes are
- * modified.
+ * modified. In order to reload your own classes, use include and exclude
+ * patterns using wildcards. And in web.xml, point to the reloading wicket
+ * filter instead of the original one.
+ * 
+ * <p>
+ * <b>Example denoting the built-in patterns:</b>
+ * 
+ * <pre>
+ * public class MyFilter extends ReloadingWicketFilter
+ * {
+ *     static
+ *     {
+ *             ReloadingClassLoader.excludePattern(&quot;wicket.*&quot;);
+ *             
ReloadingClassLoader.includePattern(&quot;wicket.examples.*&quot;);
+ *     }
+ * }
+ * </pre>
+ * 
+ * <p>
+ * It is also possible to add an URL to watch for changes using
+ * <tt>ReloadingClassLoader.addLocation()</tt>. By default, all the URL
+ * locations we can find for the provided class loader are registered.
+ * </p>
+ * 
+ * @see WicketFilter
  */
 public class ReloadingWicketFilter extends WicketFilter
 {

Added: 
incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/protocol/http/ReloadingWicketServlet.java
URL: 
http://svn.apache.org/viewvc/incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/protocol/http/ReloadingWicketServlet.java?view=auto&rev=501689
==============================================================================
--- 
incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/protocol/http/ReloadingWicketServlet.java
 (added)
+++ 
incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/protocol/http/ReloadingWicketServlet.java
 Tue Jan 30 17:56:35 2007
@@ -0,0 +1,59 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package wicket.protocol.http;
+
+
+/**
+ * Custom WicketServlet that reloads the web applications when classes are
+ * modified. In order to reload your own classes, use include and exclude
+ * patterns using wildcards. And in web.xml, point to the reloading wicket
+ * servlet instead of the original one.
+ * 
+ * <p>
+ * <b>Example denoting the built-in patterns:</b>
+ * 
+ * <pre>
+ * public class MyServlet extends ReloadingWicketServlet
+ * {
+ *     static
+ *     {
+ *             ReloadingClassLoader.excludePattern(&quot;wicket.*&quot;);
+ *             
ReloadingClassLoader.includePattern(&quot;wicket.examples.*&quot;);
+ *     }
+ * }
+ * </pre>
+ * 
+ * <p>
+ * It is also possible to add an URL to watch for changes using
+ * <tt>ReloadingClassLoader.addLocation()</tt>. By default, all the URL
+ * locations we can find for the provided class loader are registered.
+ * </p>
+ * 
+ * @see ReloadingWicketFilter
+ */
+public class ReloadingWicketServlet extends WicketServlet
+{
+       /**
+        * 
+        */
+       private static final long serialVersionUID = 1L;
+
+       protected WicketFilter newWicketFilter()
+       {
+               return new ReloadingWicketFilter();
+       }
+}


Reply via email to