01: /*
02: * Helma License Notice
03: *
04: * The contents of this file are subject to the Helma License
05: * Version 2.0 (the "License"). You may not use this file except in
06: * compliance with the License. A copy of the License is available at
07: * http://adele.helma.org/download/helma/license.txt
08: *
09: * Copyright 1998-2003 Helma Software. All Rights Reserved.
10: *
11: * $RCSfile$
12: * $Author: root $
13: * $Revision: 8604 $
14: * $Date: 2007-09-28 15:16:38 +0200 (Fre, 28 Sep 2007) $
15: */
16:
17: package helma.framework;
18:
19: /**
20: * RedirectException is thrown internally when a response is redirected to a
21: * new URL. Although this is not an Error, it subclasses java.lang.Error
22: * because it's not meant to be caught by application code (similar to
23: * java.lang.ThreadDeath).
24: */
25: public class RedirectException extends Error {
26: String url;
27:
28: /**
29: * Creates a new RedirectException object.
30: *
31: * @param url the URL
32: */
33: public RedirectException(String url) {
34: super ("Redirection Request to " + url);
35: this .url = url;
36: }
37:
38: /**
39: * Return the URL to redirect to.
40: * @return the URL
41: */
42: public String getUrl() {
43: return url;
44: }
45:
46: }
|