使用下面这个jsp的前 你需要写一个Stu类 生成set和get方法
Public Class Stu{ private int idprivate String namepublic void setId(int id){ this id=id} public int getId(){ return this id} public void setName(String name){ this name=name} public String getName(){ return this name} }
写个简单的servlet
public class gotoMall extends HttpServlet { public void doGet(HttpServletRequest request HttpServletResponse response) throws ServletException IOException { ArrayList<Stu>stus=new ArrayList<Stu>()Stu stu =new Stu()stu setId( )stu setName("aa")stu setId( )stu setName("bb")stus add(stu )stus add(stu )request setAttribute("stus" stus)request getRequestDispatcher("/WEB INF/admin/my jsp") forward(request response)} public void doPost(HttpServletRequest request HttpServletResponse response) throws ServletException IOException { this doGet(request response)} }
my jsp
lishixinzhi/Article/program/Java/JSP/201311/19829
假设Sheet1中的ID在A列。则
一、Ctrl+F3,新建名称:ID
引用位置中填入
=OFFSET(Sheet1!$A$1,,,COUNTA(Sheet1!$A:$A))
二、选中Sheet2中要设置下拉列表的区域
数据
有效性条件(允许)
选“序列”
在序列来源中输入
=ID
确定即可
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)