J utilise un framework qui implemente en particulier Struts et Spring.
Or, il se trouve que j ai cree un mapping Struts qui semble etre inconnu par l application quand j execute Tomcat dont voici le message :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
(/dptop/home.do) n est pas disponible.
J ai d'ailleurs essaye de creer d autres mappings mais aucun ne fonctionne.
Et j aimerais savoir quels pouvaient en etre les causes ?


Voici quelques extraits de mes fichiers,
web.xml
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
	<context-param>
		<param-name>contextConfigLocation</param-name>
		<param-value>
			/WEB-INF/classes/spring/applicationContext.xml
		</param-value>
	</context-param>
....
	<servlet>
		<servlet-name>actionServlet</servlet-name>
		<servlet-class>
			org.springframework.web.servlet.DispatcherServlet
		</servlet-class>
		<init-param>
			<param-name>contextConfigLocation</param-name>
			<param-value>
				/WEB-INF/classes/spring/action-servlet-base.xml
			</param-value>
		</init-param>
		<load-on-startup>3</load-on-startup>
	</servlet>
action-servlet-base.xml

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
	<bean id="urlMapping"
		class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
		<property name="mappings">
			<props>
				<prop key="/**/*.do">strutsWrappingController</prop>
 
			</props>
		</property>
	</bean>
	<bean id="strutsWrappingController"
		class="org.springframework.web.servlet.mvc.ServletWrappingController">
		<property name="servletClass">
			<value>org.apache.struts.action.ActionServlet</value>
		</property>
		<property name="servletName">
			<value>action</value>
		</property>
		<property name="initParameters">
			<props>
				<prop key="config">
					/WEB-INF/classes/struts/struts-config.xml
				</prop>									
			</props>
		</property>
	</bean>
struts-config.xml
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
	<action-mappings> 
		<!-- Generic Forward Action  -->
		<action path="/home" 
			type="org.apache.struts.actions.ForwardAction"
			parameter="pages.home"/>		
	</action-mappings>
et enfin action-servlet.xml :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
<beans>
	<bean id="home" class="net.gencat.dptop.struts.StartAction">
		<property name="logService" ref="loggingService"/>
	</bean>
</beans>