Bonjour,

j'essaye d'afficher des .gif dans un jsp et à mon grand regret elles ne s'affichent pas, même si le cadre y est.

Voici la structure de dossiers de mes fichiers:

Ch03bis/
quizz1.jsp
quizz2.jsp
moyen.gif
fort.gif
faible.gif
quizzform1.html
quizzform2.html
/WEB-INF
errorPage.jsp
/classes
/Ch03bis

Et voici le code du .gif :

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
<%@ page errorPage="/WEB-INF/errorPage.jsp" 
    import="java.lang.Integer" %>
 
<%! 
    float taux;
    int tempo;
    Integer goodresponse = new Integer(0);
%>
 
<%
  session.setAttribute("Application", goodresponse);
  String reqType = request.getParameter("reqType");
  if(reqType == null) {
%>
    <jsp:forward page="quizzform1.html"/>
<%
  } 
  else {
  String firstresponse = request.getParameter("firstresponse");
    if(firstresponse == "Pékin") {
      goodresponse = new Integer(1);
      tempo = goodresponse.intValue();
      taux = tempo/1; 
    }
  }
%>
 
 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>Résultat de la première question</title>
  </head>
  <body>
    <h1>Bilan à la première question</h1>
      <table>
        <tr>
          <td align="top" width="15%">
          <% 
            if (taux <= 0.25) { 
          %>
          <img src="faible.gif" border=1 width=400 height=300/>
          <%
             }
          %>
          </td>
          <td align="top" width="15%">
	  <% 
            if ((taux > 0.25) && (taux < 0.75)) { 
          %>
	    <img src="moyen.gif" border=1 width=400 height=300/>
	  <%
            }
          %>
	  </td>
	  <td align="top" width="15%">
          <% 
             if (taux >= 0.75) { 
          %>
          <img src="fort.gif" border=1 width=400 height=300/>
          <%
             }
          %>
          </td>
        </tr>
      </table>
 
      <p>Aller à la <a href="quizz2.jsp">liste des sujets</a></p>
 
  </body>
</html>
Voilà, petit souci, mais il est vrai que j'ai essayé avec une autre image et cela ne marche pas non plus.

Merci d'avance!

mumu27