~ubuntu-branches/ubuntu/lucid/libstruts1.2-java/lucid

« back to all changes in this revision

Viewing changes to contrib/struts-faces/example1-webapp/src/java/org/apache/struts/webapp/example/IndexBacking.java

  • Committer: Bazaar Package Importer
  • Author(s): Arnaud Vandyck
  • Date: 2006-04-24 12:14:23 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20060424121423-naev53qigqgks0sa
Tags: 1.2.9-1
New upstream  release Fixes  three security  problems: CVE-2006-1546,
CVE-2006-1547,  CVE-2006-1548  (closes:  #360551),  thanks  to  Moritz
Muehlenhoff.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright 1999-2002,2004 The Apache Software Foundation.
 
3
 * 
 
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
 
7
 * 
 
8
 *      http://www.apache.org/licenses/LICENSE-2.0
 
9
 * 
 
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.
 
15
 */
 
16
 
 
17
 
 
18
package org.apache.struts.webapp.example;
 
19
 
 
20
 
 
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;
 
26
 
 
27
 
 
28
/**
 
29
 * <p>Backing bean for the <code>index.jsp</code> page.</p>
 
30
 */
 
31
 
 
32
public class IndexBacking extends AbstractBacking {
 
33
 
 
34
 
 
35
    // -------------------------------------------------------- Static Variables
 
36
 
 
37
 
 
38
    private static final Log log = LogFactory.getLog(IndexBacking.class);
 
39
 
 
40
 
 
41
    // ----------------------------------------------------------------- Actions
 
42
 
 
43
 
 
44
    /**
 
45
     * <p>Forward to the <em>Create Registration</em> action.</p>
 
46
     */
 
47
    public String create() {
 
48
 
 
49
        if (log.isDebugEnabled()) {
 
50
            log.debug("create()");
 
51
        }
 
52
        FacesContext context = FacesContext.getCurrentInstance();
 
53
        StringBuffer sb = registration(context);
 
54
        sb.append("?action=Create");
 
55
        forward(context, sb.toString());
 
56
        return (null);
 
57
 
 
58
    }
 
59
 
 
60
 
 
61
    /**
 
62
     * <p>Forward to the <em>Logon</em> page.</p>
 
63
     */
 
64
    public String logon() {
 
65
 
 
66
        if (log.isDebugEnabled()) {
 
67
            log.debug("logon()");
 
68
        }
 
69
        return "logon";
 
70
 
 
71
    }
 
72
 
 
73
 
 
74
}