sql and java data time

BitTigerio 2017-12-02

1.java

获取当前时间日期等等
Data data = new Data();
日期格式化
SimpleDateFormat;
SimpleDateFormat ft = new SimpleDateFormat ("yyyy-MM-dd");

2sql

DataTime YYYY-MM-DD HH-MM-SS
Data
Time
YEAR

3

HttpSession session = request.getSession();//是否存在session ,否则创建
session.getAttribute("");

4

界面重定向:
    servlet--->jsp
   1. String toJSP = "/jsp/search.jsp";
        //不会产生新的request对象
        RequestDispatcher rd=request.getRequestDispatcher(toJSP); 
        rd.forward(request, response);  
    2.产生新的request对象
String url = "/databasecourse/jsp/search.jsp?yes="+bb;
            
            response.sendRedirect(url);

5.

jsp-->servlet
    1.<a><link>
    2.<form>
    3.sendRedirect()

6

界面数据传递共享方法
    1.HttpSession
     getAttribute();
    request.getSession();
    2.Cookie
    request.setCookie()'
    3.url = "url?"+name+=value&name1=value1
    resquest.getParameter()
    4form
        action method onSubmit "retrurn "
        resquest.getParameter();
        name

7

js操纵html

相关推荐

84593973 / 0评论 2020-06-14