JavaWeb学习笔记1——第一个简单的JavaWeb项目(1)

/**

  • Constructor of the object.

*/

public HelloServlet() {

super();

}

/**

  • Destruction of the servlet.

*/

public void destroy() {

super.destroy(); // Just puts “destroy” string in log

// Put your code here

}

/**

  • The doGet method of the servlet.

  • This method is called when a form has its tag value method equals to get.

  • @param request the request send by the client to the server

  • @param response the response send by the server to the client

  • @throws ServletException if an error occurred

  • @throws IOException if an error occurred

*/

public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

response.setCharacterEncoding(“UTF-8”);

request.setCharacterEncoding(“UTF-8”);

response.setContentType(“text/html”);

PrintWriter out = response.getWriter();

out.println(“”);

out.println(“”);

out.println("<meta http-equiv=“content-type"content=“text/html;charset=UTF-8”>”);

out.println(“A Servlet”);

out.println(" ");

String requestURI=request.getRequestURI();

out.print(“”);

out.print(“请输入您的名字:”);

out.println(“”);

out.println(“”);

out.println(“”);

String name =request.getParameter(“name”);

if(name!=null&&name.trim().length()>0){

out.println(“您好,”+name+“.欢迎来到Java Web世界.”);

}

out.println(" ");

out.println(“”);

out.flush();

out.close();

}

/**

  • The doPost method of the servlet.

  • This method is called when a form has its tag value method equals to post.

  • @param request the request send by the client to the server

  • @param response the response send by the server to the client

  • @throws ServletException if an error occurred

  • @throws IOException if an error occurred

*/

public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

this.doGet(request, response);

}

/**

  • Initialization of the servlet.

  • @throws ServletException if an error occurs

*/
自我介绍一下,小编13年上海交大毕业,曾经在小公司待过,也去过华为、OPPO等大厂,18年进入阿里一直到现在。

深知大多数Java工程师,想要提升技能,往往是自己摸索成长或者是报班学习,但对于培训机构动则几千的学费,着实压力不小。自己不成体系的自学效果低效又漫长,而且极易碰到天花板技术停滞不前!

因此收集整理了一份《2024年Java开发全套学习资料》,初衷也很简单,就是希望能够帮助到想自学提升又不知道该从何学起的朋友,同时减轻大家的负担。img

既有适合小白学习的零基础资料,也有适合3年以上经验的小伙伴深入学习提升的进阶课程,基本涵盖了95%以上Java开发知识点,真正体系化!

由于文件比较大,这里只是将部分目录截图出来,每个节点里面都包含大厂面经、学习笔记、源码讲义、实战项目、讲解视频,并且会持续更新!

如果你觉得这些内容对你有帮助,可以扫码获取!!(备注Java获取)

img

最后

看完上述知识点如果你深感Java基础不够扎实,或者刷题刷的不够、知识不全面

小编专门为你量身定制了一套<Java一线大厂高岗面试题解析合集:JAVA基础-中级-高级面试+SSM框架+分布式+性能调优+微服务+并发编程+网络+设计模式+数据结构与算法>

image

针对知识面不够,也莫慌!还有一整套的<Java核心进阶手册>,可以瞬间查漏补缺

image

全都是一丢一丢的收集整理纯手打出来的

更有纯手绘的各大知识体系大纲,可供梳理:Java筑基、MySQL、Redis、并发编程、Spring、分布式高性能架构知识、微服务架构知识、开源框架知识点等等的xmind手绘图~

image

image
《互联网大厂面试真题解析、进阶开发核心学习笔记、全套讲解视频、实战项目源码讲义》点击传送门即可获取!
存中…(img-r0hB7gnT-1713401155490)]

[外链图片转存中…(img-Gn5pMEyh-1713401155490)]
《互联网大厂面试真题解析、进阶开发核心学习笔记、全套讲解视频、实战项目源码讲义》点击传送门即可获取!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值