Custom 404 error page not working with Struts 2

前端 未结 2 1174
旧巷少年郎
旧巷少年郎 2021-01-27 00:21

I am converting a JSP/Servlet dynamic web project to Struts 2 and the custom error pages (that previously worked with the JSP/Servlet version) have stopped working.

When

2条回答
  •  暖寄归人
    2021-01-27 01:16

    You are calling a JSP directly, and trying to use a Struts tag inside it:

    6: 
    

    Turn this to plain html and it will work.

    Otherwise, you need to call an action.

提交回复
热议问题