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

GWT et Vaadin Java Discussion :

Eclipse GWT base de données


Sujet :

GWT et Vaadin Java

  1. #1
    Membre chevronné

    Homme Profil pro
    développeur
    Inscrit en
    Octobre 2013
    Messages
    1 576
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Oise (Picardie)

    Informations professionnelles :
    Activité : développeur

    Informations forums :
    Inscription : Octobre 2013
    Messages : 1 576
    Points : 1 989
    Points
    1 989
    Par défaut Eclipse GWT base de données
    Bonjour à tous, pourriez vous m'aider?

    J'utilise eclispe luna, j'aimerai savoir comme utiliser wampserver dans une appli gwt par exemple, si je veux juste récupérer des données et les lire depuis la base de données? j'ai un dossier lib avec mon mysql-connector mais ensuite comment je paramètre cela? merci à vous pour votre aide.

  2. #2
    Expert éminent sénior
    Avatar de tchize_
    Homme Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Avril 2007
    Messages
    25 481
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 44
    Localisation : Belgique

    Informations professionnelles :
    Activité : Ingénieur développement logiciels
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Avril 2007
    Messages : 25 481
    Points : 48 806
    Points
    48 806
    Par défaut
    ton wamp va pas te servir à grand chose puique tu n'utilise ni apache ni php. Reste que le mysql que tu peux installer tout seul sans le wamp.

    Ensuite, tu créer un service RPC, que tu déploie sur un serveur genre glassfish, tomcat, jboss, ... C'est ce service RPC qui accèdera à la base de données, via ton connecteur jdbc et qui exposera ses données au client GWT compilé en javascript.

  3. #3
    Membre chevronné

    Homme Profil pro
    développeur
    Inscrit en
    Octobre 2013
    Messages
    1 576
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Oise (Picardie)

    Informations professionnelles :
    Activité : développeur

    Informations forums :
    Inscription : Octobre 2013
    Messages : 1 576
    Points : 1 989
    Points
    1 989
    Par défaut
    Merci de votre réponse, je souhaite utiliser wamp c'est surtout pour m’entraîner, ce que je fais j'ajoute dans class path le mysql connector je l'ai donc dans referenced librairie, je dois utiliser
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    Class.forName("com.mysql.jdbc.Driver");
    			String url = "jdbc:mysql://localhost/test";
    			java.sql.Connection cn = DriverManager.getConnection(url);
    			java.sql.Statement sc = cn.createStatement();
    			String sql = "INSERT INTO 'test' ('comment')' VALUES ('jdbc')";
    ? par contre je peux le mettre ou pour tester ?

  4. #4
    Expert éminent sénior
    Avatar de tchize_
    Homme Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Avril 2007
    Messages
    25 481
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 44
    Localisation : Belgique

    Informations professionnelles :
    Activité : Ingénieur développement logiciels
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Avril 2007
    Messages : 25 481
    Points : 48 806
    Points
    48 806
    Par défaut
    Citation Envoyé par kevin254kl Voir le message
    par contre je peux le mettre ou pour tester ?
    Si il doit être utilisé par ton application GWT, tu dois le mettre dans un serveur java auquel l'application GWT se connectera via les service GWT-RPC, cf le lien que je t'ai posté plus haut. Le client n'a pas accès aux bibiliothèque jdbc, tout ce qu'il peux faire c'est accéder à des services distant via RPC. Le compilateur gwt va générer automatiquement le code javascript client à partir du GWT.create() sur le service serveur. C'est le serveur qui fera l'accès base de donnée.

    Pour donner un exemple vraiment basique et non testé, et en supposant que dans ton gwt.xml tu as donné "machinTruc" comme nom à ton application:


    l'interface du service
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    package com.company.project.client;
    import com.google.gwt.user.client.rpc.RemoteService;
    import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;
     
    @RemoteServiceRelativePath("testService")
    public interface DemoService extends RemoteService{
       public void faireUnTuc();
    }
    l'interface async du service
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    package com.company.project.client;
     
    import com.google.gwt.user.client.rpc.AsyncCallback;
     
    public interface DemoServiceAsync { // dois porter le nom <service>Async et se trouve dans le même package que le service
     
       void faireUnTuc(AsyncCallback<Void> callback); // retourne toujours void, le callback a le même type que le retour du service
     
    }

    le code serveur
    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
    package com.company.project.server;
     
    import com.company.project.client.DemoService;
    import com.google.gwt.user.server.rpc.RemoteServiceServlet;
     
    public class DemoServiceImpl extends RemoteServiceServlet implements DemoService{
     
        @Override
        public void faireUnTuc() {
          try{
            Class.forName("com.mysql.jdbc.Driver");
            String url = "jdbc:mysql://localhost/test";
            java.sql.Connection cn = DriverManager.getConnection(url);
            java.sql.Statement sc = cn.createStatement();
    	sc.executeUpdate("INSERT INTO 'test' ('comment')' VALUES ('jdbc')");
          } // tes catch à rajouter ici
        }
    }
    a mettre eu sein du web.xml du serveur:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
      <servlet>
        <servlet-name>testServlet</servlet-name>
        <servlet-class>com.company.project.server.DemoServiceImpl</servlet-class>
      </servlet>
     
      <servlet-mapping>
        <servlet-name>testServlet</servlet-name>
        <url-pattern>/machinTruc/testService</url-pattern><!-- [application]/[nomDuService] -->
      </servlet-mapping>
    Enfin,

    l'utilisation coté client du service:


    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
     
     
    private DemoServiceAsync serviceAsync = GWT.create(DemoService.class);
    private void uneMethode() {
     
         // Set up the callback object.
        AsyncCallback<Void> callback = new AsyncCallback<StockPrice[]>() {
          public void onFailure(Throwable caught) {
            // code à exécuter quand le service échoue.
          }
     
          public void onSuccess(StockPrice[] result) {
            //code à exécuter quand l'appel à réussi
          }
        };
        serviceAsync.faireUnTuc(callback);
    }

  5. #5
    Membre chevronné

    Homme Profil pro
    développeur
    Inscrit en
    Octobre 2013
    Messages
    1 576
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Oise (Picardie)

    Informations professionnelles :
    Activité : développeur

    Informations forums :
    Inscription : Octobre 2013
    Messages : 1 576
    Points : 1 989
    Points
    1 989
    Par défaut
    Merci, par contre j'ai un autre problème pour tester cela je veux installer par exemple un serveur apache j'installe donc mon plugin dans eclipse j'ai bien les boutons démarrer apache, par contre quand je veux configurer le server dans window > preference > server il n'y a que :
    Nom : Capture.PNG
