Bonjour,

Je ne comprends pas pourquoi Tomcat met une erreur à l'exécution : j'ai bien mis <%@ page import="java.util.*, gestionSce.*"%> avec mon package où j'ai toutes les classes (gestionSce).

Erreur de Tomcat :
org.apache.jasper.JasperException: Impossible de compiler la classe pour la JSP

Erreur de servlet générée:
C:\Documents and Settings\Propriétaire\.netbeans\5.0\jakarta-tomcat-5.5.9_base\work\Catalina\localhost\Interface\org\apache\jsp\index_jsp.java:7: package gestionSce does not exist
import gestionSce.*;
^

Une erreur s'est produite à la ligne: 17 dans le fichier jsp: /index.jsp
Erreur de servlet générée:
C:\Documents and Settings\Propriétaire\.netbeans\5.0\jakarta-tomcat-5.5.9_base\work\Catalina\localhost\Interface\org\apache\jsp\index_jsp.java:56: cannot resolve symbol
symbol : class HostsNagios
location: class org.apache.jsp.index_jsp
HostsNagios hosts = new HostsNagios(locale);
^
.............
et pourtant toutes mes méthodes sont dans les classes, il n'y a pas d'erreur de recopie...

dans la console j'ai le même genre d'erreurs :
C:\Documents and Settings\Propriétaire\Bureau\GestionScenario\Interface\build\generated\src\org\apache\jsp\index_jsp.java:15: <identifier> expected
hosts.lectureFichier();
^
C:\Documents and Settings\Propriétaire\Bureau\GestionScenario\Interface\build\generated\src\org\apache\jsp\index_jsp.java:17: <identifier> expected
serv.lectureFichier();
^
C:\Documents and Settings\Propriétaire\Bureau\GestionScenario\Interface\build\generated\src\org\apache\jsp\index_jsp.java:19: <identifier> expected

res.construire(hosts, serv);

^

3 errors

C:\Documents and Settings\Propriétaire\Bureau\GestionScenario\Interface\nbproject\build-impl.xml:353: The following error occurred while executing this line:

C:\Documents and Settings\Propriétaire\Bureau\GestionScenario\Interface\nbproject\build-impl.xml:141: Compile failed; see the compiler error output for details.

BUILD FAILED (total time: 1 second)
Voilà ma page JSP incriminée :
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
 
   <%@ page import="java.util.*, gestionSce.*"%>
 
<%!
    Locale locale = new Locale("fr","FR");
    HostsNagios hosts = new HostsNagios(locale);
    hosts.lectureFichier();
    ServicesNagios serv = new ServicesNagios(locale);
    serv.lectureFichier();
    ArrayComplet res = new ArrayComplet();
    res.construire(hosts, serv);
%>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>SCE</title>
    </head>
    <body>
    <h1>Connection à l'hôte</h1>
    <hr />
    <form method="post" action="demandeConnection.jsp" >
         <table style="text-align:rigth">
            <tr><td>Hôtes sur le réseau :</td>
                <td><select name="host">
                        <option> .... </option>
                        <%  
                            Iterator parcours = hosts.arrayNomIp.iterator();
                            while (parcours.hasNext()) {
                                NomIp tempo = new NomIp("", "");
                                tempo = (NomIp) parcours.next();
 
                                out.println("<option>" + tempo.getNom() + "</option>");
                            }
                        %>
                </select></td></tr>
            <tr><td>Système d'exploitation :</td>
                <td><select name="se">
                        <option> .... </option>
                        <option> Windows XP </option>
                        <option> Linux </option>
                        <option> Solaris </option>
                        <option> Autre </option>
                </select></td></tr>
            <tr><td>Service de connection :</td>
                <td><select name="service">
                        <option> .... </option>
                        <option> Telnet </option>
                        <option> SSH </option>
                        <option> Rlogin </option>
                        <option> Autre </option>
                </select></td></tr>
            <tr><td>&nbsp;</td><td><input type = "submit" value="Envoi" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type = "reset" value="Effacer"/></td></tr>
         </table>
    </form>
    <hr />
    </body>
</html>
Si vous voyez où est la boulette, je suis preneuse.

A +
Arnapou