访问WEB的正确地址:
http://localhost/youcan1/unit.do?type=findAllUnit
type=findAllUnit 是action中的parameter,用的是DispatchAction,
要是访问者捣乱,随便改下请求,就会报错
怎样来实现:
如果请求不对,自动转到一个特定的页面。
谢谢!
http://localhost/youcan1/unit.do?type=findAllUnit
type=findAllUnit 是action中的parameter,用的是DispatchAction,
要是访问者捣乱,随便改下请求,就会报错
怎样来实现:
如果请求不对,自动转到一个特定的页面。
谢谢!
<error-page>
<error-code>404</error-code>
<location>/404.jsp</location>
</error-page>
<error-page>
<error-code>500</error-code>
<location>/500.jsp</location>
</error-page>
------------------------------------------------
在web.xml文件里配上,建404.jsp 和 500.jsp
有这样的错误就会跳转到对应的页面。
用 post 方式提交.
用 post 方式提交.
同意七楼!
<a href="unit.do?type=type=findAllUnit&id=${unit.id }">查</a>
2.如果ID错误的,你要在服务器端进行验证,比如ID是不符合条件的,提示操作错误之类的。