Servlet的创建及使用 -- hello world

一.首先打开eclipse,创建一个项目 二.在项目中创建关于servlet的包 三.配置xml 四.在包内创建类并继承Httpservlet类,重写service方法 response.setContentType(“text/html;charset=utf-8”);这个用于解决页面的中文乱码问题,然后用response.getWriter().print(“hello,world”);就OK
相关文章
相关标签/搜索