KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > xalanDoc > presentation > Redirect


1 /*
2  * Copyright (c) 1999-2001 Lutris Technologies, Inc. All Rights
3  * Reserved.
4  *
5  * This source code file is distributed by Lutris Technologies, Inc. for
6  * use only by licensed users of product(s) that include this source
7  * file. Use of this source file or the software that uses it is covered
8  * by the terms and conditions of the Lutris Enhydra Development License
9  * Agreement included with this product.
10  *
11  * This Software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
12  * ANY KIND, either express or implied. See the License for the specific terms
13  * governing rights and limitations under the License.
14  *
15  * Contributor(s):
16  *
17  * $Id: Redirect.java,v 1.1 2004/08/16 10:51:42 slobodan Exp $
18  */

19
20 /*
21  * This is a sample presentation object written by hand (not using the
22  * Jolt compiler). Since this presentation object only redirects, and does
23  * not emit any HTML, it does not need Jolt.
24  * This type of presentation object could, for example, be the target of
25  * a form's submit button, process the data, and then decide where to send
26  * the user (back or on to the next page).
27  */

28
29 package xalanDoc.presentation;
30
31 import com.lutris.appserver.server.httpPresentation.*;
32
33
34 public class Redirect implements HttpPresentation {
35
36    /*
37     * There is the only function needed in order to be a presentation object.
38     */

39     public void run(HttpPresentationComms comms) throws Exception JavaDoc {
40         throw new ClientPageRedirectException(
41                       comms.request.getAppFileURIPath("Welcome.po"));
42     }
43
44 }
45
Popular Tags