struts2項目中forward和redirect跳轉註意事項

struts2項目中如要在程序中轉發或跳轉,則需要在web.xml中配置如下配置項:

    <dispatcher>REQUEST</dispatcher> 

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

    <dispatcher>ERROR</dispatcher>

配置完後,在filter、servlet或者action總做跳轉轉發纔會生效。

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