Affichages : 292
Taille : 16,9 Ko
    je ne peux pas l'utiliser avec gwt?

  6. #6
    Expert éminent sénior
    Avatar de tchize_
    Homme Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Avril 2007
    Messages
    25 481
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 44
    Localisation : Belgique

    Informations professionnelles :
    Activité : Ingénieur développement logiciels
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Avril 2007
    Messages : 25 481
    Points : 48 806
    Points
    48 806
    Par défaut
    dans "download additional server adapters", tu devrais trouver les différentes versions de tomcat. Installe celle qui correspond à ta version et ensuite configure la.

  7. #7
    Membre chevronné

    Homme Profil pro
    développeur
    Inscrit en
    Octobre 2013
    Messages
    1 576
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Oise (Picardie)

    Informations professionnelles :
    Activité : développeur

    Informations forums :
    Inscription : Octobre 2013
    Messages : 1 576
    Points : 1 989
    Points
    1 989
    Par défaut
    Merci, je sélectionne Geromino v3 server adapter quand je fais next j'ai
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    Cannot complete the install because one or more required items could not be found.
      Software being installed: Geronimo v3.0 Server Adapter 3.0.1 (org.apache.geronimo.v30.feature.feature.group 3.0.1)
      Missing requirement: Geronimo v3.0 Server Adapter 3.0.1 (org.apache.geronimo.v30.feature.feature.group 3.0.1) requires 'org.eclipse.jst.server_ui.feature.feature.group 3.2.0.v201005241530' but it could not be found
    j'aile même problème si j'essaye avec jboss.

  8. #8
    Expert éminent sénior
    Avatar de tchize_
    Homme Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Avril 2007
    Messages
    25 481
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 44
    Localisation : Belgique

    Informations professionnelles :
    Activité : Ingénieur développement logiciels
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Avril 2007
    Messages : 25 481
    Points : 48 806
    Points
    48 806
    Par défaut
    Quelle version d'eclipse tu utilise?

  9. #9
    Membre chevronné

    Homme Profil pro
    développeur
    Inscrit en
    Octobre 2013
    Messages
    1 576
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Oise (Picardie)

    Informations professionnelles :
    Activité : développeur

    Informations forums :
    Inscription : Octobre 2013
    Messages : 1 576
    Points : 1 989
    Points
    1 989
    Par défaut
    eclipse luna 4.2.2

  10. #10
    Expert éminent sénior
    Avatar de tchize_
    Homme Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Avril 2007
    Messages
    25 481
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 44
    Localisation : Belgique

    Informations professionnelles :
    Activité : Ingénieur développement logiciels
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Avril 2007
    Messages : 25 481
    Points : 48 806
    Points
    48 806
    Par défaut
    tu peux essayer avec un version plus récente (eclipse mars java-ee) ?

  11. #11
    Membre chevronné

    Homme Profil pro
    développeur
    Inscrit en
    Octobre 2013
    Messages
    1 576
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Oise (Picardie)

    Informations professionnelles :
    Activité : développeur

    Informations forums :
    Inscription : Octobre 2013
    Messages : 1 576
    Points : 1 989
    Points
    1 989
    Par défaut
    Le seul problème, c'est que cela est dans le cadre d'un cours et que je dois utiliser eclipse luna, sinon y a t-il un autre moyen pour moi d'utiliser une base de données avec cette version s'il vous plaît?

  12. #12
    Expert éminent sénior
    Avatar de tchize_
    Homme Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Avril 2007
    Messages
    25 481
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 44
    Localisation : Belgique

    Informations professionnelles :
    Activité : Ingénieur développement logiciels
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Avril 2007
    Messages : 25 481
    Points : 48 806
    Points
    48 806
    Par défaut
    ben tu n'es pas obligé d'utiliser un connecteur web, tu peux déployer à la main sur un serveur Java que tu fais tourner à coté. C'est juste plus pratique depuis eclipse.

  13. #13
    Membre chevronné

    Homme Profil pro
    développeur
    Inscrit en
    Octobre 2013
    Messages
    1 576
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Oise (Picardie)

    Informations professionnelles :
    Activité : développeur

    Informations forums :
    Inscription : Octobre 2013
    Messages : 1 576
    Points : 1 989
    Points
    1 989
    Par défaut
    Merci, j'ai finalement réussi en installant jtf connector, j'ai mon serveur apache j'ai également mis mon mysql connector dans la lib apache normalement c'est tous qu'il me faut le reste est configurer dans le web.xml et la conection dans le package serveur? merci pour votre aide

  14. #14
    Membre chevronné

    Homme Profil pro
    développeur
    Inscrit en
    Octobre 2013
    Messages
    1 576
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Oise (Picardie)

    Informations professionnelles :
    Activité : développeur

    Informations forums :
    Inscription : Octobre 2013
    Messages : 1 576
    Points : 1 989
    Points
    1 989
    Par défaut
    Donc ce que je fais pour tester un peux je fais run as avec mon server apache de mon projet j'ai mon wamp aussi qui est lancé en parallèle pour mysql j'ai bien entendu changer le port par contre j'ai des erreur quand j'essaye d'y accéder depuis le navigateur
    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
    mars 23, 2016 9:50:31 PM org.apache.catalina.startup.VersionLoggerListener log
    INFOS: Server version:        Apache Tomcat/7.0.68
    mars 23, 2016 9:50:31 PM org.apache.catalina.startup.VersionLoggerListener log
    INFOS: Server built:          Feb 8 2016 20:25:54 UTC
    mars 23, 2016 9:50:31 PM org.apache.catalina.startup.VersionLoggerListener log
    INFOS: Server number:         7.0.68.0
    mars 23, 2016 9:50:31 PM org.apache.catalina.startup.VersionLoggerListener log
    INFOS: OS Name:               Windows 8.1
    mars 23, 2016 9:50:31 PM org.apache.catalina.startup.VersionLoggerListener log
    INFOS: OS Version:            6.3
    mars 23, 2016 9:50:31 PM org.apache.catalina.startup.VersionLoggerListener log
    INFOS: Architecture:          amd64
    mars 23, 2016 9:50:31 PM org.apache.catalina.startup.VersionLoggerListener log
    INFOS: Java Home:             C:\Program Files\Java\jre7
    mars 23, 2016 9:50:31 PM org.apache.catalina.startup.VersionLoggerListener log
    INFOS: JVM Version:           1.7.0_80-b15
    mars 23, 2016 9:50:31 PM org.apache.catalina.startup.VersionLoggerListener log
    INFOS: JVM Vendor:            Oracle Corporation
    mars 23, 2016 9:50:31 PM org.apache.catalina.startup.VersionLoggerListener log
    INFOS: CATALINA_BASE:         C:\Users\user\workspaceluna\.metadata\.plugins\org.eclipse.wst.server.core\tmp0
    mars 23, 2016 9:50:31 PM org.apache.catalina.startup.VersionLoggerListener log
    INFOS: CATALINA_HOME:         C:\serveur\apache-7
    mars 23, 2016 9:50:31 PM org.apache.catalina.startup.VersionLoggerListener log
    INFOS: Command line argument: -Dcatalina.base=C:\Users\user\workspaceluna\.metadata\.plugins\org.eclipse.wst.server.core\tmp0
    mars 23, 2016 9:50:31 PM org.apache.catalina.startup.VersionLoggerListener log
    INFOS: Command line argument: -Dcatalina.home=C:\serveur\apache-7
    mars 23, 2016 9:50:31 PM org.apache.catalina.startup.VersionLoggerListener log
    INFOS: Command line argument: -Dwtp.deploy=C:\Users\user\workspaceluna\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps
    mars 23, 2016 9:50:31 PM org.apache.catalina.startup.VersionLoggerListener log
    INFOS: Command line argument: -Djava.endorsed.dirs=C:\serveur\apache-7\endorsed
    mars 23, 2016 9:50:31 PM org.apache.catalina.startup.VersionLoggerListener log
    INFOS: Command line argument: -Dfile.encoding=Cp1252
    mars 23, 2016 9:50:31 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
    INFOS: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jre7\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Program Files\Broadcom\Broadcom 802.11 Network Adapter;C:\PROGRAM FILES (X86)\INTEL\ICLS CLIENT\;C:\PROGRAM FILES\INTEL\ICLS CLIENT\;C:\PROGRAM FILES (X86)\NVIDIA CORPORATION\PHYSX\COMMON;C:\WINDOWS\SYSTEM32;C:\WINDOWS;C:\WINDOWS\SYSTEM32\WBEM;C:\WINDOWS\SYSTEM32\WINDOWSPOWERSHELL\V1.0\;C:\PROGRAM FILES (X86)\ACER\ABFILES\;C:\PROGRAM FILES\INTEL\INTEL(R) MANAGEMENT ENGINE COMPONENTS\DAL;C:\PROGRAM FILES (X86)\INTEL\INTEL(R) MANAGEMENT ENGINE COMPONENTS\DAL;C:\PROGRAM FILES\INTEL\INTEL(R) MANAGEMENT ENGINE COMPONENTS\IPT;C:\PROGRAM FILES (X86)\INTEL\INTEL(R) MANAGEMENT ENGINE COMPONENTS\IPT;C:\Program Files\WIDCOMM\Bluetooth Software\;C:\Program Files\WIDCOMM\Bluetooth Software\syswow64;C:\Windows\system32\config\systemprofile\.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Java\jdk1.7.0_80;C:\Program Files (x86)\Skype\Phone\;C:\GNUstep\bin;C:\GNUstep\GNUstep\System\Tools;C:\Qt\5.5\mingw492_32\bin;C:\Qt\Tools\mingw492_32\bin;.
    mars 23, 2016 9:50:32 PM org.apache.coyote.AbstractProtocol init
    INFOS: Initializing ProtocolHandler ["http-bio-8090"]
    mars 23, 2016 9:50:32 PM org.apache.coyote.AbstractProtocol init
    INFOS: Initializing ProtocolHandler ["ajp-bio-8092"]
    mars 23, 2016 9:50:32 PM org.apache.catalina.startup.Catalina load
    INFOS: Initialization processed in 1469 ms
    mars 23, 2016 9:50:32 PM org.apache.catalina.core.StandardService startInternal
    INFOS: Démarrage du service Catalina
    mars 23, 2016 9:50:32 PM org.apache.catalina.core.StandardEngine startInternal
    INFOS: Starting Servlet Engine: Apache Tomcat/7.0.68
    mars 23, 2016 9:50:32 PM org.apache.catalina.startup.TldConfig execute
    INFOS: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
    mars 23, 2016 9:50:33 PM org.apache.catalina.util.SessionIdGeneratorBase createSecureRandom
    INFOS: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [141] milliseconds.
    mars 23, 2016 9:50:33 PM org.apache.coyote.AbstractProtocol start
    INFOS: Starting ProtocolHandler ["http-bio-8090"]
    mars 23, 2016 9:50:33 PM org.apache.coyote.AbstractProtocol start
    INFOS: Starting ProtocolHandler ["ajp-bio-8092"]
    mars 23, 2016 9:50:33 PM org.apache.catalina.startup.Catalina start
    INFOS: Server startup in 1159 ms
    mars 23, 2016 9:51:09 PM org.apache.coyote.ajp.AjpMessage processHeader
    GRAVE: Invalid message received with signature 18245
    mars 23, 2016 9:51:09 PM org.apache.coyote.ajp.AjpMessage processHeader
    GRAVE: Invalid message received with signature 18245
    mars 23, 2016 9:51:09 PM org.apache.coyote.ajp.AjpMessage processHeader
    GRAVE: Invalid message received with signature 18245
    mars 23, 2016 9:51:10 PM org.apache.coyote.ajp.AjpMessage processHeader
    GRAVE: Invalid message received with signature 18245
    mars 23, 2016 9:51:15 PM org.apache.coyote.ajp.AjpMessage processHeader
    GRAVE: Invalid message received with signature 18245
    mars 23, 2016 9:51:26 PM org.apache.coyote.ajp.AjpMessage processHeader
    GRAVE: Invalid message received with signature 18245
    mars 23, 2016 9:51:26 PM org.apache.coyote.ajp.AjpMessage processHeader
    GRAVE: Invalid message received with signature 18245
    mars 23, 2016 9:51:26 PM org.apache.coyote.ajp.AjpMessage processHeader
    GRAVE: Invalid message received with signature 18245
    mars 23, 2016 9:51:29 PM org.apache.coyote.ajp.AjpMessage processHeader
    GRAVE: Invalid message received with signature 18245
    auriez-vous une diée s'il vous plaît?

  15. #15
    Expert éminent sénior
    Avatar de tchize_
    Homme Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Avril 2007
    Messages
    25 481
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 44
    Localisation : Belgique

    Informations professionnelles :
    Activité : Ingénieur développement logiciels
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Avril 2007
    Messages : 25 481
    Points : 48 806
    Points
    48 806
    Par défaut
    visiblement il y a un truc pas net qui ne parle pas ajp qui essaie de parler avec ton connecteur ajp. Normalement tu n'a pas besoin d'ajp, qu'est-ce qui s'y connecte?

  16. #16
    Membre chevronné

    Homme Profil pro
    développeur
    Inscrit en
    Octobre 2013
    Messages
    1 576
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Oise (Picardie)

    Informations professionnelles :
    Activité : développeur

    Informations forums :
    Inscription : Octobre 2013
    Messages : 1 576
    Points : 1 989
    Points
    1 989
    Par défaut
    Merci, je lance mon projet sur tomcat et ensuite mon wamp
    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
    mars 24, 2016 8:40:10 PM org.apache.catalina.startup.VersionLoggerListener log
    INFOS: Server version:        Apache Tomcat/7.0.68
    mars 24, 2016 8:40:10 PM org.apache.catalina.startup.VersionLoggerListener log
    INFOS: Server built:          Feb 8 2016 20:25:54 UTC
    mars 24, 2016 8:40:10 PM org.apache.catalina.startup.VersionLoggerListener log
    INFOS: Server number:         7.0.68.0
    mars 24, 2016 8:40:10 PM org.apache.catalina.startup.VersionLoggerListener log
    INFOS: OS Name:               Windows 8.1
    mars 24, 2016 8:40:10 PM org.apache.catalina.startup.VersionLoggerListener log
    INFOS: OS Version:            6.3
    mars 24, 2016 8:40:10 PM org.apache.catalina.startup.VersionLoggerListener log
    INFOS: Architecture:          amd64
    mars 24, 2016 8:40:10 PM org.apache.catalina.startup.VersionLoggerListener log
    INFOS: Java Home:             C:\Program Files\Java\jre7
    mars 24, 2016 8:40:10 PM org.apache.catalina.startup.VersionLoggerListener log
    INFOS: JVM Version:           1.7.0_80-b15
    mars 24, 2016 8:40:10 PM org.apache.catalina.startup.VersionLoggerListener log
    INFOS: JVM Vendor:            Oracle Corporation
    mars 24, 2016 8:40:10 PM org.apache.catalina.startup.VersionLoggerListener log
    INFOS: CATALINA_BASE:         C:\Users\user\workspaceluna\.metadata\.plugins\org.eclipse.wst.server.core\tmp0
    mars 24, 2016 8:40:10 PM org.apache.catalina.startup.VersionLoggerListener log
    INFOS: CATALINA_HOME:         C:\serveur\apache-7
    mars 24, 2016 8:40:10 PM org.apache.catalina.startup.VersionLoggerListener log
    INFOS: Command line argument: -Dcatalina.base=C:\Users\user\workspaceluna\.metadata\.plugins\org.eclipse.wst.server.core\tmp0
    mars 24, 2016 8:40:10 PM org.apache.catalina.startup.VersionLoggerListener log
    INFOS: Command line argument: -Dcatalina.home=C:\serveur\apache-7
    mars 24, 2016 8:40:10 PM org.apache.catalina.startup.VersionLoggerListener log
    INFOS: Command line argument: -Dwtp.deploy=C:\Users\user\workspaceluna\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps
    mars 24, 2016 8:40:10 PM org.apache.catalina.startup.VersionLoggerListener log
    INFOS: Command line argument: -Djava.endorsed.dirs=C:\serveur\apache-7\endorsed
    mars 24, 2016 8:40:10 PM org.apache.catalina.startup.VersionLoggerListener log
    INFOS: Command line argument: -Dfile.encoding=Cp1252
    mars 24, 2016 8:40:10 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
    INFOS: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jre7\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Program Files\Broadcom\Broadcom 802.11 Network Adapter;C:\PROGRAM FILES (X86)\INTEL\ICLS CLIENT\;C:\PROGRAM FILES\INTEL\ICLS CLIENT\;C:\PROGRAM FILES (X86)\NVIDIA CORPORATION\PHYSX\COMMON;C:\WINDOWS\SYSTEM32;C:\WINDOWS;C:\WINDOWS\SYSTEM32\WBEM;C:\WINDOWS\SYSTEM32\WINDOWSPOWERSHELL\V1.0\;C:\PROGRAM FILES (X86)\ACER\ABFILES\;C:\PROGRAM FILES\INTEL\INTEL(R) MANAGEMENT ENGINE COMPONENTS\DAL;C:\PROGRAM FILES (X86)\INTEL\INTEL(R) MANAGEMENT ENGINE COMPONENTS\DAL;C:\PROGRAM FILES\INTEL\INTEL(R) MANAGEMENT ENGINE COMPONENTS\IPT;C:\PROGRAM FILES (X86)\INTEL\INTEL(R) MANAGEMENT ENGINE COMPONENTS\IPT;C:\Program Files\WIDCOMM\Bluetooth Software\;C:\Program Files\WIDCOMM\Bluetooth Software\syswow64;C:\Windows\system32\config\systemprofile\.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Java\jdk1.7.0_80;C:\Program Files (x86)\Skype\Phone\;C:\GNUstep\bin;C:\GNUstep\GNUstep\System\Tools;C:\Qt\5.5\mingw492_32\bin;C:\Qt\Tools\mingw492_32\bin;.
    mars 24, 2016 8:40:10 PM org.apache.coyote.AbstractProtocol init
    INFOS: Initializing ProtocolHandler ["http-bio-8080"]
    mars 24, 2016 8:40:10 PM org.apache.coyote.AbstractProtocol init
    INFOS: Initializing ProtocolHandler ["ajp-bio-8092"]
    mars 24, 2016 8:40:10 PM org.apache.catalina.startup.Catalina load
    INFOS: Initialization processed in 2162 ms
    mars 24, 2016 8:40:11 PM org.apache.catalina.core.StandardService startInternal
    INFOS: Démarrage du service Catalina
    mars 24, 2016 8:40:11 PM org.apache.catalina.core.StandardEngine startInternal
    INFOS: Starting Servlet Engine: Apache Tomcat/7.0.68
    mars 24, 2016 8:40:12 PM org.apache.catalina.startup.TldConfig execute
    INFOS: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
    mars 24, 2016 8:40:12 PM org.apache.catalina.util.SessionIdGeneratorBase createSecureRandom
    INFOS: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [125] milliseconds.
    mars 24, 2016 8:40:12 PM org.apache.coyote.AbstractProtocol start
    INFOS: Starting ProtocolHandler ["http-bio-8080"]
    mars 24, 2016 8:40:12 PM org.apache.coyote.AbstractProtocol start
    INFOS: Starting ProtocolHandler ["ajp-bio-8092"]
    mars 24, 2016 8:40:12 PM org.apache.catalina.startup.Catalina start
    INFOS: Server startup in 1852 ms
    par contre il- a certaine chose que je comprend pas quand j'essaye d'accéder à mon navigateur pour voir si le serveur fonctionne

    Nom : Capture.PNG
