Return-Path: Delivered-To: apmail-geronimo-dev-archive@www.apache.org Received: (qmail 78912 invoked from network); 3 Sep 2005 22:42:10 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 3 Sep 2005 22:42:10 -0000 Received: (qmail 99341 invoked by uid 500); 3 Sep 2005 22:42:08 -0000 Delivered-To: apmail-geronimo-dev-archive@geronimo.apache.org Received: (qmail 99299 invoked by uid 500); 3 Sep 2005 22:42:08 -0000 Mailing-List: contact dev-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list dev@geronimo.apache.org Received: (qmail 99286 invoked by uid 99); 3 Sep 2005 22:42:08 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 03 Sep 2005 15:42:08 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [66.250.40.202] (HELO saturn.opentools.org) (66.250.40.202) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 03 Sep 2005 15:42:22 -0700 Received: by saturn.opentools.org (Postfix, from userid 500) id 6DA6E3D10; Sat, 3 Sep 2005 19:01:00 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by saturn.opentools.org (Postfix) with ESMTP id 676F7F3C7 for ; Sat, 3 Sep 2005 19:01:00 -0400 (EDT) Date: Sat, 3 Sep 2005 19:01:00 -0400 (EDT) From: Aaron Mulder X-X-Sender: ammulder@saturn.opentools.org To: dev@geronimo.apache.org Subject: Re: svn commit: r267490 - in /geronimo/trunk/applications/console-standard/src/webapp: WEB-INF/web.xml index.html In-Reply-To: <431A0E45.3040305@apache.org> Message-ID: References: <20050903174329.34389.qmail@minotaur.apache.org> <431A0E45.3040305@apache.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N It's fine with me if you want to make a change like that. In this case, I'm more interested in the effect than the cause. :) Aaron On Sat, 3 Sep 2005, Jeremy Boynes wrote: > ammulder@apache.org wrote: > > Author: ammulder > > Date: Sat Sep 3 10:42:36 2005 > > New Revision: 267490 > > > > URL: http://svn.apache.org/viewcvs?rev=267490&view=rev > > Log: > > Add redirect to console > > > > > > > + > > + > > + > > + Redirect to Portal > > + > > + > > +

This web application contains raw portlets. It is not useful > > + to a user. Please see /console instead.

> > + > > + > > By coincidence, I was chatting with someone last week about web stuff > and they pointed me at this: > http://www.seocompany.ca/seo/url-redirect.html > > How about just sending a 301 reponse with the actual location of the > console? Patch attached as illustration. > > -- > Jeremy > > Index: > applications/console-standard/src/java/org/apache/geronimo/console/RedirectServlet.java > =================================================================== > --- > applications/console-standard/src/java/org/apache/geronimo/console/RedirectServlet.java > (revision 0) > +++ > applications/console-standard/src/java/org/apache/geronimo/console/RedirectServlet.java > (revision 0) > @@ -0,0 +1,33 @@ > +/** > + * > + * Copyright 2005 The Apache Software Foundation > + * > + * Licensed 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 org.apache.geronimo.console; > + > +import java.io.IOException; > +import javax.servlet.http.HttpServlet; > +import javax.servlet.http.HttpServletRequest; > +import javax.servlet.http.HttpServletResponse; > +import javax.servlet.ServletException; > + > +/** > + * @version $Rev$ $Date$ > + */ > +public class RedirectServlet extends HttpServlet { > + protected void service(HttpServletRequest httpServletRequest, > HttpServletResponse httpServletResponse) throws ServletException, > IOException { > + > httpServletResponse.setStatus(HttpServletResponse.SC_MOVED_PERMANENTLY); > + httpServletResponse.setHeader("Location", "/console/"); > + } > +} > Index: applications/console-standard/src/webapp/WEB-INF/web.xml > =================================================================== > --- applications/console-standard/src/webapp/WEB-INF/web.xml (revision > 267492) > +++ applications/console-standard/src/webapp/WEB-INF/web.xml (working copy) > @@ -647,8 +647,18 @@ > > > > + > + Redirector to the main console > + Redirect > + > org.apache.geronimo.console.RedirectServlet > + > > + > + Redirect > + / > + > > + > > EJBServer > /EJBServer/* > @@ -845,10 +855,7 @@ > tomcat > > --> > - > - index.html > - > - > + > > > http://java.sun.com/portlet > Index: applications/console-standard/src/webapp/index.html > =================================================================== > --- applications/console-standard/src/webapp/index.html (revision 267492) > +++ applications/console-standard/src/webapp/index.html (working copy) > @@ -1,10 +0,0 @@ > - > - > - > - Redirect to Portal > - > - > -

This web application contains raw portlets. It is not useful > - to a user. Please see /console instead.

> - > - >