摘要: 域对象 ​ EL JSP ​ *applicationScope *application ​ *sessionScope *session ​ *requestScope *request ​ *pageScope *pageContext 使用 语法:${EL表达式} ​ 获取属性:对象名.属性 阅读全文
posted @ 2020-09-02 21:58 星峰之耀 阅读(104) 评论(0) 推荐(0) 编辑
摘要: EL 表达式的全称是:Expression Language。是表达式语言。 作用:EL 表达式主要是代替 jsp 页面中的表达式脚本(<%= %>)在 jsp 页面中进行数据的输出。 ​ *EL表达式仅仅用来读取数据,而不能对数据进行修改 主要是输出域对象中的数据。当四个域中都有相同的 key 的 阅读全文
posted @ 2020-09-02 21:34 星峰之耀 阅读(118) 评论(0) 推荐(0) 编辑
摘要: EL中获取项目根路径:${pageContext.request.contextPath} 1、request.getContextPath(); // 应用的web目录的名称 ,例如 : /Test 2、request.getRealPath(); // 获取项目的真实路径参数要以“/”开头 , 阅读全文
posted @ 2020-09-02 21:26 星峰之耀 阅读(265) 评论(0) 推荐(0) 编辑
摘要: ${ }: insert into emp values(null,admin,23,男)Statement:必须使用字符串拼接的方式操作sql,一定要注意单引号,例:'${}' #{}:insert into emp values(null,?,?,?)PreparedStatement:可以使用 阅读全文
posted @ 2020-09-02 15:30 星峰之耀 阅读(1481) 评论(0) 推荐(0) 编辑