复习day12-23

获取请求中的内容:

request.getParameter();

get方式因为在地址栏所以需要转码:

       String name = new String(req.getparameter().getbytes(“iso-8859-1”),”utf-8”);

请求有cookie

响应有session cookie

servletconfig  servlet配置对象,对一个servlet

servletcontext 对一个web项目

       getcontextpath        web应用路径

       通过request.getContextPath也可以获取

       getrealpath     web应用的资源文件

request

cookie

session

       getSession(true),没有session创建session

       getSession(false),没有session返回null

jsp

<%   %>

<%=  %>

<%!  %>

内置对象就是在jsp页面加载之后创建的对象,方便程序员调用,不用再次创建。

request response page pageContext config application exception out session

因为把其他八个对象都封装进pageContext对象中,故经常写出pageContext.request.contextPath.  这里面的contextPath就是在el表达式中把get去掉

ServletContext    同一个web程序

HttpServletRequest 同一个请求

HttpSession       同一个会话

pageContext         同一个页面 (当前页面)

pagetContext.setAttribute(“”,域范围常量);

EL表达式

${} 去掉get 驼峰

自定义标签 需要继承simpleTagSupport

数据库

not null

unique

zerofull primary key auto_increment

最后一个,之后再写constraint 本表_外表_pk foreign key(  ) references 外表(  );

right out join

JDBC

BeanUtils

DBUtils

       QueryRunner

DBCP

       BasicDataSource

C3P0

       ComPooledDataSource

Filter

Listener

       ServletSessionListener

       HttpServletRequestListener

       ServletContextListener

      

       ServletSessionAttributeListener

       HttpServletRequestAttributeListener

       ServletContextAttributeListener

HttpSessionBindingListener

FileUpload

原文地址:https://www.cnblogs.com/core404/p/5805186.html