Bonjour à tous,
je suis debutant à l'environnement web.
j'ai creé un projet web à l'aide des outils tomcat 5.5,jdk 1.5, eclipse 3.2.
le projet pur l'instant juste creer une page jsp index1.jsp sous le dossier webcontent et l'executer...(affiche d'un message ).
le code de 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 <web-app> <servlet> <servlet-name>action</servlet-name> <servlet-class>org.apache.struts.action.ActionServlet</servlet-class> <init-param> <param-name>config</param-name> <param-value>/WEB-INF/struts-config.xml</param-value> </init-param> </servlet> <servlet-mapping> <servlet-name>action</servlet-name> <url-pattern>*.do</url-pattern> </servlet-mapping> <jsp-config> <!-- Descripteur des bibliotheques personnalisees de Struts --> <taglib> <taglib-uri>/struts-bean</taglib-uri> <taglib-location>/WEB-INF/struts-bean.tld</taglib-location> </taglib> <taglib> <taglib-uri>/struts-html</taglib-uri> <taglib-location>/WEB-INF/struts-html.tld</taglib-location> </taglib> <taglib> <taglib-uri>/struts-logic</taglib-uri> <taglib-location>/WEB-INF/struts-logic.tld</taglib-location> </taglib> <taglib> <taglib-uri>/struts-nested</taglib-uri> <taglib-location>/WEB-INF/struts-nested.tld</taglib-location> </taglib> <taglib> <taglib-uri>/struts-tiles</taglib-uri> <taglib-location>/WEB-INF/struts-tiles.tld</taglib-location> </taglib> </jsp-config> </web-app>
le code de fichier stuts-config.xml est le suivant
lorsque je lance http://localhost:8080/testwelcome/index1.do
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 <?xml version="1.0" encoding="UTF-8"?> <struts-config> <action-mappings> <action path="/index1" parameter="index1.jsp" type="org.apache.struts.actions.ForwardAction" /> </action-mappings> </struts-config>
le message suivant est affichée
description:le serveur a rencontré une erreur interne qui l'a empeché de satisfaire la requette
exception:java.lang.illegalArgument Exception : le chemin index1.jsp ne commence pas par le caractère "/"
Partager