java - Error Struts 2 struts-default.xml -
i'm trying configure project struts2 + jboss 4.2.1.i have done many tests , trials have read can not make work.
i want create simple page index.i've tried changing various libraries set class-path libraries in jboss nothing. same error:
severe: dispatcher initialization failed unable load configuration. - bean - jar: webcontent/web-inf/lib/struts2-core-2.1.8.1.jar! / struts-default.xml: 85:158 com.opensymphony.xwork2.config.configurationmanager.getconfiguration using libraries
common-lang3.jar commons-beanutils-1.7.0.jar commons-chain-1.2.jar commons-fileupload-1.2.1.jar commons-io-1.3.2.jar commons-logging-1.1.1.jar commons-validator.jar freemarker-2.3.19.jar javassist.jar ognl-2.6.11.jar servlet-api-6.0.29.jar struts2-core-2.1.8.1.jar xwork-2.1.3.jar xwork-core-2.2.1.jar in web.xml file added tag configuration of struts2 tried exact same project tomcat , works without problems. tried put lib in project in jboss nothing has changed !
<?xml version="1.0" encoding="utf-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemalocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="webapp_id" version="2.5"> <display-name>viaprova</display-name> <filter> <filter-name>struts2</filter-name> <filter-class>org.apache.struts2.dispatcher.ng.filter.strutsprepareandexecutefilter</filter-class> </filter> <filter-mapping> <filter-name>struts2</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <welcome-file-list> <welcome-file>index.html</welcome-file> <welcome-file>index.htm</welcome-file> <welcome-file>index.jsp</welcome-file> <welcome-file>default.html</welcome-file> <welcome-file>default.htm</welcome-file> <welcome-file>default.jsp</welcome-file> </welcome-file-list> </web-app> as regards struts.xml configuration. seems linear versions of jar changed several times suggested in net not enough
<?xml version="1.0" encoding="utf-8" ?> <!doctype struts public "-//apache software foundation//dtd struts configuration 2.0//en" "http://struts.apache.org/dtds/struts-2.0.dtd"> <struts> <constant name="struts.devmode" value="true" /> <package name="default" namespace="/" extends="struts-default"> <action name="addcustomeraction" class="it.niuma.via.action.customeraction" method="addcustomer" > <result name="success">pages/customer.jsp</result> </action> <action name="listcustomeraction" class="it.niuma.via.action.customeraction" method="listcustomer" > <result name="success">pages/customer.jsp</result> </action> </package> </struts> does know give me suggestion?
usually error message refer conflict between versions of struts' jars.
i recommend use maven, instead of downloading jars manually. many issues around jars missing, conflicts, etc, solved maven.
Comments
Post a Comment