2
* Copyright 1999-2002,2004 The Apache Software Foundation.
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
* you may not use this file except in compliance with the License.
6
* You may obtain a copy of the License at
8
* http://www.apache.org/licenses/LICENSE-2.0
10
* Unless required by applicable law or agreed to in writing, software
11
* distributed under the License is distributed on an "AS IS" BASIS,
12
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
* See the License for the specific language governing permissions and
14
* limitations under the License.
18
package org.apache.struts.webapp.example;
21
import java.io.IOException;
22
import javax.faces.FacesException;
23
import javax.faces.context.FacesContext;
24
import org.apache.commons.logging.Log;
25
import org.apache.commons.logging.LogFactory;
29
* <p>Backing bean for the <code>index.jsp</code> page.</p>
32
public class IndexBacking extends AbstractBacking {
35
// -------------------------------------------------------- Static Variables
38
private static final Log log = LogFactory.getLog(IndexBacking.class);
41
// ----------------------------------------------------------------- Actions
45
* <p>Forward to the <em>Create Registration</em> action.</p>
47
public String create() {
49
if (log.isDebugEnabled()) {
50
log.debug("create()");
52
FacesContext context = FacesContext.getCurrentInstance();
53
StringBuffer sb = registration(context);
54
sb.append("?action=Create");
55
forward(context, sb.toString());
62
* <p>Forward to the <em>Logon</em> page.</p>
64
public String logon() {
66
if (log.isDebugEnabled()) {