标签:
index .jsp
<body> <h1>第一个Servlet</h1> <hr> <a href = "servlet/Helloservlet">Get方式请求</a> <form action ="servlet/Helloservlet" method = "Post" > <input type = "submit" value="submit with post " /> </form> </body>
添加servlet,在servlet 3.0的新特性,可以不用web.xml或者注解.。
因为在Helloservlet下有注解:
@WebServlet(name ="Helloservlet" ,urlPatterns = "/servlet/Helloservlet")
标签:
原文地址:http://www.cnblogs.com/da-peng/p/5437943.html