• Servlet&JSP基础


    Servlet
     
     
    JSP
     
     
    JSP四种基本语法:
        JSP注释<%--注释内容-->
        JSP声明<%!变量、函数%>
        JSP表达式<%=表达式%>
        JSP脚本<%Java代码%>
     
    JSP指令:
        page
        include
        taglib
     
    Jsp动作指令:
        forward
        include
        useBean 
        getProperty 
        setProperty
        plugin
        param
     
    JSP内置对象
        application
        session
        page
        request
        config
        pageContext
        response
        exception
        out
     
      
    • 对象                           类                                  常用方法
    • application                ServletContext             Web应用(getAttribute(str),setAttribute(str))
    • config                        ServletConfig               JSP配置信息(getInitParam(str))
    • session                      HttpSession                  会话(getAttribute(str))
    • page                          this                               页面 
    • pageContext             PageContext                 页面上下文(getServletContext(),getServletConfig())
    • request                      HttpServletRequest      客户端请求(获取请求参数、请求头;操作属性;执行forward或 
                                                                                       include)     
                                                                                       (getParameter(str),getAttribute(str),setCharacterEncoding(str))
                                                                                       (getRequestDispatcher("/...").foward/include(req,resp))
    • response                    HttpServletResponse   服务端响应(非字符响应、重定向、增加cookie)
                                                                                     (sendRedirect(str),getOutputStream(),addCookie(c))
     
    • out                             JspWriter                      页面输出流(println(str))
    • exception                   Throwable                    异常(getMassage(),printStackTrace())

    EL表达式

    JSTL

    可参考:http://www.runoob.com/jsp/jsp-jstl.html

        http://www.tutorialspoint.com/jsp/jsp_standard_tag_library.htm

    监听器

    过滤器

  • 相关阅读:
    2019年----沉淀的一年
    条目八《永不建立auto_ptr的容器》
    条目七《如果容器中包含了通过new操作创建的指针,切记在容器对象析构前将指针delete掉》
    条目六《当心C++编译器中最烦人的分析机制》
    条目五《尽量使用区间成员函数代替它们的单元素兄弟》
    cpu上下文切换
    条目四《用empty来代替检查size()是否为0》
    条目三《确保容器中的副本对象高效而正确》
    ORB与LBP、HOG
    C++
  • 原文地址:https://www.cnblogs.com/goingforward/p/5729733.html
Copyright © 2020-2023  润新知