Java的一些编码基础2010-12-22所有非byte类型的基本类型都可以通过String.valueOf() 方法来转换为字符串非基本类型的比较需要使用equals方法取得表单提交的参数值1: String name = request.getParameter("Name");取得表单提交的数组值1: String[] nameList = request.getParameterValues("ListName");向页面传递参数1: request.setAttribute("var",value);Session操作1: session.setAttribute("var",value);
2: session.getAttribute("var");
3: session.removeAttribute("var");把字符串分割为数组1: String[] col= MyStr.split(",");判断数组的长度1: MyList.length;把字符串转换为整型1: Integer.parseInt(Str);在JSP页面中输出传递值1: <bean:write name="Obj" property="Id" /> //对象的某个属性
2: <bean:write name="name" />Map操作方法1: Map condition= new HashMap();
2: condition.put("name", value);
3: condition.get("name");