我在session里面存了一行list,我先需要将list值传到jsp页面该怎么做

java.sql.Statement st = conn.createStatement();
String sql="select id,username,sex,birth,borth,working,loginpass,salary from test where id="+users; //test为要查询的表名

ResultSet rs= st.executeQuery(sql);

ArrayList list=new ArrayList();
while(rs.next()){

String id = rs.getString(1);
String username1 = rs.getString(2);
String birth=rs.getString(4);
String sex=rs.getString(3);
String borth=rs.getString(5);
String working=rs.getString(6);
String loginpass1=rs.getString(7);
String salary=rs.getString(8);
System.out.println(123123);

                              User u = new User(); 
                              u.setId(id); 
                              u.setName (username1); 
                              u.setSex(sex);
                              u.setBirth(birth);
                              u.setBorth(borth);
                              u.setWorking(working);
                              u.setLoginpass(loginpass1);
                              u.setSalary(salary);                              
                              list.add(u);
                              System.out.println(list);                      
                                }                               
                      HttpSession session = request.getSession();  //创建
                      session.setAttribute("list", list);   //存
                      request.getRequestDispatcher("update.jsp").forward(request, response);                    
                } catch (SQLException e) {
                        System.out.println(e.getMessage());
                                        } 
                }
        }           后台部分,     
        <%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">







用户名ID:

登录密码:

确认密码:

性别:男



用户姓名:

出生日期:

工 资 :



学历:
大专
本科
硕士
博士




籍贯:
南京
芜湖







<!-- form表单的作用能将多条信息整合起来进行传送。
submit是一个提交按钮,与button不同的是,submit会提交表单。
而button是单纯的一个按钮-->


传到jsp里面value值里面

10个回答

首先,存到session中的值,是可以直接在jsp页面获取的!
JSP的底层是servlet,是可以直接写java代码的.JSP有9大内置对象,其中就包括session.所以你可以直接在页面写/*<%=session.getAttribute("HOLIDAY(这是存的时候起的)") %>*/ 就可以看到.当然,也可以用EL表达式,这个更简洁一些.比如:
后台存值
前台取值
取值展示
其次,我想说,关于页面传值,一般都不放在session中(除去登录者信息)至于为什么,请自行百度.一般我如果用struts2框架的话,都是放在值栈中,如果用springMVC的话,是放在ModelAndView中.还是刚才那个后台传值:我存的mv.addObject("LHOLIDAY", lhs);前台就可以这样取
前台展示
或者,用ajax调用,直接返回JSON数据.

qq_30791769
我在学习java 回复qq_32763245: 没做过
一年多之前 回复
zhan_gsan
zhan_gsan 同赞
一年多之前 回复
qq_32763245
独孤灬二爷 回复qq_30791769: 借地问下,大哥有写过java版的利用FiddlerCore.dll和证书模拟抓包页面吗?
一年多之前 回复
qq_32763245
独孤灬二爷 回复qq_30791769: 本来想回答下的,这个很具体了,赞一个
一年多之前 回复
qq_30791769
我在学习java 至于JSON数据,可以去看我之前的回答.https://ask.csdn.net/questions/679338
一年多之前 回复

可以用c标签
头加上引入
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
然后

用户名ID: /c:out
用户姓名:/c:out
<!--剩下的属性-->
工 资 : /c:out
/c:forEach

congyeyan9940
笨笨的程序员啊 <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
一年多之前 回复

jsp不知道

怎么回事,不能显示代码

你这先看看浏览器的开发工具,看看请求的过程.还有如果能传到前段,可以使用 el表达式,或者 jstl 把值展现出来

qq_41843551
鱼在海上飞 回复qq_40164181: 问问题习惯把自己的代码传上去
一年多之前 回复
qq_40164181
qq_40164181 回复qq_41843551: 这个不知道,不过你要上传干嘛
一年多之前 回复
qq_41843551
鱼在海上飞 问一下怎么上传jsp代码
一年多之前 回复

直接在jsp页面上取<%=request.getSession.getAttribute("sessionid");%>

secretfinal
餘生請多指教♪W 回复qq_41843551: 贴图片
一年多之前 回复
qq_41843551
鱼在海上飞 怎么上传jsp源代码
一年多之前 回复

session是不用传递的,session.getAttribute("list")赋值给list就能使用

qq_30791769
我在学习java 回复qq_41843551: 贴图片,截图再传
一年多之前 回复
qq_41843551
鱼在海上飞 问一下,我一传源代码就变成汉字了怎么上传jsp源代码
一年多之前 回复

用C标签jstl
<%@ taglib uri=”http://java.sun.com/jsp/jstl/core” prefix="c" %>这行写入页面最上方
加入jstl之后就可以使用c标签了
比如你想用session里边的数据如下

