Struts Exception Handling
Exception information: 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. environment: tomcat5.5.0 struts. xml Information <? Xml version = "1.0" encoding = "UTF-8"?> <Web-app version = "2.4" xmlns = "http://java.sun.com/xml/ns/j2ee" xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance" xsi: schemaLocation = "http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"> <filter-name> struts2 </filter-name> <filter-class> org. apache. struts2.dispatcher. filterDispatcher </filter-class> </filter> <filter-mapping> <filter-name> struts2 </filter-name> <Url-pattern> *. action </url-pattern> </filter-mapping> <welcome-file-list> <welcome-file> index. jsp </welcome-file> </welcome-file-list> </web-app> struts. xml Information: <! DOCTYPE struts PUBLIC "-// Apache Software Foundation // DTD Struts Configuration 2.0 // EN" "http://struts.apache.org/dtds/struts-2.0.dtd"> <struts> <include file = "struts-default.xml"/> <package name = "ygn. action "extends =" struts-default "> <action name =" HelloWorld "class =" ygn. action. helloWorld "> <result> HelloWorld. jsp </result> </action> </package> </struts> SayHello. jsp <% @ page language = "java" contentT Ype = "text/html; charset = UTF-8" pageEncoding = "UTF-8" %> <% @ taglib prefix = "s" uri = "/struts-tags" %> <! DOCTYPE html PUBLIC "-// W3C // dtd html 4.01 Transitional // EN" "http://www.w3.org/TR/html4/loose.dtd">