“慢生活”不是懒惰,放慢速度不是拖延时间,而是让我们在生活中寻找到平衡。网站首页程序人生
19_ServletContext_功能_获取文件服务器路径(src,web,web-info三种目录下文件路径的布署后路径获取)
发布时间:2022-08-21 22:00:22作者:雪饮
![[!--pagekey--]](/e/data/images/notimg.gif)
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
//要输出为html,则需要先声明内容为html,否
18_ServletContext_功能_域对象(全局)
发布时间:2022-08-21 17:19:51作者:雪饮
![[!--pagekey--]](/e/data/images/notimg.gif)
在第一个servlet中编写一个设置servletContext的属性@WebServlet("/day15demo1")
public class day15demo1 extends HttpServlet {
protected void doPost(HttpServletR
17_ServletContext_功能_获取MIME类型
发布时间:2022-08-21 14:47:13作者:雪饮
![[!--pagekey--]](/e/data/images/notimg.gif)
这样就能简单的获取mime类型(买猫儿)了protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
Syste
16_ServletContext_获取
发布时间:2022-08-21 12:44:44作者:雪饮
![[!--pagekey--]](/e/data/images/notimg.gif)
两种不同方式获取的ServletContext对象实际上是相同的,但是需要稍微忌惮下这是同一个web哈。protected void doGet(HttpServletRequest request, HttpServletResponse respon
阅读全文>>13_Response_案例4_验证码_代码实现(随机验证码、干扰线、边框)
发布时间:2022-08-20 23:23:49作者:雪饮
![[!--pagekey--]](/e/data/images/notimg.gif)
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
int width=100;
int height=50;