- 博客(13)
- 收藏
- 关注
原创 SpringMvc多文件上传
步骤: 1.表单项type=“file” 2.表单的提交方式是post 3.表单的enctype属性是多部分表单形式,及enctype=“multipart/form-data” 4.导入fileupload和io坐标 <dependency> <groupId>commons-fileupload</groupId> <artifactId>commons-fileupload</artifactId
2021-07-11 18:26:56
105
原创 SpringMvc文件上传
单个文件上传 步骤: 1.表单项type=“file” 2.表单的提交方式是post 3.表单的enctype属性是多部分表单形式,及enctype=“multipart/form-data” 4.导入fileupload和io坐标 <dependency> <groupId>commons-fileupload</groupId> <artifactId>commons-fileupload</art
2021-07-11 18:19:02
112
原创 SpringMvc中自定义类型转换器
日期类型 自定义类型转换器的开发步骤: 1定义转换器类实现Converter接口 public class DateConverter implements Converter<String,Date>{ @Override public Date convert(String source) { SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); try { Date date = format
2021-07-11 17:43:29
104
原创 SpringMvc配置
1.导入坐标 <dependency> <groupId>org.springframework</groupId> <artifactId>spring-webmvc</artifactId> <version>5.0.5.RELEASE</version> </dependency> web.xml 中配置Spring
2021-07-10 18:29:06
106
原创 BaseServlet编写
1.创建BaseServlet 继承 HttpServlet public class BaseServlet extends HttpServlet { @Override protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { //完成方法分发 //1.获取请求路径 String uri = req.getRe
2021-07-05 10:06:10
108
原创 idea 引入别人的 web项目
idea 引入别人的 web项目 1.首先选择 File—> Open 2.导入完成后 点击项目名 按 f4 d 3.弹出 Project Settings 首先配置 project 4.配置Modules 选择 import Moudle 5.添加 facts 6.添加 Artifacts 7.配置tomcat ...
2021-06-25 22:17:06
736
原创 过滤器处理中文乱码问题
将字符集配置到过滤器的初始化参数中 在Web.xml文件中对过滤器进行配置,配置如下: <filter> <filter-name>characterEncodingFilter</filter-name><!--过滤器名称自定义--> <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>&l
2021-04-29 17:24:53
435
原创 EL表达式语言
1.EL * 表达式语言 * 功能:获得数据,获得不同作用域的内容 * 注意: * 获得获得get方法的数据,方法不能有参数 * 存在的意义:为了取代jsp页面的jsp脚本 * 格式:${} 2.EL内置对象 * 共11个内置对象 * pageContext与jsp中pageContext对应 * 域操作 pageScope,requestScope,sessionScope,applicationScope * 获得请求参数 * param:获得指定名称的一个内容 * paramValu
2021-04-29 16:57:38
83
原创 修改Tomcat默认端口号
* * 修改tomcat系统配置文件conf中server.xml * 修改的内容 * <Server port="9005" ,默认8005 * <Connector port="9090" ,默认8080 * <Connector port="9009" ,默认8009 * 将http协议在tomcat中的端口配置修改成80 默认是80 ,ip地址可以不用输入端口 ...
2021-04-29 16:53:16
173
原创 过滤器处理中文乱码问题
<filter> <filter-name>characterEncodingFilter</filter-name> <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class> //将字符集配置到过滤器的初始化参数中 <init-param>
2021-04-29 16:48:12
155
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人