膜结构行业做网站,网页制作工具是,杭州最大定制app开发公司,wordpress调用最新文章列表一、新建工程 二、填写新工程的基本信息 javaee8的项目可以运行在tomcat9 三、配置tomcat 1、编辑server信息 “On frame deactivation”的意思是idea窗口发生切换时。
2、编辑部署信息
war exploded方式#xff0c;这种方式是以文件夹方式部署的#xff0c;支持热加载。 … 一、新建工程 二、填写新工程的基本信息 javaee8的项目可以运行在tomcat9 三、配置tomcat 1、编辑server信息 “On frame deactivation”的意思是idea窗口发生切换时。
2、编辑部署信息
war exploded方式这种方式是以文件夹方式部署的支持热加载。
四、使用注解开发 WebServlet(name Servlet01, value /Servlet01)
public class Servlet01 extends HttpServlet {Overrideprotected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {response.setContentType(text/html;charsetUTF-8);PrintWriter out response.getWriter();out.write(html\n head\n titleinsert title here/title\n /head\n body\n 这是我的第一个html\n /body\n /html);}Overrideprotected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {}
}
五、debug模式启动Tomcat 这种模式能实现在不销毁代表应用的context对象的情况下重新加载类
六、在浏览器里测试servlet是否能处理请求
http://localhost/Servlet01
七、修改servlet01后切换到浏览器tomcat自动重新加载该类等待加完后刷新浏览器即可看修改后的结果