1.java批量删除checkbox中选中的对象-CSDN论坛-CSDN.NET-中国最大的IT技术社区 http://bbs.csdn.net/topics/360223125
2.重定向与转发路径定位问题
res.sendRedirect(req.getContextPath()+"/servlet/basedata/SearchItemServlet");
drp4.5 /定位到端口
3.千年老问题:
Servlet中转发和重定向的路径问题 - 51CTO.COM http://developer.51cto.com/art/200906/131652.htm
4.数字中的格式字符串(2)
格式化数字 http://www.foxtable.com/help/topics/0361.htm
5.jstl中自定义函数
自定义JSTL函数标签_outsider_新浪博客 http://blog.sina.com.cn/s/blog_4b6f8d150100wa9r.html
6.Form中action路径问题
表单form action的url写法_绝世好阿狸_新浪博客 http://blog.sina.com.cn/s/blog_9f33f9170102v7h4.html
7.设置文件的默认打开方式
【General】 -> 【editors】 -> 【file association】
8.学习一个新的Exception
java.net.MalformedURLException
9.设置myeclipse提示
Eclipse -> Window -> Perferences -> Java -> Editor -> Content Assist,在右边最下面一栏找到 auto-Activation ,下面有三个选项,找到第二个“Auto activation triggers for Java:”选项
***10session中存的值对整个浏览器有效,直到浏览器关闭
11.如何打开jar包的内容
web app libraries-->
12、提交表单的方式
 var form=document.getElementsByTagName("form");
     form[0].submit();
String name=request.getParameter("name").toString();通过getparameter取
13.乱码
编码与解码不一致
get方式
byte[] bytes=name.getBytes("ISO-8859-1");用iso-8859-1解码name,url是用iso-8859-1编码的。
String strName=new String(bytes,"UTF-8");
post方式
request.setCharacterEncoding("UTF-8");
		response.setContentType("text/html;charset=utf-8");
13.ajax
创建xmlHttpRequest对象
xhr.onreadystatechange=function(){}
function checkGet()
{
if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xhr=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xhr=new ActiveXObject("Microsoft.XMLHTTP");
  }
  xhr.onreadystatechange=function()
  {
    if(xhr.readyState==4 && xhr.status==200)
    {
       alert(xhr.responseText);
    }
  }
 xhr.open("get", "servlet/loginServlet?name="+input_username.value, true);
post方式
function checkPost()
{
	if (window.XMLHttpRequest)
  	{// code for IE7+, Firefox, Chrome, Opera, Safari
  	xhr=new XMLHttpRequest();
  	}
	else
  {// code for IE6, IE5
  	xhr=new ActiveXObject("Microsoft.XMLHTTP");
  }
  xhr.onreadystatechange=function()
  {
    if(xhr.readyState==4 && xhr.status==200)
    {
       alert(xhr.responseText);
    }
  }
  
  xhr.open("post", "servlet/loginServlet", true);
  xhr.setRequestHeader("Content-type","application/x-www-form-urlencoded");
  xhr.send("name="+input_username.value);//此处写post提交的数据
}
如何根据需要的response
Printriter out=response.getWriter();
		out.print();
		out.flush();
		out.close();
 
                    
                 
 
                
            
         浙公网安备 33010602011771号
浙公网安备 33010602011771号