摘要:
阅读全文
posted @ 2021-11-19 19:48
ZikC
阅读(30)
评论(0)
推荐(0)
摘要:
正确:要保持在一行上<jsp:include page="image.html"></jsp:include>错误: <jsp:include page="image.html"></jsp:include> 阅读全文
posted @ 2021-11-19 16:26
ZikC
阅读(50)
评论(0)
推荐(0)
摘要:
当用 request 对象获取客户提交的汉字字符时,会出现乱码问题,所以对含有汉字字 符的信息必须进行特殊的处理方式。首先,将获取的字符串用 ISO-8859-1 进行编码,并 将编码存放到一个字节数组中,然后再将这个数组转化为字符串对象即可。如下列所示: String str=request.ge 阅读全文
posted @ 2021-11-19 14:08
ZikC
阅读(134)
评论(0)
推荐(0)
摘要:
一、Servlet的传统配置方式 web.xml中的servlet配置 发一个Servlet,都要在web.xml中配置Servlet才能够使用,就比较麻烦。所以Servlet3.0之后提供了注解(annotation) 二、使用注解方式配置Servlet @WebServlet注解用于标注在一个继 阅读全文
posted @ 2021-11-19 09:28
ZikC
阅读(238)
评论(0)
推荐(0)
摘要:
import com.example.demo1.HelloServlet;import javax.servlet.ServletException;import javax.servlet.annotation.WebServlet;import javax.servlet.http.HttpS 阅读全文
posted @ 2021-11-19 09:26
ZikC
阅读(144)
评论(0)
推荐(0)