${myList.集合中的数据名称NAME} 同上 同上 同上

纯手打不容易

可以使用jstl标准标签库对其遍历,传值的话,拿到session就可以获取了

可以使用jstl标准标签库对其遍历,传值的话,拿到session就可以获取了图片说明

<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">







用户名ID:

登录密码:

确认密码:

性别:男



用户姓名:

出生日期:

工 资 :



学历:
大专
本科
硕士
博士




籍贯:
南京
芜湖







<!-- form表单的作用能将多条信息整合起来进行传送。
submit是一个提交按钮,与button不同的是,submit会提交表单。
而button是单纯的一个按钮-->


这是jsp部分
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
List里面存放了Map
List result 里面的值是[N_SELF_CUST_PRIVILEGE_ID=7, N_SELF_CUST_PRIVILEGE_ID=8, N_SELF_CUST_PRIVILEGE_ID=9, N_SELF_CUST_PRIVILEGE_ID=10, N_SELF_CUST_PRIVILEGE_ID=1, N_SELF_CUST_PRIVILEGE_ID=2, N_SELF_CUST_PRIVILEGE_ID=3, N_SELF_CUST_PRIVILEGE_ID=4, N_SELF_CUST_PRIVILEGE_ID=5, N_SELF_CUST_PRIVILEGE_ID=6]rn 小弟刚入行,很多都不会,现在我想要获取出数字,然后放到数组里,传到前台jsp页面去。应该怎样写,数字不是N_SELF_CUST_PRIVILEGE_ID=1的,就要1,补充下,我用的是struts1
jsp页面session存值取值
session设置: session.setAttribute("ftpfolder", "/cc/dd/");ftpfolder=session.getAttribute("ftpfolder");%>
为什么我在servlet里存了一个list,在JSP页面读不出来
各位大神,帮帮忙吧。快崩溃了。问题是这样的:rn1.我在servlet里存了一个listrn2.在JSP页面我想遍历这个list,结果遍历不出来,不知道什么原因rn[b]代码如下[/b]rn1.servlet的代码:rnpackage com.BLL;rnrnimport java.util.*;rnimport java.text.*;rnimport java.io.*;rnimport java.sql.*;rnimport javax.servlet.*;rnimport javax.servlet.http.*;rnimport com.DAO.*;rnimport com.Model.*;rnrnpublic class Search extends HttpServletrn public void doGet(HttpServletRequest request,HttpServletResponse response) throws IOException,ServletExceptionrn int distractID=Integer.parseInt((String)request.getParameter("selectDistract"));rn String condition=(String)request.getParameter("searchCondition");rn String distract;rn HttpSession session=request.getSession();rnrn if(distractID==0)rn distract="中山区";rn else if(distractID==1)rn distract="西岗区";rn else if(distractID==2)rn distract="沙河口区";rn else if(distractID==3)rn distract="甘井子区";rn else if(distractID==4)rn distract="开发区";rn else if(distractID==5)rn distract="高新园区";rn elsern distract="中山区";rnrn List list=HouseDAO.getHouseListByCondition(distract,condition);rn session.setAttribute("searchRs",list);rn response.sendRedirect("searchPage.jsp");rn rnrn public void doPost(HttpServletRequest request,HttpServletResponse response) throws IOException,ServletExceptionrn doGet(request,response);rn rnrnrnJSP页面代码:rn<%@ page contentType="text/html; charset=utf-8" language="java" import="java.sql.*" errorPage="" %>rn<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>rn<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%> rnrnrnrn rn rn rn rn 无标题文档rnrnrnrn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn 户型:rn rn 室rn rn 厅,rn rn 平,rn rn 层,rn rn rn 年,rn rn 元/平 rn rn 经纪人:rn rn rn rn rn rn rn rn 万 rn rn rn rnrnrnrnrn运行结果:rn页面没输出任何东西rnrnrn求大神指教啊!!!!!
action的值传到session里面
[img]http://dl.iteye.com/upload/attachment/437588/dced201c-97a7-353f-957f-e47b5058bdeb.png[/img] 上面这种方式,我经过尝试,证明可以。下面这种方式我没有尝试,供大家参考: [img]http://dl.iteye.com/upload/attachment/437590/4b925f83-4abc-...
List 的 List,晕死我的天
有如下程序,.Net 2.0rnList list1 = new List();rnList list2 = new List();rnList> list3 = new List>();rnrnlist1.Add(1);rnlist1.Add(2);rnlist2.Add(1);rnlist2.Add(2);rnlist3.Add(list1);rnrnint pos = list3.IndexOf(list2);rn结果返回-1,请问各们大侠要如何解决,rn我想在list3里检索是否存在跟list2元素一样的list.rn谢谢谢谢!
怎么比较MAP里面存的值?值是LIST形式的
怎么比较MAP里面存的值?值是LIST形式的
structs2标签 jsp页面把list传到action
structs2标签 我原来从action传一个list到jsp页面,现在想让list在页面多得到一个属性,再把list传回到action中,要怎么写啊?把jsp页面里要的代码写出来就行,要用structs2标签。我举个例子:rn rn rn rn这个是action传过来的list,有两个属性了,我希望可以在jsp页面中使它再多一个属性,让回传回到action中去。rn这个其实简单的来说就是,我action里传了个学生列表(每个学生有id name之类的属性)到页面上,现在我希望的是可以多一个属性,在每个学生前面都有个选择框,当在选择框里打了勾以后,这个属性的值就为1,没打勾的就为0,这样传回到action里去,这样就可以知道哪里学生被选择了,哪些没被选择
controller怎么无法将list值传到jsp页面
[img=https://img-bbs.csdn.net/upload/201610/10/1476062729_200663.png][/img]rnrnrnrnrnrnrnrnrn[img=https://img-bbs.csdn.net/upload/201610/10/1476062800_878387.png][/img]
[STL] list 里面怎么再放list? 我这样好像不可以。
#includern#includern#includern#includern#includern#includern#includern#includern#include rnusing namespace std;rnvoid main()rnrn list Lst1;rnrn list Lst2;rnrn Lst1.push_back(&Lst2); rn
怎么做 List
我想做一个对话框 当点击list的某一个行时弹出对话框rn 怎么做
dwr 与List里的LIST 怎么做?
[code=Java]rnpublic List Query(String startdate,String enddate,String telco)rn List list =new ArrayList();rn Connection conn=null;rn Statement stmt=null;rn ResultSet rs=null;rn String sql="select sum(mttotalfee) as feesum,province,count(distinct sender) as sendernum,province from "rn +" [platform].[dbo].[vasmt_dayfeeRecord] where adate>'"+startdate+"' and adate<'"+enddate+"'"rn +" and telco='"+telco+"' group by province order by feesum desc";rn String avgpirce="";rn ReportBean reportBean=null;rn tryrn Context ic = new InitialContext();rn DataSource source = (DataSource) ic.lookup("java:comp/env/jdbc/data");rn conn = source.getConnection();rn stmt=conn.createStatement();rn rs=stmt.executeQuery(sql);rn while(rs.next())rn reportBean=new ReportBean();rn rn if(rs.getString("province")==null)rn reportBean.setProvince("未知");rn elsern reportBean.setProvince(rs.getString("province"));rn rn reportBean.setSendernum(rs.getInt("sendernum"));rn reportBean.setFeesum(rs.getInt("feesum")/100);rn reportBean.setStartdate(startdate);rn reportBean.setTelco(telco);rn reportBean.setEnddate(enddate);rn avgpirce=reportBean.getFeesum()*1.00/reportBean.getSendernum()+"";rn BigDecimal d=new BigDecimal(avgpirce);rn d=d.setScale(2, BigDecimal.ROUND_HALF_UP);rn reportBean.setAvgprice(d.toString());rn list.add(reportBean);rn if(list.size()!=0)rn System.out.println("list:"+list.size());rn System.out.println("开始时间:"+reportBean.getStartdate());rn System.out.println("结束时间:"+reportBean.getEnddate());rn System.out.println("省份:"+reportBean.getProvince());rn rn rn catch (Exception e) rn log.error("查询[report].[dbo].[akn_sender_daysumfee]出错:"+e.getMessage());rn e.printStackTrace();rn finallyrn Database.closeStatementByResultSet(rs);rn try rn conn.close();rn catch (SQLException e) rn e.printStackTrace();rn rn rn log.info("报表记录长度:"+list.size());rn rn return list;rn rn public List PackageList(String startdate,String endDate,String telco)rn System.out.println("开始时间:"+startdate+"------结束时间:"+endDate+"-----通道号:"+telco);rn List list=new ArrayList();rn List ReportList=new ArrayList();rn List ReportListList=new ArrayList();rn SimpleDateFormat formatter=new SimpleDateFormat("yyyy-MM-dd"); rn try rn Date date1 = formatter.parse(startdate);rn Date date2 =formatter.parse(endDate); rn long l = date2.getTime() - date1.getTime();rn long d = l/(24*60*60*1000)+1; rn Calendar startnow=Calendar.getInstance();rn startnow.setTime(date1);rn if(d==1)rn ReportList=ReportDao.getInstance().Query(startdate, endDate, telco);rn return ReportList;rn elsern for(int i=0;i
将一个list的值存放到另一个list中去
List list = v_userinfo.select(strWhere, PageSize, PageIndex);               List students = new List();             for (int i = 0; i              {                 model=new Model_V_SYS_User_Inf
jsp页面获取servlet中保存的session的list的值
在jsp页面中我这样写的rn<%@page import="com.entity.User"%>rn<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>rn<%rn [color=#FF0000] User user=new User();rn List list=(List)request.getSession().getAttribute("list");[/color]rn %>rnrnrn[color=#FF0000] <%for(User user:list) %>[/color]rn 编号 rn 用户名 rn 密码 rn <% %>rn rn[color=#FF0000]但是在for循环那报错使jsp页面无法编译[/color]rnservlet里rnrnpublic void doPost(HttpServletRequest request, HttpServletResponse response)rn throws ServletException, IOException rn request.setCharacterEncoding("utf-8");rn response.setCharacterEncoding("utf-8");rn rn List list = UserService.getInstance().selectAll();rn HttpSession session=request.getSession();rn if(list == null)rn System.out.println("查找失败");rn rn elsern System.out.println("查找成功!");rn rn System.out.println("list里的值"+list.get(1).getName());/[color=#FF0000]/能输出[/color]rn session.setAttribute("list", list);rn response.sendRedirect(request.getContextPath()+"/user/allUser.jsp");rn rn rn
我该怎么把 的值传到CS里面去啊?
我要传rn写在 rn里面不能显示,rn现在写在rn里面可以显示,rn但是现在的问题是:我该怎么把rnrn的值传到CS里面去啊?rnrn<%@ Page Inherits="www.MyCodeBehind" Src="speak.cs"%> rnrnrn 我要發言rnrn rnrnrnrnrnrnrnrnrnrnrnrn rnrnrnrnrnrnrnrnrnrn
JSP页面取不到ModelAndView里面存的值~~
Controller代码:rn[code=java]rn @RequestMapping(value="selectDepts2.do")rn public ModelAndView findDepts2() rn List depts=deptService.getDpets();rn ModelAndView mav=new ModelAndView("dept");rn mav.addObject("depts", depts.get(0));rn return mav;rn rn[/code]rnrnjsp页面 则是直接通过 $deptsrnrn整个过程都没有报错,只是页面显示出来的就是 "$depts" 这个字符串。。rn网上一直还找不到解答,求各位大侠帮帮看~~谢啦~~!
list存取值问题
String username = request.getParameter("username");rnString password = request.getParameter("password");rnrnString loginHql="select userid,username from Users where username=:username and password=:password order by userid";rn rnSession session = null;rn if(username != null & password != null)rn session = HibernateSessionFactory.getSession();rn Query q = session.createQuery(loginHql);rn q.setString("username", username);rn q.setString("password", password);rn if(q.list().size() > 0)rnrn List userIdName = q.list(); [color=#FF0000]//这行报错了[/color]rn//报这个错:java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to com.zk.pojo.Usersrnrn System.out.println(userIdName.get(0).getUserid());rn HttpSession userSession = request.getSession();rn userSession.setAttribute("user", userIdName);rn System.out.println("用户ID为:" + userid); rn elsern System.out.println("登陆失败!");rn rnrn[color=#FF0000]问题:List里需要装入userid和username,之后如何取到userid???[/color]rnrn
为什么我的LIST只能获得一个值?
[code=Java]rnList letterList = this.getHanton().getEmployeeDAO()rn .getLetterName(comCode);rn Map parent_dataMap = new HashMap();rn Map dataMap = new HashMap();rn List parent_datalist = new ArrayList();rn for (Map m1 : letterList) rn parent_datalist = this.getHanton().getEmployeeDAO()rn .getCompNameByLetterName(comCode,rn m1.get("LETTER_NAME").toString());rn parent_dataMap.put(m1.get("LETTER_NAME"), parent_datalist);rnrn // List compList = this.getHanton().getEmployeeDAO()rn // .getCompName(comCode);rn rn for (Map m : parent_datalist) rn String test1 = m.get("COMP_NAME").toString();rn List datalist = this.getHanton().getEmployeeDAO()rn .findByCompName(comCode, m.get("COMP_NAME").toString(),rn conkind);rn // dataList.put("name", );rn dataMap.put(m.get("COMP_NAME"), datalist);rn // dataMap.put("numList",datalist.size());rn [/code]rn代码如上,为什么我的parent_datalist只能获得一个值?
list嵌套list,怎么在JSP页面foreach循环
servlet类文件部分代码rn[code=java]rnList list3 = new ArrayList();rnList> getlist = new ArrayList>();rngetlist.add(list3);rnrequest.setAttribute("getlist", getlist);rn[/code]rnrn怎么在JSP页面foreach这个getlist
我的List坑
我曰:坑不在大小,坑了方能成长!!! 记得刚写代码的时候,写到了内部逻辑:将一个list中的内容按照某种规则分为合格的数据和不合格的数据,我讲每个list进行判断,然后判断。我定义了两个list,goodList,badlist。 然后判断list1,list2,list3...合格否,然后循环判断,我进行了如下操作: goodList = list1; badList = list2;
jsp页面通过request.put(list)获取action的值
[b]Action部分: [/b]rnrnMap request = (Map) ActionContext.getContext().get("request");rn List list = productService.list();rn //测试有没有值过来rn for (Product product : list) rn System.out.println(product.getName());rn rn //发送至jsprn request.put("list", list);rn return "success";rn[b]Jsp页面部分:[/b]rn//s标签rn<%@ taglib prefix="s" uri="/struts-tags"%>rnrnrn rn rn rn rn rn rnrn rn rn[b]Struts.xml部分:[/b]rn rn /admin/adminproduct.jsprnrnrnrn第一次发帖,大家多多指教;rn这次是在作业过程发现一个bug,苦苦查询无解,老师非常cai,ssh整合讲了一点皮毛就结课了;rn作业全程百度+回顾以前知识,bug为红色字体部分,[b]必须删除[/b],不然Jsp页面无法显示数据;rn希望各位不吝赐教。
jsp页面遍历list集合?
jsp页面如何遍历struts2的action传过来的list集合,并显示?
jsp页面遍历list的内容
jsp页面遍历list的内容&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;专家组材料文审上传资料:&amp;lt;/td&amp;gt;&amp;lt;td colspan=&quot;5&quot;&amp;gt;&amp;lt;c:forEach var=&quot;expertFile&quot; items=&quot;${expertAttrFiles}&quot; &amp;gt;&amp;lt;c:forEach var=&quot;zjone1&quot; item
jsp页面输出List
一般情况下输出都是用rn[code=java][/code]rn迭代循环的方式输出。rnrnrn有没有方式是不循环输出, softList里面有3个值的话,就直接在3个固定的文本框上显示值。
JSP页面显示不全 LIST
org.apache.jasper.JasperException: tag 'radio', field 'list', name 'style.transmitEmail': The requested list key '%#'true':'是', #'false':'否'' could not be resolved as a collection/array/map/enumeration/iterator type. Example: people or people.name - [unknown location]rn at org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:565)rn at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)rn at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)rn at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:683)rn at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:469)rn at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:404)rn at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)rn at org.apache.struts2.dispatcher.ServletDispatcherResult.doExecute(ServletDispatcherResult.java:136)rn at org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:175)rn at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:309)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:218)rn at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:177)rn at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:200)rn at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:115)rn at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:200)rn at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:123)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:200)rn at com.opensymphony.xwork2.interceptor.ParametersInterceptor.intercept(ParametersInterceptor.java:147)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:200)rn at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:105)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:200)rn at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:80)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:200)rn at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:204)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:200)rn at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:74)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:200)rn at com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:120)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:200)rn at org.apache.struts2.interceptor.ProfilingActivationInterceptor.intercept(ProfilingActivationInterceptor.java:59)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:200)rn at org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:174)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:200)rn at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:115)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:200)rn at com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:143)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:200)rn at com.opensymphony.xwork2.interceptor.PrepareInterceptor.intercept(PrepareInterceptor.java:115)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:200)rn at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:156)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:200)rn at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:124)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:200)rn at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:180)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:200)rn at org.apache.struts2.impl.StrutsActionProxy$1.call(StrutsActionProxy.java:27)rn at org.apache.struts2.impl.StrutsActionProxy$1.call(StrutsActionProxy.java:26)rn at org.apache.struts2.impl.RequestContextImpl.callInContext(RequestContextImpl.java:152)rn at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:25)rn at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:330)rn at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:256)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at kf.base.servlet.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:42)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:174)rn at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:228)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)rn at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:212)rn at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:818)rn at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:624)rn at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:445)rn at java.lang.Thread.run(Unknown Source)rnCaused by: tag 'radio', field 'list', name 'style.transmitEmail': The requested list key '%#'true':'是', #'false':'否'' could not be resolved as a collection/array/map/enumeration/iterator type. Example: people or people.name - [unknown location]rn at org.apache.struts2.components.Component.fieldError(Component.java:221)rn at org.apache.struts2.components.Component.findValue(Component.java:283)rn at org.apache.struts2.components.ListUIBean.evaluateExtraParams(ListUIBean.java:75)rn at org.apache.struts2.components.UIBean.evaluateParams(UIBean.java:737)rn at org.apache.struts2.components.UIBean.end(UIBean.java:450)rn at org.apache.struts2.views.jsp.ComponentTagSupport.doEndTag(ComponentTagSupport.java:36)rn at org.apache.jsp.core.companyStyleLeaveWords_jsp._jspx_meth_s_005fradio_005f1(companyStyleLeaveWords_jsp.java:636)rn at org.apache.jsp.core.companyStyleLeaveWords_jsp._jspService(companyStyleLeaveWords_jsp.java:353)rn at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)rn at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:390)rn ... 74 morern这个是异常rnrn代码是rnrn是否浮动于任何元素之上:rn<%pageContext.setAttribute("yesNo", SystemDictionary.getItems(IDicContants.YES_NO));%>rnrnrnrnrn导致下面一半多的页面不显示了 求解
JSP页面显示List
在Action里传递一个list想要迭代显示 结果怎么都出不来。。rnrn<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>rn<%rnString path = request.getContextPath();rnString basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";rn%>rn<%@page import="java.util.List"%>rn<%@page import="java.util.ArrayList"%> rnrn<%@taglib prefix="s" uri="/struts-tags" %>rnrnrn rn rn rn My JSP 'studentlist.jsp' starting pagern rn rn rn rn rn rn rnrn rn rn rn <%rn List list=(List)request.getAttribute("list");rn List arr=new ArrayList();rn %>rn <%=list %> aaarn <%=arr %>rn 增加学生   rn 下一页 rn 上一页 rn 首页rn rn rn rn rn rn rn  属 性 学生编号 学生姓名 联系电话 所属部门 辅导员电话 小组编号rn rn rn rn $list.department $list.departmentrn rn rn rn rn rn rn rn rn rn rn rnrnrnrn这是我的JSP代码 List显示不为空
JSP页面显示list的常用方法
JSP页面显示list的常用方法
jsp页面能使用List list= new List()吗
我想在jsp页面用数组存储一些数据,但是使用List list= new List();却显示不正确,该怎么解决啊
list control 和 list box 一行显示多行文本
我又发新问题了,rn上次的问题是:我想在同一个Hbitmap显示两张图片,通过OnTimer,显示不同的图片。如何删除已经加载的图片,在加载新的图片。PS我已经加载了第一张了,但加载第二张时,显示的是第一张rnHbitmap=(HBITMAP)::LoadImage(0,m_Path[i],IMAGE_BITMAP,Imagex,Imagey,LR_CREATEDIBSECTION|LR_LOADFROMFILE);//导入图片rnrnBitmap.Attach(Hbitmap);//加载图片rnm_ImageList.Add(&Bitmap,RGB(0,0,255));rnm_list.SetImageList(&m_ImageList,LVSIL_SMALL); rn补充:我不是放在onpaint那的,而是socket,ontimer那,我希望收到第一个图片地址,就显示出来,接着收第二张,就把第一的删除,然后显示第一张,如果有要求再上码,rn现在的问题才是重点:求大力帮忙哦:rn上问题:rnlist control 和listbox每一项总是一行显示,即便是字符串里包括了"\n\r",他也不会把一项用多行显示。怎么办? rn希望给个码,发邮件到我qq也行,270832780@qq.com,给100分,nsdn我不会,分不多,留60给自己,如果大师帮解决问题,要我全部财产,哥不心痛。另外百度那也提问,百度分不多,10多年的号:1000分是有的,能解决问题百度分要多少可开价。不多说上百度地址:http://zhidao.baidu.com/question/554543036?quesup2&oldq=1
我需要将一个结构题通过网络传到另一台机器 应该怎么做
如体 我的结构体是这样rn typedef structrnrn char CharacterMap[20];rn int CharacterLenght;rn TDateTime TriggerTime;rn TDateTime DisposeTime;rnResult;rnrn
sos!!! 我要将一长串存成blob???~~^-^~~
因为mysql不支持长串,所以要用blob字段rn不知要用什么方法进行读取与操作???rn只有insert rn和select 操作??? rn
list中存了String型的数组,想让这个list按数组中的字一个值排序,该怎么做?
数组中的第一个值 X[0]中存的都是1.2 /1.4/2.5... 这样的值
关于List ,Session的作用域?
我在网页有一表格,数据源是一Listrnrn在一按钮中persons.Add(new Person("text","text")),在网页另一控件却读取不到这个List(persons),是空的,rnrn虽然我用 Session["xx"] = persons;rn在网页另一控件 List persons = (List)Session["xx"];可以取到之前插入的数据,但很疑惑,在运行这网页期间,List是存在本地还是服务器端?可以不用Session吗?
List 里面嵌套List<map>解析
如下: testList 是List inspec 中有一个字段inspec.insList返回值是List<s:iterator value="testList" status="st"> <form action="<%=basePath%>/Report_queryDetail.action" method="post" id="form${st.index}">
如果我要将下面的数字构建成树该怎么做?
11218 132450000rn11219 132451000rn11220 132452000rn11221 132452100rn11222 132453000rn11223 132454000rn11224 132455000rn11225 132455100rn11226 132456000rn11227 132458000rn11228 132457000rn11229 132460000rn11230 132461000rn11231 132463000rn11232 132462000rn11233 132464000rn11234 132500000rn11235 132600000rn11236 132800000rn11237 132900000rn11238 132A00000rn11239 132B00000rn11240 132D00000rn11241 132E00000rn11242 132E10000rn11243 132E90000rn11244 132E20000rn11245 132EA0000rn11246 132E30000rn11247 132EB0000rn11248 132E40000rn11249 132EC0000rn11250 132E50000rn11251 132E60000rn11252 132E70000rn11253 132E80000rn11254 132ED0000rn11255 132EE0000rn11256 132EF0000rn11257 132EG0000rn11258 132EH0000rn11259 132F00000rn11260 132F10000rn11261 132F20000rn11262 132H00000rn11263 132I00000rn11264 132J00000rn11265 132L00000rn11266 132M00000rn11267 132R00000rn11268 132S00000rn11269 132N00000rn11270 132N30000rn11271 132N50000rn11272 132N80000rn11273 132ND0000rn11274 132NE0000rn11275 132NF0000rn11276 132NG0000rn11277 132O00000rn11278 132P00000rn11279 132P10000rn11280 132P20000rn11281 132P30000rn11282 1FB000001rn11283 133100000rn11284 133200000rn11285 116100000rn11286 116200000rn11287 000000000rn11288 000000001rn11289 000000002rn11290 000000004rn11291 1FB000002rn11292 1FB000003rn11293 1FB000004rn11294 1FB000005rn11295 1FB000006rn11296 1FB000007rn11297 1FB000008rn11298 1FB000009rn12001 111000000rn12002 111100000rn12003 111110000rn12004 111120000rn12005 111130000rn12006 111140000rn12007 111141000rn12008 111142000rn12009 111143000rn12010 111144000rn12012 111160000rn12013 111161000rn12014 111161100rn12015 111161200rn12016 111161300rn12017 111161310rn12018 111161320rn12019 111161400rn12020 111161500rn12021 111162000rn12022 111163000rn12023 111163100rn12024 111163200rn12025 111163300rn12026 111163400rn12027 111163500rn12028 111164000rn12029 111164100rn12030 111164200rn12031 111165000rn12032 111170000rn12033 11117G000rn12034 11117A000rn12035 11117G200rn12036 11117H000rn12037 111180000rn12038 111181000rn12039 111181100rn12040 111181200rn12041 111181300rn12042 111181310rn12043 111181320rn12044 111181400rn12045 111181500rn12046 111181510rn12047 111182000rn12048 111183000rn12049 111183100rn12050 111183200rn12051 111183300rn12052 111183310rn12053 111183400rn12054 111183600rn12055 111183700rn12056 111183500rn12057 111184000rn12058 111184100rn12059 111184200rn12060 111190000rn12061 111191000rn12062 111192000rn12063 111193000rn12064 111194000rn12065 111194200rn12066 111194300rn12067 111194400rn12068 111194500rn12069 111194600rn12070 111195000rn12071 111196000rn12072 111197000rn12073 111198000rn12074 111198100rn12075 111198500rn12076 111198510rn12077 111198520rn12078 111198600rn12079 111198700rn12080 111198800rn12081 111198900rn12082 111198A00rn12083 111198B00rn12084 111198C00rn12085 111198D00rn12086 111198E00rn12087 111198K00rn12088 111198F00rn12089 111198F10rn12090 111198F70rn12091 111198F20rn12092 111198F30rn12093 111198F40rn12094 111198F50rn12095 111198F60rn12096 111198H00rn12097 111198I00rn12098 111198J00rn12099 1111A0000rn12100 1111A1000rn12101 1111A2000rn12102 1111A3000rn12103 1111A3100rn12104 1111A3110rn12105 1111A3120rn12106 1111A3200rn12107 1111A3300rn12108 1111A3310rn12109 1111A3320rn12110 1111A3400rn12111 1111A3410rn12112 1111A3420rn12113 1111A3500rn12114 1111A3520rn12115 1111A3510rn12116 1111A4000rn12117 1111A5000rn12231 1111K0000rn12232 1111K1000rn12233 1111K2000rn12234 1111K3000rn12235 1111K4000rn12236 111200000rn12237 111210000rn12238 111211000rn12239 111212000rn12240 111217000rn12241 111216000rn12242 111216I00rn12243 111216I10rn12244 111216I70rn12245 111216I20rn12246 111216I30rn12247 111216I40rn12248 111216I50rn12249 111216I60rn12250 111216J00rn12251 111216300rn12252 111216400rn12253 111216500rn12254 111216510rn12255 111216600rn12256 111216610rn12257 111216620rn12258 111216630rn12259 111216700rn12260 111216800rn12261 111216900rn12262 111216A00rn12263 111216B00rn12264 111216C00rn12265 111216D00rn12266 111216E00rn12267 111216G00rn12268 111216H00rn12269 111216F00rn12270 111230000rn12271 111231000rn12272 111232000rn12273 111233000rn12274 111234000rn12275 111235000rn12276 111240000rn12277 111241000rn12278 111242000rn12279 111250000rn12280 111251000rn12281 111252000rn12282 111252100rn12283 111253000rn12284 111253100rn12285 111253110rn12286 111253120rn12287 111253200rn12288 111253300rn12289 111253310rn12290 111253320rn12291 111253400rn12292 111253410rn12293 111253420rn12294 111253500rn12295 111254000rn12296 111255000rn12297 111255100rn12298 111255200rn12299 111255300rn12300 111256000rn12301 111270000rn12302 111271000rn12303 111272000rn12304 111280000rn12305 111281000rn12306 111282000rn12307 111290000rn12308 1112A0000rn12309 1112B0000rn12310 1112C0000rn12311 1112D0000rn12312 1112E0000rn12313 1112E1000rn12314 1112E2000rn12315 1112E3000rn12316 1112E4000rn12317 1112E8000rn12318 1112E5000rn12319 1112E6000rn12320 1112E7000rn12321 1112F0000rn12322 1112F1000rn12323 1112F1100rn12324 1112F1200rn12325 1112F1300rn12326 1112F1400rn12327 1112F1500rn12328 1112F1600rn12329 1112F1700rn12330 1112F1800rn12331 1112F1900rn12332 1112F1A00rn12333 1112F1B00rn12334 1112F2000rn12335 1112F2100rn12336 1112F2200rn12337 1112F2300rn12338 1112F2400rn12339 1112F2500rn12340 1112F2600rn12341 113000000rn12342 113100000rn12343 113110000rn12344 113111000rn12345 113112000rn12346 113113000rn12347 113114000rn12348 113115000rn12349 113116000rn这个必须按第一列排序。。。。
list里面包含list的解析方法
返回部分data是数组的,新一个对象类,里面设置为 List info = new ArrayList(); 就可以自动解析新数组了
list数组里面放list数组的问题
Dim collectionnumber As New List(Of Integer) rnrnDim resultlist As New List(Of List(Of Integer))rnrn我声明了这样两个个数组 我把collectionnumber 放入resultlist 中,但我发现只是将collectionnumber 的引用加到了resultlist中,我想要把collectionnumber 的值加到resultlist中,不知道怎么实现?rn附:collectionnumber中的数组在不断的变的,我是不断的把collectionnumber 放入resultlist 中,因为是引用的添加,所以resultlist 中放了n组相同的collectionnumber,我要的是值的添加rnrn另外 如果list不能实现这种效果,有没有其他数组可以?
session和List泛型的使用
public void GetType(...)rnrn TypeInfo type = new TypeInfo();rn type.typeID=convert.toint32(textbox.text);rn type.typeName = textbox.Text;rn session["Tp"] = type; rnrnrnpublic GetsessionType()rnrn List type = (List)session["Tp"];rn dataList1.datasourt=type;rn dataList1.dataBind();rnrnrnList type = (List)session["Tp"]; 也会说不允许强制类型转换rnrn当然我尝试过 List type = new List();rnrn type.add((TypeInfo)session["Tp"]);rn这样虽然可以解决类型转换的问题但是每次运行都会NEW一个 导致第一次添加的数据会被第二次添加的数据所覆盖rn请高手帮忙指教如何才能正确的 在内存中保存多条数据rn跪求。。。我比较笨跪求 请各位大哥大姐不吝指教
关于 session——————List
我在session中存入list list中存入一些信息 现在想删除list中的一条信息 请问怎么更新session中的list 是不是必须清空然后重新加载rnrn好的答案加分 有必要说说session的用法及属性 rnrn是不是只能这样 虽然是实现了 但是不满意 rn list=(ArrayList)session.getAttribute("Bycarlist");//从session这种取出数据list集合rn int id=Integer.parseInt(request.getParameter("id"));rn for(int i=0;i
我有两个List 的集合,如何根据一个list去除另一个list中和他相同的值
如题:rnrnList list1=new List();rnrnList list2=new List();rnrn根据list2去除 list1中和list2想的值!
List分页怎么做。?
我Action调用biz,biz调用dao,得到一个对象集合Listrn我想直接对List操作,并实现分页功能,请问有办法没有?rn在线等,有急用。谢谢。
相关热词 c# login 居中 c# 考试软件 c# 自然语言分析 c# 分段读取文件 c# 泛型反射 c#打断点 c# 时间转多少秒 c# 线程函数加参数 c# modbus 读取 c#查询集合表