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

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.

Leave a Comment