“The Struts dispatcher cannot be found” error while deploying application on WebLogic 12.1.3

放肆的年华 提交于 2019-11-27 02:13:10

If you are using Struts tags inside JSP page that has listed in the welcome-file-list it should be removed.

welcome-file-list in web.xml:

The welcome-file-list element of web-app, is used to define a list of welcome files. Its sub element is welcome-file that is used to define the welcome file.

A welcome file is the file that is invoked automatically by the server, if you don't specify any file name.

And hence without associated filter. The associated filter is defined struts2 mapped to /*. It means it should serve all requests, unless the welcome file is served by the web server.

Normally, you should not directly access JSP pages without prior action execution, that returns a dispatcher' type result. In this result you can specify the location of the JSP file you want to get the access.

The welcome-file-list files are handled by the web container if you navigate to the folder of your web content hierarchy, such as if you aren't using the .action extension in the URL, and there's a welcome-file inside it, and there's no action mapped to that URL. In this case you cannot use struts tags inside the welcome-file because you are trying to run it without associated filter, or the struts2 filter is already handled another request.

You are using Struts tags inside a JSP, probably

/jsp/ao/ApplicationStartUp.jsp

but it has been called without passing through an Action.

Either pass through an Action, or remove Struts tags from JSP called directly.

For a welcome file, I'd go with the latter.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!