head	1.11;
access;
symbols
	TIGRIS_1_1_0RC2:1.6.2.2
	TIGRIS_1_1_0RC1:1.6.2.2
	TIGRIS_1_1:1.6.2.2.0.2
	TIGRIS_1_0_8:1.6.2.2
	TIGRIS_1_0_8RC3:1.6.2.2
	TIGRIS_1_0_8RC2:1.6.2.2
	TIGRIS_1_0_8RC1:1.6.2.2
	TIGRIS_1_0_7:1.6.2.2
	TIGRIS_1_0_7RC3:1.6.2.2
	TIGRIS_1_0_7RC2:1.6.2.2
	TIGRIS_1_0_7RC1:1.6.2.2
	TIGRIS_1_0_6:1.6.2.2
	TIGRIS_1_0_6RC5:1.6.2.2
	TIGRIS_1_0_6RC4:1.6.2.2
	TIGRIS_1_0_6RC3:1.6.2.2
	TIGRIS_1_0_6RC2:1.6.2.2
	TIGRIS_1_0_6RC1:1.6.2.2
	TIGRIS_1_0_5:1.6.2.2
	TIGRIS_1_0_5RC6:1.6.2.2
	TIGRIS_1_0_5RC5:1.6.2.2
	TIGRIS_1_0_5RC4:1.6.2.2
	TIGRIS_1_0_5RC3:1.6.2.2
	TIGRIS_1_0_5RC2:1.6.2.2
	TIGRIS_1_0_5RC1:1.6.2.2
	TIGRIS_1_0_4:1.6.2.2
	TIGRIS_1_0_3:1.6.2.2
	TIGRIS_1_0:1.6.0.2;
locks; strict;
comment	@# @;


1.11
date	2001.08.11.09.08.02;	author dlr;	state Exp;
branches;
next	1.10;

1.10
date	2001.07.19.18.42.22;	author dlr;	state Exp;
branches;
next	1.9;

1.9
date	2001.07.18.10.05.13;	author dlr;	state Exp;
branches;
next	1.8;

1.8
date	2001.05.23.01.50.12;	author dlr;	state Exp;
branches;
next	1.7;

1.7
date	2001.04.25.23.56.19;	author dlr;	state Exp;
branches;
next	1.6;

1.6
date	2001.04.17.20.54.23;	author lucas;	state Exp;
branches
	1.6.2.1;
next	1.5;

1.5
date	2001.04.17.20.46.51;	author lucas;	state Exp;
branches;
next	1.4;

1.4
date	2001.04.17.07.46.46;	author dlr;	state Exp;
branches;
next	1.3;

1.3
date	2001.04.17.07.46.29;	author dlr;	state Exp;
branches;
next	1.2;

1.2
date	2001.04.17.07.07.40;	author dlr;	state Exp;
branches;
next	1.1;

1.1
date	2001.04.17.06.57.55;	author dlr;	state Exp;
branches;
next	;

1.6.2.1
date	2001.04.25.23.48.39;	author dlr;	state Exp;
branches;
next	1.6.2.2;

1.6.2.2
date	2001.04.25.23.56.55;	author dlr;	state Exp;
branches;
next	;


desc
@@


1.11
log
@Upgrading to Turbine 3.0-dev, Fulcrum 1.0, and Torque 1.0.
@
text
@/* ================================================================
 * Copyright (c) 2000 CollabNet.  All rights reserved.
 * 
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are
 * met:
 * 
 * 1. Redistributions of source code must retain the above copyright
 * notice, this list of conditions and the following disclaimer.
 * 
 * 2. Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * 
 * 3. The end-user documentation included with the redistribution, if
 * any, must include the following acknowlegement: "This product includes
 * software developed by CollabNet (http://www.collab.net/)."
 * Alternately, this acknowlegement may appear in the software itself, if
 * and wherever such third-party acknowlegements normally appear.
 * 
 * 4. The hosted project names must not be used to endorse or promote
 * products derived from this software without prior written
 * permission. For written permission, please contact info@@collab.net.
 * 
 * 5. Products derived from this software may not use the "Tigris" name
 * nor may "Tigris" appear in their names without prior written
 * permission of CollabNet.
 * 
 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL COLLABNET OR ITS CONTRIBUTORS BE LIABLE FOR ANY
 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
 * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 * ====================================================================
 * 
 * This software consists of voluntary contributions made by many
 * individuals on behalf of CollabNet.
 */

package org.tigris.helm.host;

import java.util.Date;
import java.sql.Connection;

import org.apache.commons.util.exception.NestableException;

import org.apache.velocity.context.Context;

import org.tigris.helm.tool.HelmProperties;
import org.tigris.helm.security.RedirectException;

import org.tigris.helm.security.BaseHelmServlet;

