页面显示错误信息:
HTTP Status 500 - Internal Server Error
type Exception report
messageInternal Server Error
descriptionThe server encountered an internal error that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: The Struts dispatcher cannot be found. This is usually caused by using Struts tags without the associated filter. Struts tags are only usable when the request has passed through its servlet filter, which initializes the Struts dispatcher needed for this tag. - [unknown location]
root cause
The Struts dispatcher cannot be found. This is usually caused by using Struts tags without the associated filter. Struts tags are only usable when the request has passed through its servlet filter, which initializes the Struts dispatcher needed for this tag. - [unknown location]
note The full stack traces of the exception and its root causes are available in the GlassFish Server Open Source Edition 4.1.1 logs.
服务器显示错误信息:
Caused by: Unable to load configuration. - action - file:/C:/Users/j/TestStruts/build/web/WEB-INF/classes/struts.xml:33:89
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:428)
at org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:190)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:275)
at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:131)
原因:org.apache.jasper.JasperException: The Struts dispatcher cannot be found
仔细查看配置文件struts.xml,一定是有什么已经配置的没有对应的Action,或者等等信息
解决方法:查错配置文件
当遇到HTTP Status 500 - Internal Server Error,问题根源是Struts dispatcher缺失。错误信息指出org.apache.jasper.JasperException,提示可能在struts.xml配置文件中存在未映射的Action或其他配置错误。解决此问题需要细致检查并修正配置文件。
1万+

被折叠的 条评论
为什么被折叠?



