您的位置:首页 > 运维架构 > Tomcat

关于TOmcat的一些小小的知识

2008-03-13 10:47 246 查看
web.xml中的url-pattern和form 表单中的action是相同的。form 表单中的action声明的并不是servlet的名字
例:
<servlet>
<servlet-name>welcome</servlet-name>
<servlet-class>WelcomeYou</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>welcome</servlet-name>
<url-pattern>/two</url-pattern>
</servlet-mapping>

<form action="two" method="get">
请输入用户名:<input type="text" name="user">
<input type="submit" value="提交">
</form>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: