Unable to initialize Struts ActionServlet
Bonjour,
Je suis débutante en développement web, et depuis un certain temps je souffre de l'exception suivante:
Unable to initialize Struts ActionServlet due to an unexpected exception or error thrown, so marking the servlet as unavailable. Most likely, this is due to an incorrect or missing library dependency.
mon fichier web.xml est le suivant:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147
| <?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">
<!-- Action Servlet Configuration -->
<display-name>calculCommission</display-name>
<description>stage</description>
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>
org.apache.struts.action.ActionServlet
</servlet-class>
<init-param>
<param-name>application</param-name>
<param-value>test.struts.MessageResources</param-value>
</init-param>
<init-param>
<param-name>mapping</param-name>
<param-value>
org.apache.struts.action.RequestActionMapping
</param-value>
</init-param>
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>
<init-param>
<param-name>debug</param-name>
<param-value>2</param-value>
</init-param>
<init-param>
<param-name>validate</param-name>
<param-value>true</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>
<!-- Action Servlet Mapping -->
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
<filter>
<filter-name>Hibernate Session In View Filter</filter-name>
<filter-class>
org.springframework.orm.hibernate3.support.OpenSessionInViewFilter
</filter-class>
</filter>
<filter-mapping>
<filter-name>Hibernate Session In View Filter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<!-- configuration SPRING : listener + context config location -->
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/spring-data.xml</param-value>
</context-param>
<!-- The Welcome File List -->
<welcome-file-list>
<welcome-file>authentificationPage.jsp</welcome-file>
</welcome-file-list>
<!-- <taglib>
<taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/struts-layout.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-layout.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>jstl-c</taglib-uri>
<taglib-location>/WEB-INF/c.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>jstl-fmt</taglib-uri>
<taglib-location>/WEB-INF/fmt.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/sql.tld</taglib-uri>
<taglib-location>/WEB-INF/sql.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/x.tld</taglib-uri>
<taglib-location>/WEB-INF/x.tld</taglib-location>
</taglib> -->
<!-- Struts Tag Library Descriptors -->
<!-- <taglib>
<taglib-uri>/WEB-INF/struts-bean-el.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-bean-el.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/struts-html-el.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-html-el.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/struts-logic-el.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-logic-el.tld</taglib-location>
</taglib> -->
<!-- Declaration DataSource -->
<resource-ref>
<description>Ressource JDBC de l'application</description>
<res-ref-name>jdbc/dbds</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
</web-app> |
et mon fichier struts-config.xml est le suivant:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
| <?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE struts-config PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 1.1//EN"
"http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">
<struts-config>
<data-sources>
</data-sources>
<!-- ========== Form Bean Definitions =================================== -->
<form-beans>
<form-bean name="AuthentificationForm"
type="com.tunisiana.storcash.formes.AuthentificationForm">
<form-property name="username" type="java.lang.String" />
<form-property name="password" type="java.lang.String" />
</form-bean>
<action path="/login"
type="com.tunisiana.storcash.actions.AuthentificationAction"
name="AuthentificationForm" scope="request"
input="/authentificationPage.jsp" validate="true">
<forward name="failure" path="/authentificationPage.jsp" />
</action>
<resource-ref>
<description>Ressource JDBC de l'application</description>
<res-ref-name>jdbc/dbds</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref> |
mon but est d'afficher une page d'authentification , ma jsp s'appelle: authentificationPage.
merci d'avance pour votre aide :)