• java-servlet-jsp


    =========================servlet
    javax.servlet    javax.servlet.http    javax.annotation    javax.servlet.annotaion
    一个应用中一个servet只能有一个实例,所有用户共用一个servlet实例
    Servlet接口定义5个方法{
        void init(ServletConfig config) throw servletException
        void service(ServletRequest requset,ServetRespone response)throw ServletException
        void destory()
        String getServletInfo()
        servletConfig getServletConfig()
    }
    service 默认实现转到get/post
    ServletRequest.getParameter getParameterMap getParameterNames/Values
    ServletResponse.getWriter
    一个jvm 中有一个ServletContext{
        get/setAttribute removeAttribute getAttributeNames
    }
    =========================jsp
    javax.servlet.jsp.HttpJspPage
    javax.servlet.jsp.tagext
    javax.el
    javax.servlet.jsp.el
    隐藏对象
    {
        request/response/out(jsp.JspWriter)/session/application(ServletContext)
        config/pageContext(jsp.PageContext)/page(jsp.HttpJspPage)/exception(Throwable)
    }
    Directive{ @
        page/include(生成servlet时)/taglib
    }
    scriptlet <% %>
    expression <%=xx%> 结果会填入out.print中
    declaration <%! %> 声明变量和方法
    action{ <jsp:xx></jsp:xx>
        useBean/include(请求时,扩展名一定要"jsp")/forward
    }
    =========================EL
    ${} []或. 访问属性
    {
        pageContent/initParam/param/ParamValues/header/headerValues/cookie/applicationScope/sessoinScope
    }
    =========================jstl
    http://search.maven.org/#browse|-1002239620
    core/xml/i18n/sql/funtion  c/x/fmt/sql/fn
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
    javax.servlet.jsp.tagext.SimpleTagSupport
    =========================tag 文件
    =========================监听器
    在 ServletContext HttpSession ServletRequest 上
    =========================filter
    登录 加密解密 会话检查 图片转换
    作用在 ServletRequest ServletResponse上
    javax.servlet.Filter {
        init/doFilter/destory
    }
    model2
    struts1 springmvc use servlet作 front controller
    struts2 用filter 作 front controller
    javaBean {
        无参contruct
        get/set
        Serializable
    }
    =========================upload file
    entype="multipart/form-data"
    @MultipartConfig
    =========================down file
    Content-Type  : application/octetstream
    Content-Dispostion  attachment:finename=xxx
    =========================decorator
    HttpServletRequest/ResponseWrapper
    =========================部署
    javax.servlet.ServletContainerInitializer{
        onStartup
    }
    实现这个接口的类@HandleTypes
    META-INF/services

  • 相关阅读:
    强化学习读书笔记
    强化学习读书笔记
    知天命
    强化学习读书笔记
    强化学习读书笔记
    强化学习读书笔记
    强化学习读书笔记
    强化学习读书笔记
    强化学习读书笔记
    强化学习读书笔记
  • 原文地址:https://www.cnblogs.com/anjuncc/p/5245520.html
Copyright © 2020-2023  润新知