Author: vmassol
Date: 2007-10-26 14:03:42 +0200 (Fri, 26 Oct 2007)
New Revision: 5513

Added:
   
xwiki-platform/core/branches/xwiki-core-1.1/src/main/java/com/xpn/xwiki/web/HomePageRedirectServlet.java
Removed:
   
xwiki-platform/core/branches/xwiki-core-1.1/src/main/java/com/xpn/xwiki/web/HomePageRedirect.java
Log:
XWIKI-1827: Make XWiki products go to the main page by default when entering 
the http://<server>:<port>/xwiki URL

Merged from trunk (rev 5508)

Deleted: 
xwiki-platform/core/branches/xwiki-core-1.1/src/main/java/com/xpn/xwiki/web/HomePageRedirect.java
===================================================================
--- 
xwiki-platform/core/branches/xwiki-core-1.1/src/main/java/com/xpn/xwiki/web/HomePageRedirect.java
   2007-10-26 11:49:56 UTC (rev 5512)
+++ 
xwiki-platform/core/branches/xwiki-core-1.1/src/main/java/com/xpn/xwiki/web/HomePageRedirect.java
   2007-10-26 12:03:42 UTC (rev 5513)
@@ -1,38 +0,0 @@
-/*
- * Copyright 2006-2007, XpertNet SARL, and individual contributors as indicated
- * by the contributors.txt.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- *
- */
-package com.xpn.xwiki.web;
-
-import java.io.IOException;
-
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-/**
- * A simple action that redirects to the main page of the wiki
- */
-public class HomePageRedirect extends HttpServlet {
-    public void doGet(HttpServletRequest request, HttpServletResponse 
response) throws ServletException, IOException {
-        // TODO: configure the main page?
-        response.sendRedirect("bin/view/Main/");
-    }
-}

Copied: 
xwiki-platform/core/branches/xwiki-core-1.1/src/main/java/com/xpn/xwiki/web/HomePageRedirectServlet.java
 (from rev 5508, 
xwiki-platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/web/HomePageRedirectServlet.java)
===================================================================
--- 
xwiki-platform/core/branches/xwiki-core-1.1/src/main/java/com/xpn/xwiki/web/HomePageRedirectServlet.java
                            (rev 0)
+++ 
xwiki-platform/core/branches/xwiki-core-1.1/src/main/java/com/xpn/xwiki/web/HomePageRedirectServlet.java
    2007-10-26 12:03:42 UTC (rev 5513)
@@ -0,0 +1,41 @@
+/*
+ * See the NOTICE file distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ *
+ */
+package com.xpn.xwiki.web;
+
+import java.io.IOException;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+/**
+ * A simple action that redirects to the main page of the wiki. This is to 
allow users to enter
+ * a URL like <code>http://localhost:8080/xwiki</code> and be redirected 
automatically to
+ * <code>http://localhost:8080/xwiki/bin/view/Main/</code>.
+ */
+public class HomePageRedirectServlet extends HttpServlet
+{
+    public void doGet(HttpServletRequest request, HttpServletResponse response)
+        throws ServletException, IOException
+    {
+        response.sendRedirect("bin/view/Main/WebHome");
+    }
+}

_______________________________________________
notifications mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/notifications

Reply via email to