Probleme avec tomcat

Fermé
missyos Messages postés 19 Date d'inscription samedi 9 février 2008 Statut Membre Dernière intervention 16 février 2008 - 12 févr. 2008 à 12:09
missyos Messages postés 19 Date d'inscription samedi 9 février 2008 Statut Membre Dernière intervention 16 février 2008 - 14 févr. 2008 à 17:21
Bonjour,
j'ai installé Tomcat5, avec JDK 1.5 ,j'ai fait toutes la configuration avec eclipse et j'ai eu un problème lors de l'execution du servlet.
voila mon code:
/**
*
*/
package com.developpez.tomcat;

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;

/**

*
*/
public class Test extends HttpServlet {

/* (non-Javadoc)
* @see javax.servlet.http.HttpServlet#doGet(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
*/
protected void doGet(HttpServletRequest req, HttpServletResponse res)
throws ServletException, IOException {
PrintWriter writer = res.getWriter();
writer.println("Hello World !!!");
}

}




E voilà ce qui c'est affiché:
This release of Apache Tomcat was packaged to run on J2SE 5.0
or later. It can be run on earlier JVMs by downloading and
installing a compatibility package from the Apache Tomcat
binary download page.

merci

3 réponses

SebManfred Messages postés 484 Date d'inscription mardi 28 août 2007 Statut Membre Dernière intervention 20 mai 2011 128
12 févr. 2008 à 14:05
Tu dois avoir une vieille machine virtuelle java qui traine
regarde dans tes variables d'environnement si il n'y a pas dans ton path une reference à ça ou si ton JAVA_HOME s'est bien mis à jour... ça doit être un truc comme ça.
1
SebManfred Messages postés 484 Date d'inscription mardi 28 août 2007 Statut Membre Dernière intervention 20 mai 2011 128
12 févr. 2008 à 14:07
tu dois avoir une vieille machine virtuelle JAVA qui traine (J2SE)
regarde dans ton program files pour en avoir le coeur net, puis vérifie dans tes variables d'environnement si tu n'as pas une trace de tout ça dans ton path ou si ta JAVA_HOME est bien à jour...
0
missyos Messages postés 19 Date d'inscription samedi 9 février 2008 Statut Membre Dernière intervention 16 février 2008 1
14 févr. 2008 à 17:21
maaintenant voila mon code:
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Test1</title>
</head>
<body>
<% java.util.Date d = new java.util.Date(); %>
<h1>
Today's date is <%= d.toString() %> and this jsp page worked!
</h1>
</body>
</html>

voila ce qui c'est affiché:
14 févr. 2008 17:03:21 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: C:\Program Files\Java\jdk1.5.0_06\bin;.;C:\WINDOWS\system32;C:\WINDOWS;C:\oracle\ora81\bin;C:\Program Files\Oracle\jre\1.1.7\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\PROGRA~1\ULTRAE~1;C:\Program Files\Java\jdk1.5.0_06\bin;C:\tomcat-5\bin
14 févr. 2008 17:03:21 org.apache.coyote.http11.Http11BaseProtocol init
INFO: Initialisation de Coyote HTTP/1.1 sur http-8080
14 févr. 2008 17:03:21 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 2608 ms
14 févr. 2008 17:03:22 org.apache.catalina.core.StandardService start
INFO: Démarrage du service Catalina
14 févr. 2008 17:03:22 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.26
14 févr. 2008 17:03:22 org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
14 févr. 2008 17:03:24 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: https://edition.cnn.com/], [org.apache.webapp.balancer.rules.RequestParameterRule: Target param name: paramName / Target param value: paramValue / Redirect URL: https://fr.yahoo.com/?p=us], [org.apache.webapp.balancer.rules.AcceptEverythingRule: Redirect URL: http://jakarta.apache.org]]
14 févr. 2008 17:03:25 org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
14 févr. 2008 17:03:25 org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
14 févr. 2008 17:03:25 org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
14 févr. 2008 17:03:25 org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
14 févr. 2008 17:03:26 org.apache.coyote.http11.Http11BaseProtocol start
INFO: Démarrage de Coyote HTTP/1.1 sur http-8080
14 févr. 2008 17:03:27 org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
14 févr. 2008 17:03:27 org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/187 config=null
14 févr. 2008 17:03:28 org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
14 févr. 2008 17:03:28 org.apache.catalina.startup.Catalina start
INFO: Server startup in 6684 ms

au secours.je ne comprends pas où est le probleme.

merci de me répondre le plus tôt possible.
0