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

Tomcat et TomEE Java Discussion :

Tomcat - Servlet - Erreur "Etat HTTP 404" [Débutant(e)]


Sujet :

Tomcat et TomEE Java

  1. #1
    Membre à l'essai
    Profil pro
    Inscrit en
    Février 2005
    Messages
    18
    Détails du profil
    Informations personnelles :
    Âge : 48
    Localisation : France

    Informations forums :
    Inscription : Février 2005
    Messages : 18
    Points : 12
    Points
    12
    Par défaut Tomcat - Servlet - Erreur "Etat HTTP 404"
    Bonjour,

    J'essaie de découvrir Tomcat et les servlets et j'ai un pb de config :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    Etat HTTP 404 - /ServletTomcat/tata
    
    type Rapport d'état
    message /ServletTomcat/tata
    description La ressource demandée (/ServletTomcat/tata) n'est pas disponible.
    Apache Tomcat/5.5.17
    Mon serveur Tomcat semble pourtant bien démarrer :
    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
     
    2 mai 2006 16:06:57 org.apache.catalina.core.AprLifecycleListener lifecycleEvent
    INFO: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /home/admindg/Applis/Java/jre/lib/i386/client:/home/admindg/Applis/Java/jre/lib/i386:/home/admindg/Applis/Java/jre/../lib/i386:/home/admindg/workspace/NetJukeBox/JMF-2.1.1e/lib/:
    2 mai 2006 16:06:57 org.apache.coyote.http11.Http11BaseProtocol init
    INFO: Initialisation de Coyote HTTP/1.1 sur http-8080
    2 mai 2006 16:06:57 org.apache.catalina.startup.Catalina load
    INFO: Initialization processed in 1437 ms
    2 mai 2006 16:06:57 org.apache.catalina.core.StandardService start
    INFO: Démarrage du service Catalina
    2 mai 2006 16:06:58 org.apache.catalina.core.StandardEngine start
    INFO: Starting Servlet Engine: Apache Tomcat/5.5.17
    2 mai 2006 16:06:58 org.apache.catalina.core.StandardHost start
    INFO: XML validation disabled
    2 mai 2006 16:07:00 org.apache.catalina.core.ApplicationContext log
    INFO: org.apache.webapp.balancer.BalancerFilter: init(): ruleChain: [org.apache.webapp.balancer.RuleChain: [org.apache.webapp.balancer.rules.URLStringMatchRule: Target string: News / Redirect URL: http://www.cnn.com], [org.apache.webapp.balancer.rules.RequestParameterRule: Target param name: paramName / Target param value: paramValue / Redirect URL: http://www.yahoo.com], [org.apache.webapp.balancer.rules.AcceptEverythingRule: Redirect URL: http://jakarta.apache.org]]
    2 mai 2006 16:07:00 org.apache.catalina.core.ApplicationContext log
    INFO: ContextListener: contextInitialized()
    2 mai 2006 16:07:00 org.apache.catalina.core.ApplicationContext log
    INFO: SessionListener: contextInitialized()
    2 mai 2006 16:07:00 org.apache.catalina.core.ApplicationContext log
    INFO: ContextListener: contextInitialized()
    2 mai 2006 16:07:00 org.apache.catalina.core.ApplicationContext log
    INFO: SessionListener: contextInitialized()
    2 mai 2006 16:07:01 org.apache.coyote.http11.Http11BaseProtocol start
    INFO: Démarrage de Coyote HTTP/1.1 sur http-8080
    2 mai 2006 16:07:01 org.apache.jk.common.ChannelSocket init
    INFO: JK: ajp13 listening on /0.0.0.0:8009
    2 mai 2006 16:07:01 org.apache.jk.server.JkMain start
    INFO: Jk running ID=0 time=0/47  config=null
    2 mai 2006 16:07:01 org.apache.catalina.storeconfig.StoreLoader load
    INFO: Find registry server-registry.xml at classpath resource
    2 mai 2006 16:07:01 org.apache.catalina.startup.Catalina start
    INFO: Server startup in 4181 ms
    Dans le manager mon chemin /ServletTomcat est à "true"

    et j'utilise ce web.xml dans eclipse projet ServletTomcat/WEB-INF
    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
     
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
        version="2.4">
     
        <servlet>
            <servlet-name>Servlet</servlet-name>
            <servlet-class>Servlet</servlet-class>
        </servlet>
        <servlet-mapping>
            <servlet-name>Servlet</servlet-name>
            <url-pattern>/titi</url-pattern>
        </servlet-mapping>
     
        <servlet>
            <servlet-name>tata</servlet-name>
            <servlet-class>Test</servlet-class>
        </servlet>
        <servlet-mapping>
            <servlet-name>tata</servlet-name>
            <url-pattern>/tata/*</url-pattern>
        </servlet-mapping>
        
    </web-app>
    Le code de la servlet est un banal helloworld pour le moment ...

    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
     
    import java.io.IOException;
    import java.io.PrintWriter;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
     
    @SuppressWarnings("serial")
    public class Test extends HttpServlet {
     
        private static final long serialVersionUID = 1L;
     
        protected void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
            PrintWriter writer = res.getWriter();
            writer.println("Hello World !!!");
        }
    }
    Et pour le moment mes recherche google ne m'aide pas ... Si qqu'un a une idée, elle est bienvenue

    Merci d'avance
    Dom.

  2. #2
    Rédacteur/Modérateur
    Avatar de Laurent.B
    Homme Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Novembre 2004
    Messages
    3 468
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 51
    Localisation : France, Bouches du Rhône (Provence Alpes Côte d'Azur)

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

    Informations forums :
    Inscription : Novembre 2004
    Messages : 3 468
    Points : 17 036
    Points
    17 036
    Par défaut
    Est-ce que ta servlet se retrouve bien dans le WEB-INF/classes de ta webapp, une fois déployée?
    Responsable FAQ Eclipse | Maintiens et développe un des logiciels destinés aux rédacteurs sur developpez.com
    Gardons toujours à l'esprit que le forum constitue une base documentaire, dont l'utilité et la qualité dépendent du soin apporté à nos questions et nos réponses. Soyons polis, précis (dans le titre et dans le corps des questions), concis, constructifs et faisons de notre mieux pour respecter la langue française et sa grammaire. Merci pour nous (les modérateurs) mais aussi et surtout, merci pour vous.
    Problème solutionné => je vais au bas de la page et je clique sur le bouton (qui suite à mise à jour du forum, a légèrement changé d'aspect).

  3. #3
    Membre à l'essai
    Profil pro
    Inscrit en
    Février 2005
    Messages
    18
    Détails du profil
    Informations personnelles :
    Âge : 48
    Localisation : France

    Informations forums :
    Inscription : Février 2005
    Messages : 18
    Points : 12
    Points
    12
    Par défaut
    oui !!! j'ai bien un Test.class et un Servlet.class dans mon projet ServletTomcat/classes

  4. #4
    Membre à l'essai
    Profil pro
    Inscrit en
    Février 2005
    Messages
    18
    Détails du profil
    Informations personnelles :
    Âge : 48
    Localisation : France

    Informations forums :
    Inscription : Février 2005
    Messages : 18
    Points : 12
    Points
    12
    Par défaut
    j'éai décommenté dans le web.xml du $TOMCAT_HOME le code :

    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
     
     <servlet>
            <servlet-name>invoker</servlet-name>
            <servlet-class>
              org.apache.catalina.servlets.InvokerServlet
            </servlet-class>
            <init-param>
                <param-name>debug</param-name>
                <param-value>0</param-value>
            </init-param>
            <load-on-startup>2</load-on-startup>
        </servlet>
     
    <servlet-mapping>
            <servlet-name>invoker</servlet-name>
            <url-pattern>/servlet/*</url-pattern>
        </servlet-mapping>
    et essayé aussi de le copier coller dans le web.xml d'eclipse mais rien y fait ...

    Est ce indispensable ???

    Merci par avance.

  5. #5
    Rédacteur/Modérateur
    Avatar de Laurent.B
    Homme Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Novembre 2004
    Messages
    3 468
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 51
    Localisation : France, Bouches du Rhône (Provence Alpes Côte d'Azur)

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

    Informations forums :
    Inscription : Novembre 2004
    Messages : 3 468
    Points : 17 036
    Points
    17 036
    Par défaut
    Et si tu remplaces /ServletTomcat/tata par /titi dans l'url que tu tapes dans le navigateur, ça donne quoi?
    Responsable FAQ Eclipse | Maintiens et développe un des logiciels destinés aux rédacteurs sur developpez.com
    Gardons toujours à l'esprit que le forum constitue une base documentaire, dont l'utilité et la qualité dépendent du soin apporté à nos questions et nos réponses. Soyons polis, précis (dans le titre et dans le corps des questions), concis, constructifs et faisons de notre mieux pour respecter la langue française et sa grammaire. Merci pour nous (les modérateurs) mais aussi et surtout, merci pour vous.
    Problème solutionné => je vais au bas de la page et je clique sur le bouton (qui suite à mise à jour du forum, a légèrement changé d'aspect).

  6. #6
    Membre à l'essai
    Profil pro
    Inscrit en
    Février 2005
    Messages
    18
    Détails du profil
    Informations personnelles :
    Âge : 48
    Localisation : France

    Informations forums :
    Inscription : Février 2005
    Messages : 18
    Points : 12
    Points
    12
    Par défaut
    Pareil :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    Etat HTTP 404 - /ServletTomcat/titi
    
    type Rapport d'état
    message /ServletTomcat/titi
    description La ressource demandée (/ServletTomcat/titi) n'est pas disponible.
    Apache Tomcat/5.5.17

  7. #7
    Membre du Club
    Profil pro
    Inscrit en
    Avril 2005
    Messages
    65
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Avril 2005
    Messages : 65
    Points : 69
    Points
    69
    Par défaut
    Bonjour,

    Première étape à mon sens : regarder dans le manager de tomcat si le contexte de ton application existe bien.

    Si oui, il doit y avoir quelquepart une erreur de syntaxe ou de déclaration (je ne vois pas a priori)

    Si non, il faudrait peut-être déclarer l'application dans le fichier server.xml de tomcat, en ajoutant un noeud <context path="/titi" docBase="..." .../>.

  8. #8
    Rédacteur/Modérateur
    Avatar de Laurent.B
    Homme Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Novembre 2004
    Messages
    3 468
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 51
    Localisation : France, Bouches du Rhône (Provence Alpes Côte d'Azur)

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

    Informations forums :
    Inscription : Novembre 2004
    Messages : 3 468
    Points : 17 036
    Points
    17 036
    Par défaut
    et dans le manager de tomcat, ta webapp est bien démarrée?
    Responsable FAQ Eclipse | Maintiens et développe un des logiciels destinés aux rédacteurs sur developpez.com
    Gardons toujours à l'esprit que le forum constitue une base documentaire, dont l'utilité et la qualité dépendent du soin apporté à nos questions et nos réponses. Soyons polis, précis (dans le titre et dans le corps des questions), concis, constructifs et faisons de notre mieux pour respecter la langue française et sa grammaire. Merci pour nous (les modérateurs) mais aussi et surtout, merci pour vous.
    Problème solutionné => je vais au bas de la page et je clique sur le bouton (qui suite à mise à jour du forum, a légèrement changé d'aspect).

  9. #9
    Membre à l'essai
    Profil pro
    Inscrit en
    Février 2005
    Messages
    18
    Détails du profil
    Informations personnelles :
    Âge : 48
    Localisation : France

    Informations forums :
    Inscription : Février 2005
    Messages : 18
    Points : 12
    Points
    12
    Par défaut
    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
     
    Applications    Chemin  Nom d'affichage  Fonctionnant  Sessions  Commands    
    <a href="http://localhost:8080/" target="_blank">/</a>  Welcome to Tomcat  true  <a href="http://localhost:8080/manager/html/sessions?path=/" target="_blank">0</a>         Démarrer     <a href="http://localhost:8080/manager/html/stop?path=/" target="_blank">Arréter</a>     <a href="http://localhost:8080/manager/html/reload?path=/" target="_blank">Recharger</a>     <a href="http://localhost:8080/manager/html/undeploy?path=/" target="_blank">Undeploy</a>
     
    <a href="http://localhost:8080/ServletTomcat" target="_blank">/ServletTomcat</a>     true  <a href="http://localhost:8080/manager/html/sessions?path=/ServletTomcat" target="_blank">0</a>         Démarrer     <a href="http://localhost:8080/manager/html/stop?path=/ServletTomcat" target="_blank">Arréter</a>     <a href="http://localhost:8080/manager/html/reload?path=/ServletTomcat" target="_blank">Recharger</a>     <a href="http://localhost:8080/manager/html/undeploy?path=/ServletTomcat" target="_blank">Undeploy</a>          
     
    <a href="http://localhost:8080/admin" target="_blank">/admin</a>Tomcat Administration Application  true  <a href="http://localhost:8080/manager/html/sessions?path=/admin" target="_blank">0</a>         Démarrer     <a href="http://localhost:8080/manager/html/stop?path=/admin" target="_blank">Arréter</a>     <a href="http://localhost:8080/manager/html/reload?path=/admin" target="_blank">Recharger</a>     <a href="http://localhost:8080/manager/html/undeploy?path=/admin" target="_blank">Undeploy</a>          
     
    <a href="http://localhost:8080/balancer" target="_blank">/balancer</a>  Tomcat Simple Load Balancer Example App  true  <a href="http://localhost:8080/manager/html/sessions?path=/balancer" target="_blank">0</a>         Démarrer     <a href="http://localhost:8080/manager/html/stop?path=/balancer" target="_blank">Arréter</a>     <a href="http://localhost:8080/manager/html/reload?path=/balancer" target="_blank">Recharger</a>     <a href="http://localhost:8080/manager/html/undeploy?path=/balancer" target="_blank">Undeploy</a>          
     
    <a href="http://localhost:8080/host-manager" target="_blank">/host-manager</a>  Tomcat Manager Application  true  <a href="http://localhost:8080/manager/html/sessions?path=/host-manager" target="_blank">0</a>         Démarrer     <a href="http://localhost:8080/manager/html/stop?path=/host-manager" target="_blank">Arréter</a>     <a href="http://localhost:8080/manager/html/reload?path=/host-manager" target="_blank">Recharger</a>     <a href="http://localhost:8080/manager/html/undeploy?path=/host-manager" target="_blank">Undeploy</a>
     
    <a href="http://localhost:8080/jsp-examples" target="_blank">/jsp-examples</a>  JSP 2.0 Examples  true  <a href="http://localhost:8080/manager/html/sessions?path=/jsp-examples" target="_blank">0</a>         Démarrer     <a href="http://localhost:8080/manager/html/stop?path=/jsp-examples" target="_blank">Arréter</a>     <a href="http://localhost:8080/manager/html/reload?path=/jsp-examples" target="_blank">Recharger</a>     <a href="http://localhost:8080/manager/html/undeploy?path=/jsp-examples" target="_blank">Undeploy</a>          
     
    <a href="http://localhost:8080/manager" target="_blank">/manager</a>  Tomcat Manager Application  true  <a href="http://localhost:8080/manager/html/sessions?path=/manager" target="_blank">0</a>         Démarrer     Arréter     Recharger     Undeploy          
     
    <a href="http://localhost:8080/servlets-examples" target="_blank">/servlets-examples</a>  Servlet 2.4 Examples  true  <a href="http://localhost:8080/manager/html/sessions?path=/servlets-examples" target="_blank">0</a>         Démarrer     <a href="http://localhost:8080/manager/html/stop?path=/servlets-examples" target="_blank">Arréter</a>     <a href="http://localhost:8080/manager/html/reload?path=/servlets-examples" target="_blank">Recharger</a>     <a href="http://localhost:8080/manager/html/undeploy?path=/servlets-examples" target="_blank">Undeploy</a>          
     
    <a href="http://localhost:8080/tomcat-docs" target="_blank">/tomcat-docs</a>  Tomcat Documentation  true  <a href="http://localhost:8080/manager/html/sessions?path=/tomcat-docs" target="_blank">0</a>         Démarrer     <a href="http://localhost:8080/manager/html/stop?path=/tomcat-docs" target="_blank">Arréter</a>     <a href="http://localhost:8080/manager/html/reload?path=/tomcat-docs" target="_blank">Recharger</a>     <a href="http://localhost:8080/manager/html/undeploy?path=/tomcat-docs" target="_blank">Undeploy</a>          
     
    <a href="http://localhost:8080/webdav" target="_blank">/webdav</a>  Webdav Content Management  true  <a href="http://localhost:8080/manager/html/sessions?path=/webdav" target="_blank">0</a>         Démarrer     <a href="http://localhost:8080/manager/html/stop?path=/webdav" target="_blank">Arréter</a>     <a href="http://localhost:8080/manager/html/reload?path=/webdav" target="_blank">Recharger</a>     <a href="http://localhost:8080/manager/html/undeploy?path=/webdav" target="_blank">Undeploy</a>
    ==> oui

  10. #10
    Rédacteur/Modérateur
    Avatar de Laurent.B
    Homme Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Novembre 2004
    Messages
    3 468
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 51
    Localisation : France, Bouches du Rhône (Provence Alpes Côte d'Azur)

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

    Informations forums :
    Inscription : Novembre 2004
    Messages : 3 468
    Points : 17 036
    Points
    17 036
    Par défaut
    Bien, donc ce doit être tout bête...
    Les traces que tu nous montres n'indiquent pas tout. Tu en as d'autres dans le répertoire logs de Tomcat qui seront peut-être plus parlantes.
    Responsable FAQ Eclipse | Maintiens et développe un des logiciels destinés aux rédacteurs sur developpez.com
    Gardons toujours à l'esprit que le forum constitue une base documentaire, dont l'utilité et la qualité dépendent du soin apporté à nos questions et nos réponses. Soyons polis, précis (dans le titre et dans le corps des questions), concis, constructifs et faisons de notre mieux pour respecter la langue française et sa grammaire. Merci pour nous (les modérateurs) mais aussi et surtout, merci pour vous.
    Problème solutionné => je vais au bas de la page et je clique sur le bouton (qui suite à mise à jour du forum, a légèrement changé d'aspect).

  11. #11
    Membre à l'essai
    Profil pro
    Inscrit en
    Février 2005
    Messages
    18
    Détails du profil
    Informations personnelles :
    Âge : 48
    Localisation : France

    Informations forums :
    Inscription : Février 2005
    Messages : 18
    Points : 12
    Points
    12
    Par défaut
    Les logs :

    localhost.2006-05-03.log
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
     
    3 mai 2006 10:50:11 org.apache.catalina.core.ApplicationContext log
    INFO: org.apache.webapp.balancer.BalancerFilter: init(): ruleChain: [org.apache.webapp.balancer.RuleChain: [org.apache.webapp.balancer.rules.URLStringMatchRule: Target string: News / Redirect URL: http://www.cnn.com], [org.apache.webapp.balancer.rules.RequestParameterRule: Target param name: paramName / Target param value: paramValue / Redirect URL: http://www.yahoo.com], [org.apache.webapp.balancer.rules.AcceptEverythingRule: Redirect URL: http://jakarta.apache.org]]
    3 mai 2006 10:50:11 org.apache.catalina.core.ApplicationContext log
    INFO: ContextListener: contextInitialized()
    3 mai 2006 10:50:11 org.apache.catalina.core.ApplicationContext log
    INFO: SessionListener: contextInitialized()
    3 mai 2006 10:50:11 org.apache.catalina.core.ApplicationContext log
    INFO: ContextListener: contextInitialized()
    3 mai 2006 10:50:11 org.apache.catalina.core.ApplicationContext log
    INFO: SessionListener: contextInitialized()
    catalina.out
    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
     
    3 mai 2006 10:50:10 org.apache.catalina.core.AprLifecycleListener lifecycleEvent
    INFO: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /home/admindg/Applis/Java/jre/lib/i386/client:/home/admindg/Applis/Java/jre/lib/i386:/home/admindg/Applis/Java/jre/../lib/i386:/home/admindg/workspace/NetJukeBox/JMF-2.1.1e/lib/:/home/admindg/workspace/NetJukeBox/JMF-2.1.1e/lib/:
    3 mai 2006 10:50:10 org.apache.coyote.http11.Http11BaseProtocol init
    INFO: Initialisation de Coyote HTTP/1.1 sur http-8080
    3 mai 2006 10:50:10 org.apache.catalina.startup.Catalina load
    INFO: Initialization processed in 847 ms
    3 mai 2006 10:50:10 org.apache.catalina.core.StandardService start
    INFO: Démarrage du service Catalina
    3 mai 2006 10:50:10 org.apache.catalina.core.StandardEngine start
    INFO: Starting Servlet Engine: Apache Tomcat/5.5.17
    3 mai 2006 10:50:10 org.apache.catalina.core.StandardHost start
    INFO: XML validation disabled
    3 mai 2006 10:50:12 org.apache.coyote.http11.Http11BaseProtocol start
    INFO: Démarrage de Coyote HTTP/1.1 sur http-8080
    3 mai 2006 10:50:12 org.apache.jk.common.ChannelSocket init
    INFO: JK: ajp13 listening on /0.0.0.0:8009
    3 mai 2006 10:50:12 org.apache.jk.server.JkMain start
    INFO: Jk running ID=0 time=0/22  config=null
    3 mai 2006 10:50:12 org.apache.catalina.storeconfig.StoreLoader load
    INFO: Find registry server-registry.xml at classpath resource
    3 mai 2006 10:50:12 org.apache.catalina.startup.Catalina start
    INFO: Server startup in 1891 ms
    catalina.2006-05-03.log
    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
     
    3 mai 2006 10:50:10 org.apache.catalina.core.AprLifecycleListener lifecycleEvent
    INFO: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /home/admindg/Applis/Java/jre/lib/i386/client:/home/admindg/Applis/Java/jre/lib/i386:/home/admindg/Applis/Java/jre/../lib/i386:/home/admindg/workspace/NetJukeBox/JMF-2.1.1e/lib/:/home/admindg/workspace/NetJukeBox/JMF-2.1.1e/lib/:
    3 mai 2006 10:50:10 org.apache.coyote.http11.Http11BaseProtocol init
    INFO: Initialisation de Coyote HTTP/1.1 sur http-8080
    3 mai 2006 10:50:10 org.apache.catalina.startup.Catalina load
    INFO: Initialization processed in 847 ms
    3 mai 2006 10:50:10 org.apache.catalina.core.StandardService start
    INFO: Démarrage du service Catalina
    3 mai 2006 10:50:10 org.apache.catalina.core.StandardEngine start
    INFO: Starting Servlet Engine: Apache Tomcat/5.5.17
    3 mai 2006 10:50:10 org.apache.catalina.core.StandardHost start
    INFO: XML validation disabled
    3 mai 2006 10:50:12 org.apache.coyote.http11.Http11BaseProtocol start
    INFO: Démarrage de Coyote HTTP/1.1 sur http-8080
    3 mai 2006 10:50:12 org.apache.jk.common.ChannelSocket init
    INFO: JK: ajp13 listening on /0.0.0.0:8009
    3 mai 2006 10:50:12 org.apache.jk.server.JkMain start
    INFO: Jk running ID=0 time=0/22  config=null
    3 mai 2006 10:50:12 org.apache.catalina.storeconfig.StoreLoader load
    INFO: Find registry server-registry.xml at classpath resource
    3 mai 2006 10:50:12 org.apache.catalina.startup.Catalina start
    INFO: Server startup in 1891 ms
    j'ai ces logs si je démarre tomcat à la mano !!! car avec le plugin Sysdeo il n'y avait rien ...

    Pour info dans le server.xml je n'ai en effet pas le <context path="/ServletTomcat ...

    Faut il le rajouter ??? Logiquement le plugin Sysdeo doit faire la MàJ ...

  12. #12
    Membre régulier
    Inscrit en
    Janvier 2006
    Messages
    204
    Détails du profil
    Informations forums :
    Inscription : Janvier 2006
    Messages : 204
    Points : 102
    Points
    102
    Par défaut
    j ai eu le meme probleme

    pour resoudre ce pb, essaie de modifier ton web.xml

    dans
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
     
    <servlet-class>Test</servlet-class>
    met le chemin complet de ta classe Test

    aussi essaie de lancer directement ta servlet via ton navigateur

    hhtp:localhost........./test

  13. #13
    Membre du Club
    Profil pro
    Inscrit en
    Avril 2005
    Messages
    65
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Avril 2005
    Messages : 65
    Points : 69
    Points
    69
    Par défaut
    Logiquement le plugin Sysdeo doit faire la MàJ ...
    [/quote]

    Je ne suis pas sûr... c'est selon ta configuration...

    Par contre, question TRES bête mais c'est arrivé à tout le monde, tu te connectes bien sur le port 8080 ? Avec une adresse qui doit ressembler à
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    http://localhost:8080/ServletTomcat/titi

  14. #14
    Membre à l'essai
    Profil pro
    Inscrit en
    Février 2005
    Messages
    18
    Détails du profil
    Informations personnelles :
    Âge : 48
    Localisation : France

    Informations forums :
    Inscription : Février 2005
    Messages : 18
    Points : 12
    Points
    12
    Par défaut
    http://localhost:8080/servlets-examples/ ==> ça fonctionne

    http://localhost:8080/ServletTomcat/ ==> erreur 404

    http://localhost:8080/ServletTomcat/tata ==> erreur 404

    http://localhost:8080/tata ==> erreur 404

    Dans eclipse, j'ai recréé mon projet ServletTomcat et ça a mis à jour server.xml cette fois :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
     
    <Context path="/ServletTomcat" reloadable="true" docBase="/home/admindg/workspace/ServletTomcat" workDir="/home/admindg/workspace/ServletTomcat/work" />
    je remet le web.xml de travail :
    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
     
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
        version="2.4">
     
        <servlet>
            <servlet-name>Servlet</servlet-name>
            <servlet-class>Servlet</servlet-class>
        </servlet>
        <servlet-mapping>
            <servlet-name>Servlet</servlet-name>
            <url-pattern>/titi</url-pattern>
        </servlet-mapping>
     
        <servlet>
            <servlet-name>tata</servlet-name>
            <servlet-class>Test</servlet-class>
        </servlet>
        <servlet-mapping>
            <servlet-name>tata</servlet-name>
            <url-pattern>/ServletTomcat/tata</url-pattern>
        </servlet-mapping>
     
    </web-app>
    qui ce trouve sous :
    /home/admindg/workspace/ServletTomcat/WEB-INF/

  15. #15
    Membre du Club
    Profil pro
    Inscrit en
    Avril 2005
    Messages
    65
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Avril 2005
    Messages : 65
    Points : 69
    Points
    69
    Par défaut
    D'après le web.xml :

    1. la servlet tata est accesible à l'adresse http://localhost:8080/ServletTomcat/ServletTomcat/tata
    2. il peut y avoir une confusion sur la classe "Servlet" de la servlet nommée "Servlet". Cette servlet est accessible à l'adresse http://localhost:8080/ServletTomcat/titi

    solution de test : ne déclare qu'une seule servlet et attribue lui le mapping "/*", regarde ce qui se passe

  16. #16
    Membre à l'essai
    Profil pro
    Inscrit en
    Février 2005
    Messages
    18
    Détails du profil
    Informations personnelles :
    Âge : 48
    Localisation : France

    Informations forums :
    Inscription : Février 2005
    Messages : 18
    Points : 12
    Points
    12
    Par défaut
    yes ça marche enfin ...

    j'sais pas trop comment mais à mon avis il y avait un pb de config dans le web.xml ou le server.xml ...

    En regénérant mes contexte ça a fonctionné

    Merci beaucoup pour votre aide et les infos

  17. #17
    Membre régulier
    Inscrit en
    Janvier 2006
    Messages
    204
    Détails du profil
    Informations forums :
    Inscription : Janvier 2006
    Messages : 204
    Points : 102
    Points
    102
    Par défaut
    t as pas du liere ce que j ai ecrit

    dans
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
     
     
    <servlet-class>Test</servlet-class>
    Met le chemin complet de la classe Test

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. TOMCAT 6.0.18 ERREUR ETAT HTTP 404
    Par hajer_baccouch dans le forum Tomcat et TomEE
    Réponses: 3
    Dernier message: 20/05/2011, 16h56
  2. [Tomcat][Servlet] Erreur 404 lors d'accès distant
    Par Julaie95 dans le forum Tomcat et TomEE
    Réponses: 1
    Dernier message: 03/07/2006, 17h35
  3. [Tomcat]Etat HTTP 404, fichier web.xml inéxistant
    Par subzero82 dans le forum Tomcat et TomEE
    Réponses: 12
    Dernier message: 09/05/2006, 09h10
  4. Etat HTTP 404 - Servlet action n'est pas disponible.???
    Par iftolotfi dans le forum Servlets/JSP
    Réponses: 3
    Dernier message: 05/05/2006, 14h44
  5. [eclipse] [tomcat] etat http 404
    Par semaj_james dans le forum Eclipse Java
    Réponses: 3
    Dernier message: 30/03/2006, 21h03

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