Affichages : 239
Taille : 20,5 Ko

    également je fais run as sur mon projet donc normalement il devrait me charger les servlets.

    Merci de votre aide bonne soirée

  17. #17
    Expert éminent sénior
    Avatar de tchize_
    Homme Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Avril 2007
    Messages
    25 481
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 44
    Localisation : Belgique

    Informations professionnelles :
    Activité : Ingénieur développement logiciels
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Avril 2007
    Messages : 25 481
    Points : 48 806
    Points
    48 806
    Par défaut
    une fois que tu fais un run as du projet sur ton conteneur javaee, les servlet sont accessibles à l'url http://localhost:8080/nomDeLApplicat.../de/la/servlet. Il n'y a rien par défaut à http://localhost:8080/ et il n'y aura rien à http://localhost:8080/nomDeLApplication/ à moins que tu aie configuré un welcome file dans ton web.xml

  18. #18
    Membre chevronné

    Homme Profil pro
    développeur
    Inscrit en
    Octobre 2013
    Messages
    1 576
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Oise (Picardie)

    Informations professionnelles :
    Activité : développeur

    Informations forums :
    Inscription : Octobre 2013
    Messages : 1 576
    Points : 1 989
    Points
    1 989
    Par défaut
    Oui mais normalement je dois avoir la page d'accueil de tomcat non?

  19. #19
    Expert éminent sénior
    Avatar de tchize_
    Homme Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Avril 2007
    Messages
    25 481
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 44
    Localisation : Belgique

    Informations professionnelles :
    Activité : Ingénieur développement logiciels
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Avril 2007
    Messages : 25 481
    Points : 48 806
    Points
    48 806
    Par défaut
    non, tomcat n'a pas de page par défaut.

  20. #20
    Membre chevronné

    Homme Profil pro
    développeur
    Inscrit en
    Octobre 2013
    Messages
    1 576
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Oise (Picardie)

    Informations professionnelles :
    Activité : développeur

    Informations forums :
    Inscription : Octobre 2013
    Messages : 1 576
    Points : 1 989
    Points
    1 989
    Par défaut
    Bonjour, je n'arrive pas à utiliser mon projet comment puis je procéder s'il vous plaît ?

    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
    mars 26, 2016 11:09:22 PM org.apache.catalina.startup.VersionLoggerListener log
    INFOS: Server version:        Apache Tomcat/7.0.68
    mars 26, 2016 11:09:22 PM org.apache.catalina.startup.VersionLoggerListener log
    INFOS: Server built:          Feb 8 2016 20:25:54 UTC
    mars 26, 2016 11:09:22 PM org.apache.catalina.startup.VersionLoggerListener log
    INFOS: Server number:         7.0.68.0
    mars 26, 2016 11:09:22 PM org.apache.catalina.startup.VersionLoggerListener log
    INFOS: OS Name:               Windows 8.1
    mars 26, 2016 11:09:22 PM org.apache.catalina.startup.VersionLoggerListener log
    INFOS: OS Version:            6.3
    mars 26, 2016 11:09:22 PM org.apache.catalina.startup.VersionLoggerListener log
    INFOS: Architecture:          amd64
    mars 26, 2016 11:09:22 PM org.apache.catalina.startup.VersionLoggerListener log
    INFOS: Java Home:             C:\Program Files\Java\jre7
    mars 26, 2016 11:09:22 PM org.apache.catalina.startup.VersionLoggerListener log
    INFOS: JVM Version:           1.7.0_80-b15
    mars 26, 2016 11:09:22 PM org.apache.catalina.startup.VersionLoggerListener log
    INFOS: JVM Vendor:            Oracle Corporation
    mars 26, 2016 11:09:22 PM org.apache.catalina.startup.VersionLoggerListener log
    INFOS: CATALINA_BASE:         C:\serveur\apache-7
    mars 26, 2016 11:09:22 PM org.apache.catalina.startup.VersionLoggerListener log
    INFOS: CATALINA_HOME:         C:\serveur\apache-7
    mars 26, 2016 11:09:22 PM org.apache.catalina.startup.VersionLoggerListener log
    INFOS: Command line argument: -Dcatalina.base=C:\serveur\apache-7
    mars 26, 2016 11:09:22 PM org.apache.catalina.startup.VersionLoggerListener log
    INFOS: Command line argument: -Dcatalina.home=C:\serveur\apache-7
    mars 26, 2016 11:09:22 PM org.apache.catalina.startup.VersionLoggerListener log
    INFOS: Command line argument: -Dwtp.deploy=C:\serveur\apache-7\wtpwebapps
    mars 26, 2016 11:09:22 PM org.apache.catalina.startup.VersionLoggerListener log
    INFOS: Command line argument: -Djava.endorsed.dirs=C:\serveur\apache-7\endorsed
    mars 26, 2016 11:09:22 PM org.apache.catalina.startup.VersionLoggerListener log
    INFOS: Command line argument: -Dfile.encoding=Cp1252
    mars 26, 2016 11:09:22 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
    INFOS: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jre7\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Program Files\Broadcom\Broadcom 802.11 Network Adapter;C:\PROGRAM FILES (X86)\INTEL\ICLS CLIENT\;C:\PROGRAM FILES\INTEL\ICLS CLIENT\;C:\PROGRAM FILES (X86)\NVIDIA CORPORATION\PHYSX\COMMON;C:\WINDOWS\SYSTEM32;C:\WINDOWS;C:\WINDOWS\SYSTEM32\WBEM;C:\WINDOWS\SYSTEM32\WINDOWSPOWERSHELL\V1.0\;C:\PROGRAM FILES (X86)\ACER\ABFILES\;C:\PROGRAM FILES\INTEL\INTEL(R) MANAGEMENT ENGINE COMPONENTS\DAL;C:\PROGRAM FILES (X86)\INTEL\INTEL(R) MANAGEMENT ENGINE COMPONENTS\DAL;C:\PROGRAM FILES\INTEL\INTEL(R) MANAGEMENT ENGINE COMPONENTS\IPT;C:\PROGRAM FILES (X86)\INTEL\INTEL(R) MANAGEMENT ENGINE COMPONENTS\IPT;C:\Program Files\WIDCOMM\Bluetooth Software\;C:\Program Files\WIDCOMM\Bluetooth Software\syswow64;C:\Windows\system32\config\systemprofile\.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Java\jdk1.7.0_80;C:\Program Files (x86)\Skype\Phone\;C:\GNUstep\bin;C:\GNUstep\GNUstep\System\Tools;C:\Qt\5.5\mingw492_32\bin;C:\Qt\Tools\mingw492_32\bin;.
    mars 26, 2016 11:09:23 PM org.apache.coyote.AbstractProtocol init
    INFOS: Initializing ProtocolHandler ["http-bio-8080"]
    mars 26, 2016 11:09:23 PM org.apache.coyote.AbstractProtocol init
    INFOS: Initializing ProtocolHandler ["ajp-bio-8009"]
    mars 26, 2016 11:09:23 PM org.apache.catalina.startup.Catalina load
    INFOS: Initialization processed in 847 ms
    mars 26, 2016 11:09:23 PM org.apache.catalina.core.StandardService startInternal
    INFOS: Démarrage du service Catalina
    mars 26, 2016 11:09:23 PM org.apache.catalina.core.StandardEngine startInternal
    INFOS: Starting Servlet Engine: Apache Tomcat/7.0.68
    mars 26, 2016 11:09:23 PM org.apache.catalina.startup.HostConfig deployDirectory
    INFOS: Déploiement du répertoire C:\serveur\apache-7\webapps\docs de l'application web
    mars 26, 2016 11:09:23 PM org.apache.catalina.startup.TldConfig execute
    INFOS: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
    mars 26, 2016 11:09:24 PM org.apache.catalina.startup.HostConfig deployDirectory
    INFOS: Deployment of web application directory C:\serveur\apache-7\webapps\docs has finished in 843 ms
    mars 26, 2016 11:09:24 PM org.apache.catalina.startup.HostConfig deployDirectory
    INFOS: Déploiement du répertoire C:\serveur\apache-7\webapps\examples de l'application web
    mars 26, 2016 11:09:25 PM org.apache.catalina.startup.TldConfig execute
    INFOS: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
    mars 26, 2016 11:09:25 PM org.apache.catalina.core.ApplicationContext log
    INFOS: ContextListener: contextInitialized()
    mars 26, 2016 11:09:25 PM org.apache.catalina.core.ApplicationContext log
    INFOS: SessionListener: contextInitialized()
    mars 26, 2016 11:09:25 PM org.apache.catalina.core.ApplicationContext log
    INFOS: ContextListener: attributeAdded('org.apache.jasper.compiler.TldLocationsCache', 'org.apache.jasper.compiler.TldLocationsCache@163e1025')
    mars 26, 2016 11:09:25 PM org.apache.catalina.startup.HostConfig deployDirectory
    INFOS: Deployment of web application directory C:\serveur\apache-7\webapps\examples has finished in 1*435 ms
    mars 26, 2016 11:09:25 PM org.apache.catalina.startup.HostConfig deployDirectory
    INFOS: Déploiement du répertoire C:\serveur\apache-7\webapps\host-manager de l'application web
    mars 26, 2016 11:09:25 PM org.apache.catalina.startup.TldConfig execute
    INFOS: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
    mars 26, 2016 11:09:25 PM org.apache.catalina.startup.HostConfig deployDirectory
    INFOS: Deployment of web application directory C:\serveur\apache-7\webapps\host-manager has finished in 219 ms
    mars 26, 2016 11:09:25 PM org.apache.catalina.startup.HostConfig deployDirectory
    INFOS: Déploiement du répertoire C:\serveur\apache-7\webapps\manager de l'application web
    mars 26, 2016 11:09:26 PM org.apache.catalina.startup.TldConfig execute
    INFOS: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
    mars 26, 2016 11:09:26 PM org.apache.catalina.startup.HostConfig deployDirectory
    INFOS: Deployment of web application directory C:\serveur\apache-7\webapps\manager has finished in 484 ms
    mars 26, 2016 11:09:26 PM org.apache.catalina.startup.HostConfig deployDirectory
    INFOS: Déploiement du répertoire C:\serveur\apache-7\webapps\ROOT de l'application web
    mars 26, 2016 11:09:26 PM org.apache.catalina.startup.TldConfig execute
    INFOS: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
    mars 26, 2016 11:09:26 PM org.apache.catalina.startup.HostConfig deployDirectory
    INFOS: Deployment of web application directory C:\serveur\apache-7\webapps\ROOT has finished in 219 ms
    mars 26, 2016 11:09:26 PM org.apache.coyote.AbstractProtocol start
    INFOS: Starting ProtocolHandler ["http-bio-8080"]
    mars 26, 2016 11:09:26 PM org.apache.coyote.AbstractProtocol start
    INFOS: Starting ProtocolHandler ["ajp-bio-8009"]
    mars 26, 2016 11:09:26 PM org.apache.catalina.startup.Catalina start
    INFOS: Server startup in 3292 ms
    voici mon 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
    21
    22
    23
    24
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
                  http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
             version="2.5"
             xmlns="http://java.sun.com/xml/ns/javaee">
     
      <!-- Servlets -->
      <servlet>
        <servlet-name>greetServlet</servlet-name>
        <servlet-class>projet.server.GreetingServiceImpl</servlet-class>
      </servlet>
     
      <servlet-mapping>
        <servlet-name>greetServlet</servlet-name>
        <url-pattern>/projet.client/greet</url-pattern>
      </servlet-mapping>
     
      <!-- Default page to serve -->
      <welcome-file-list>
        <welcome-file>Projet.html</welcome-file>
      </welcome-file-list>
     
    </web-app>
    logiquement en tapant http://localhost:8080/projet.client/greet dans mon navigateur je devrais avoir quelque chose mais j'ai la ressource demandé n'ai pas disponible pourriez vous m'aider?

    Merci de votre aide

+ Répondre à la discussion
Cette discussion est résolue.
Page 1 sur 2 12 DernièreDernière

Discussions similaires

  1. Eclipse + gestion base de données
    Par fanette dans le forum Eclipse Java
    Réponses: 11
    Dernier message: 04/11/2018, 20h41
  2. Eclipse et base de données
    Par XMMMX dans le forum JDBC
    Réponses: 3
    Dernier message: 27/02/2012, 10h12
  3. GWT base de données Erreur
    Par OOlab dans le forum GWT et Vaadin
    Réponses: 6
    Dernier message: 04/12/2009, 16h43
  4. GWT - Base de données
    Par peaceful dans le forum GWT et Vaadin
    Réponses: 2
    Dernier message: 08/05/2009, 23h30
  5. [JDBC]Eclipse et base de données
    Par gigande dans le forum Eclipse Java
    Réponses: 1
    Dernier message: 15/04/2005, 15h04

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