• 大小: 625KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-05-10
  • 语言: Java
  • 标签: Java  server  face  

资源简介

sun 最新框架,jsf写的j2ee项目代码

资源截图

代码片段和文件信息

/*
 * To change this template choose Tools | Templates
 * and open the template in the editor.
 */

package com.city.firstjsf.managedbean;

import com.city.firstjsf.valuebean.Student;
import java.util.ArrayList;
import java.util.Collection;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.RequestScoped;

/**
 *
 * @author sue
 */
@ManagedBean(name=“studentManagedBean“)
@RequestScoped
public class StudentManagedBean {
    
    Collection coll = new ArrayList();
    Student stu = new Student();

    public Student getStu() {
        return stu;
    }

    public void setStu(Student stu) {
        this.stu = stu;
    }
    
    public Collection getColl() {
        return coll;
    }

    public void setColl(Collection coll) {
        this.coll = coll;
    }

    public String dogetId(Student s){
        stu = s;
        return “ok“;
    }

    public StudentManagedBean() {
        for(int i=0;i<10;i++){
            Student s = new Student();
            s.setId(i);
            s.setName(“aaa“+i);
            s.setSno(“200“+i);
            coll.add(s);
        }
    }

    public String doTest(Student s){
        stu = s;
        return “return“;
    }

    public String doTest1(Student s){
        stu = s;
        return “return?faces-redirect=true“;
    }

    public String login(String pass){
        if(pass.equals(“123“))
            return “true“;   //返回return.xhtml
        return “error“;         //返回error.xhtml
    }

}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件          7  2009-10-24 13:27  FirstJsf2.0\.cvsignore

     文件        314  2009-10-24 15:42  FirstJsf2.0\build\web\error.xhtml

     文件        512  2009-10-28 20:59  FirstJsf2.0\build\web\gfv3ee6.dpf

     文件       1071  2009-10-24 20:07  FirstJsf2.0\build\web\index.xhtml

     文件         25  2009-10-24 13:27  FirstJsf2.0\build\web\meta-INF\MANIFEST.MF

     文件        364  2009-10-24 19:10  FirstJsf2.0\build\web\return.xhtml

     文件        300  2009-10-24 16:51  FirstJsf2.0\build\web\true.xhtml

     文件          0  2009-10-24 13:27  FirstJsf2.0\build\web\WEB-INF\classes\.netbeans_automatic_build

     文件          0  2009-10-24 13:27  FirstJsf2.0\build\web\WEB-INF\classes\.netbeans_update_resources

     文件       2550  2009-10-24 19:19  FirstJsf2.0\build\web\WEB-INF\classes\com\city\firstjsf\managedbean\StudentManagedBean.class

     文件        924  2009-10-24 13:58  FirstJsf2.0\build\web\WEB-INF\classes\com\city\firstjsf\valuebean\Student.class

     文件        512  2009-10-24 13:27  FirstJsf2.0\build\web\WEB-INF\sun-web.xml

     文件       1550  2009-10-24 16:51  FirstJsf2.0\build\web\WEB-INF\web.xml

     文件       3503  2009-10-24 13:26  FirstJsf2.0\build.xml

     文件         32  2009-10-24 13:27  FirstJsf2.0\lib\.cvsignore

     文件      17167  2009-10-24 13:26  FirstJsf2.0\lib\CopyLibs\org-netbeans-modules-java-j2seproject-copylibstask.jar

     文件      72555  2009-10-24 13:26  FirstJsf2.0\lib\junit\junit-3.8.2-api.zip

     文件     118932  2009-10-24 13:26  FirstJsf2.0\lib\junit\junit-3.8.2.jar

     文件     184067  2009-10-24 13:26  FirstJsf2.0\lib\junit_4\junit-4.5-api.zip

     文件     109014  2009-10-24 13:26  FirstJsf2.0\lib\junit_4\junit-4.5-src.jar

     文件     196787  2009-10-24 13:26  FirstJsf2.0\lib\junit_4\junit-4.5.jar

     文件          0  2009-10-28 20:59  FirstJsf2.0\lib\nblibraries-private.properties

     文件        407  2009-10-24 13:26  FirstJsf2.0\lib\nblibraries.properties

     文件          9  2009-10-24 13:26  FirstJsf2.0\nbproject\.cvsignore

     文件       3676  2009-10-24 13:26  FirstJsf2.0\nbproject\ant-deploy.xml

     文件      47336  2009-10-24 13:26  FirstJsf2.0\nbproject\build-impl.xml

     文件        473  2009-10-24 13:26  FirstJsf2.0\nbproject\genfiles.properties

     文件       3148  2009-10-24 13:26  FirstJsf2.0\nbproject\private\private.properties

     文件       2229  2009-10-24 13:26  FirstJsf2.0\nbproject\project.properties

     文件        862  2009-10-24 13:26  FirstJsf2.0\nbproject\project.xml

............此处省略41个文件信息

评论

共有 条评论