struts2项目中forward和redirect跳转注意事项

struts2项目中如要在程序中转发或跳转,则需要在web.xml中配置如下配置项:

    <dispatcher>REQUEST</dispatcher> 

    <dispatcher>FORWARD</dispatcher> 
    <dispatcher>INCLUDE</dispatcher>

    <dispatcher>ERROR</dispatcher>

配置完后,在filter、servlet或者action总做跳转转发才会生效。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章