当前位置:网站首页>Some configuration details about servlet initial development
Some configuration details about servlet initial development
2022-06-30 02:30:00 【ahyo】
More comprehensive Detailed development servlet Explanations are included in each explanation video , Here are some of the details of my personal discovery ——
Servlet It can't run on its own , Need to be in a web Running in the application
And one web Applications are deployed in tomcat Medium
Its development environment choice IDEA Will be better Compared with eclipse It will be easier to operate
So develop a servlet The following steps are needed
establish web Application project That is to say web.xml file
To write servlet Code That is, create and write servlet Code class HelloServlet Inherited HttpServlet
And provides a doGet Method
Deploy to tomcat in ( This process needs to be understood alone tomcat Deployment is simple What we need to solve is the port problem and other exceptions ) An independent web The server Not dependent on others servlet The project needs it to run
The following is a personal screenshot :
The whole thing is IDEA Layout ——

response.getWriter().println(""); The content in the is to run the page display

<servlet-name>HelloServlet</servlet-name>
<servlet-class>initial.HelloServlet</servlet-class>
Specify the... Of a specific class And its class name
<servlet-mapping>
<servlet-name>HelloServlet</servlet-name>
<url-pattern></url-pattern><!-- Here is the designated jump to stay .java Class to display the contents of the page If you do not press this button, the jump will only show index.jsp Of $end$-->
</servlet-mapping>
url-pattern The function is to jump What is placed in this tab is the jump parameter After deployment, search in the browser write in "/ Parameter name " You can enter. Otherwise, as stated in the notes If there is nothing in this tag, this operation is not required
边栏推荐
- 归并排序
- Jupyter notebook displays a collection of K-line graphs
- 有流量,但没有销售?增加网站销量的 6 个步骤
- How does payment splitting help B2B bulk commodity transactions?
- The largest DDoS attack ever peaked at 400 Gbps
- What is a self signed certificate? Advantages and disadvantages of self signed SSL certificates?
- Blitzkrieg companies with DDoS attacks exceeding 100gbps in 2014
- 桶排序
- 【npm】解决使用npm安装TypeORM的报错问题
- Unity TimeLine 数据绑定
猜你喜欢
随机推荐
DDoS extortion attacks: what you need to know
What are the requirements for NPDP product manager international certification examination?
网上炒股安全么?炒股需要开户吗?
选购通配符SSL证书注意事项
最小栈详解
学术汇报(academic presentation)/PPT应该怎么做?
打造創客教育中精湛技藝
What should academic presentation /ppt do?
【npm】解决使用npm安装TypeORM的报错问题
Créer des compétences exquises dans l'éducation des créateurs
AutoJS代码能加密吗?YES,AutoJS加密技巧展示
Ffmpeg source code
Recommendations for agileplm database parameter optimization
Entering Jiangsu writers and poets carmine Jasmine World Book Day
隐藏在科技教育中的steam元素
【干货分享】最新WHQL徽标认证申请流程
DHU programming exercise
打造创客教育中精湛技艺
Alphassl digital certificate
Jupyter notebook显示k线图集合