/**
 * Displays a generic error page.
 *
 * @@author <a href="mailto:davidp@@dataweb-systems.com">David C. Pellegrini</a>
 * @@author <a href="mailto:dlr@@collab.net">Daniel Rall</a>
 * @@version $Id: ErrorPage.java,v 1.10 2001/07/19 18:42:22 dlr Exp $
 *
 * Copyright (c) 1999 dataweb systems, inc.
 * Copyright (c) 1999-2001 CollabNet, Inc.
 */
public class ErrorPage extends BaseHelmServlet
{
    /**
     * Processes displaying of an error notification
     *
     * @@param conn A connection to a JDBC database
     * @@param ctx  The Context partially populated by WMServlet
     * @@return	   The file name of the template to process.
     */
    protected String processRequest(Context ctx)
        throws NestableException, RedirectException
    {
        String templateName = super.processRequest(ctx);
        ctx.put("date", new Date().toString());
        ctx.put("domain", HelmProperties.getProperty("DOMAIN"));
        return templateName;
    }
}
@


1.10
log
@Updated in light of the port of Joist JoistProperties class to Helm (as class HelmProperties).
@
text
@d52 1
a52 1
import org.apache.turbine.util.TurbineException;
d66 1
a66 1
 * @@version $Id: ErrorPage.java,v 1.9 2001/07/18 10:05:13 dlr Exp $
d81 1
a81 1
        throws TurbineException, RedirectException
@


1.9
log
@Ported Joist Redirect*Exception to Helm.
@
text
@d56 1
a56 1
import org.joist.util.JoistProperties;
d66 1
a66 1
 * @@version $Id: ErrorPage.java,v 1.8 2001/05/23 01:50:12 dlr Exp $
d85 1
a85 1
        ctx.put("domain", JoistProperties.getProperty("DOMAIN"));
@


1.8
log
@Ported Helm from WebMacro to Velocity.
@
text
@d57 1
a57 1
import org.joist.security.RedirectException;
d66 1
a66 1
 * @@version $Id: ErrorPage.java,v 1.7 2001/04/25 23:56:19 dlr Exp $
@


1.7
log
@Added domain to context to dynamically fill it in for the template's
webmaster@@ email address.
@
text
@d52 1
a52 1
import org.joist.security.RedirectException;
d54 1
a54 1
import org.webmacro.servlet.*;
d57 1
d66 1
a66 1
 * @@version $Id: ErrorPage.java,v 1.6 2001/04/17 20:54:23 lucas Exp $
d77 1
a77 1
     * @@param ctx  The WebContext partially populated by WMServlet
d80 2
a81 2
    protected String processRequest(Connection conn, WebContext ctx)
        throws HandlerException, RedirectException
d83 1
a83 1
        String templateName = super.processRequest(conn, ctx);
@


1.6
log
@add additional import
@
text
@d56 2
d65 1
a65 1
 * @@version $Id: ErrorPage.java,v 1.5 2001/04/17 20:46:51 lucas Exp $
d84 1
@


1.6.2.1
log
@Back ported Joist servlets which have been merged into Helm in the HEAD.
@
text
@d63 1
a63 1
 * @@version $Id: ErrorPage.java,v 1.6 2001/04/17 20:54:23 lucas Exp $
@


1.6.2.2
log
@Back ported from the HEAD:

Added domain to context to dynamically fill it in for the template's
webmaster@@ email address.
@
text
@a55 2
import org.joist.util.JoistProperties;

d63 1
a63 1
 * @@version $Id: ErrorPage.java,v 1.6.2.1 2001/04/25 23:48:39 dlr Exp $
a81 1
        ctx.put("domain", JoistProperties.getProperty("DOMAIN"));
@


1.5
log
@it helps to have the right package
@
text
@d52 2
d63 1
a63 1
 * @@version $Id: ErrorPage.java,v 1.4 2001/04/17 07:46:46 dlr Exp $
@


1.4
log
@Last var name change.
@
text
@d47 1
a47 1
package org.joist.security;
d61 1
a61 1
 * @@version $Id: ErrorPage.java,v 1.3 2001/04/17 07:46:29 dlr Exp $
@


1.3
log
@Corrected variable names.
@
text
@d61 1
a61 1
 * @@version $Id: ErrorPage.java,v 1.2 2001/04/17 07:07:40 dlr Exp $
d79 1
a79 1
        context.put("date", new Date().toString());
@


1.2
log
@Further clean up.
@
text
@d61 1
a61 1
 * @@version $Id: ErrorPage.java,v 1.1 2001/04/17 06:57:55 dlr Exp $
d78 1
a78 1
        String templateName = super.processRequest(connection, context);
@


1.1
log
@Displays a generic error page.  Moved in from Joist.
@
text
@d50 1
a50 1
import java.sql.*;
d52 1
a52 1
import org.apache.turbine.util.Log;
d54 1
a54 1
import org.webmacro.servlet.*;
d60 2
a61 1
 * @@version $Id: ErrorPage.java,v 1.6 2001/02/21 01:35:12 dlr Exp $
d75 1
a75 1
	protected String processRequest(Connection conn, WebContext ctx)
@

