IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Struts 1 Java Discussion :

Unable to initialize Struts ActionServlet


Sujet :

Struts 1 Java

  1. #1
    Membre régulier
    Profil pro
    Inscrit en
    Décembre 2009
    Messages
    125
    Détails du profil
    Informations personnelles :
    Localisation : Tunisie

    Informations forums :
    Inscription : Décembre 2009
    Messages : 125
    Points : 90
    Points
    90
    Par défaut 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 : Sélectionner tout - Visualiser dans une fenêtre à part
    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 : Sélectionner tout - Visualiser dans une fenêtre à part
    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

  2. #2
    Rédacteur/Modérateur
    Avatar de andry.aime
    Homme Profil pro
    Inscrit en
    Septembre 2007
    Messages
    8 391
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Ile Maurice

    Informations forums :
    Inscription : Septembre 2007
    Messages : 8 391
    Points : 15 059
    Points
    15 059
    Par défaut
    Bonjour,
    Tu dois mettre les tag "<action>" dans struts-config dans une tag "<action-mappings>".

    A+.

  3. #3
    Membre régulier
    Profil pro
    Inscrit en
    Décembre 2009
    Messages
    125
    Détails du profil
    Informations personnelles :
    Localisation : Tunisie

    Informations forums :
    Inscription : Décembre 2009
    Messages : 125
    Points : 90
    Points
    90
    Par défaut
    Bonjour,
    merci pour votre réponse , en fait dans fichier struts-config.xml jai mis le tag <ation> dans un tag <action-mappings> mais juste j'ai fait une erreur de copier coller.

    Mon problème était un problème de jars, jai réglé les jars et ça a marché

  4. #4
    Futur Membre du Club
    Profil pro
    Inscrit en
    Avril 2010
    Messages
    8
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Avril 2010
    Messages : 8
    Points : 6
    Points
    6
    Par défaut
    Bonjour,

    je sais que le poste date un peu, mais ca me serait vraiment utiles de savoir le jar qui manquait.

    Merci

Discussions similaires

  1. [installation 5.3] pdo_mysql unable to initialize module
    Par Concombre Masqué dans le forum PHP & Base de données
    Réponses: 2
    Dernier message: 06/05/2010, 18h16
  2. [EasyPHP] unable to initialize module
    Par PsyKtra dans le forum EDI, CMS, Outils, Scripts et API
    Réponses: 12
    Dernier message: 15/03/2010, 09h58
  3. JOGL "Unable to initialize JAWT"
    Par Invité dans le forum OpenGL
    Réponses: 6
    Dernier message: 29/11/2009, 13h20
  4. [EJB Timer] Unable to initialize EJB
    Par BRAUKRIS dans le forum Java EE
    Réponses: 1
    Dernier message: 26/09/2007, 19h00
  5. PHP Startup: XMLRAD: Unable to initialize module
    Par Elmer1597 dans le forum XMLRAD
    Réponses: 1
    Dernier message: 26/02/2007, 09h21

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo