Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
1236 connectés 

  FORUM HardWare.fr
  Programmation
  Java

  Site web en java (jsp/servlet) sous Apache/Tomcat

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

Site web en java (jsp/servlet) sous Apache/Tomcat

n°1955289
tofti
Posté le 05-01-2010 à 21:08:47  profilanswer
 

Salut,
 
j'ai fais un petit site avec les JSP/Servlet sous tomcat et ca marche bien en local.
 
je voudrais rendre ce site visible depuis l'extérieur, j'ai lu qu'il fallait installer apache puis modifier le httpd.conf (listen 80 par listen <monIP>:80) mais le serveur ne redemare pas si je fais cela...
 
Quelqu'un peut m'expliquer ou m'aider ?
 
Merci

mood
Publicité
Posté le 05-01-2010 à 21:08:47  profilanswer
 

n°1955454
weed
Posté le 06-01-2010 à 12:17:24  profilanswer
 

quelle est l'erreur lorsque tu tente de redemarrer ton serveur ?

n°1955466
skeye
Posté le 06-01-2010 à 12:43:47  profilanswer
 

il va falloir des détails effectivement...et installer apache ne suffit pas, il te faut mod_jk, et JkMounter ton appli dans la conf apache...
...et dans l'absolu rien ne t'oblige à installer un apache, tomcat fait ça très bien tout seul.:o


---------------
Can't buy what I want because it's free -
n°1955884
tofti
Posté le 07-01-2010 à 17:00:32  profilanswer
 

Hum l'erreur s'affiche dans une message d'alerte "The requested operation has failed".
 
Hum tomcat suffit ?
 
Tu peut m'en dire plus ? Merci :D
 
EDIT : Je suis sous Seven et j'ai bien desactivé mon firewall
 
Voici le log d'erreur :  

Citation :

[Thu Jan 07 17:02:02 2010] [notice] Parent: Received restart signal -- Restarting the server.
[Thu Jan 07 17:02:02 2010] [notice] Child 2140: Exit event signaled. Child process is ending.
[Thu Jan 07 17:02:02 2010] [warn] (OS 995)L’opération d’entrée/sortie a été abandonnée en raison de l’arrêt d’un thread ou à la demande d’une application.  : winnt_accept: Asynchronous AcceptEx failed.
[Thu Jan 07 17:02:03 2010] [notice] Child 2140: Released the start mutex
[Thu Jan 07 17:02:04 2010] [notice] Child 2140: Waiting for 250 worker threads to exit.
[Thu Jan 07 17:02:04 2010] [notice] Child 2140: All worker threads have exited.
[Thu Jan 07 17:02:04 2010] [notice] Child 2140: Child process is exiting

Message cité 1 fois
Message édité par tofti le 07-01-2010 à 17:07:18
n°1955886
skeye
Posté le 07-01-2010 à 17:05:30  profilanswer
 

tofti a écrit :

Hum tomcat suffit ?
 
Tu peut m'en dire plus ? Merci :D


 
Si ton appli fonctionne en local avec tomcat seul tu n'as qu'à ouvrir l'accès au port utilisé par tomcat vers l'extérieur et pouf c'est en ligne...[:jagstang]


---------------
Can't buy what I want because it's free -
n°1955887
tofti
Posté le 07-01-2010 à 17:07:45  profilanswer
 

skeye a écrit :


 
Si ton appli fonctionne en local avec tomcat seul tu n'as qu'à ouvrir l'accès au port utilisé par tomcat vers l'extérieur et pouf c'est en ligne...[:jagstang]


 
Hum d'accord, mais comment je fais ca ?  :whistle:

n°1955888
skeye
Posté le 07-01-2010 à 17:08:54  profilanswer
 

tofti a écrit :


 
Hum d'accord, mais comment je fais ca ?  :whistle:


Si tu n'as aucun firewall, c'est déjà fait.[:dawa]


---------------
Can't buy what I want because it's free -
n°1955890
tofti
Posté le 07-01-2010 à 17:10:23  profilanswer
 

skeye a écrit :


Si tu n'as aucun firewall, c'est déjà fait.[:dawa]


 
Et bien non  :sweat:  
 
http://monIP:8080/MonProjet/ m'affiche :
 

Citation :

La connexion a échoué
 
       
 
       
       
       
 
       
         
         
 
           
 
Firefox ne peut établir de connexion avec le serveur à l'adresse  
 
...

n°1955892
skeye
Posté le 07-01-2010 à 17:12:38  profilanswer
 

Alors tu as un firewall qui bloque quelque part...ou bien ton tomcat n'écoute que sur l'ip loopback...à vérifier dans conf/server.xml, probablement.:o

Message cité 1 fois
Message édité par skeye le 07-01-2010 à 17:12:49

---------------
Can't buy what I want because it's free -
n°1955895
tofti
Posté le 07-01-2010 à 17:15:47  profilanswer
 

skeye a écrit :

Alors tu as un firewall qui bloque quelque part...ou bien ton tomcat n'écoute que sur l'ip loopback...à vérifier dans conf/server.xml, probablement.:o


 
 
Hum... ???
 

Code :
  1. <?xml version='1.0' encoding='utf-8'?>
  2. <!--
  3.   Licensed to the Apache Software Foundation (ASF) under one or more
  4.   contributor license agreements.  See the NOTICE file distributed with
  5.   this work for additional information regarding copyright ownership.
  6.   The ASF licenses this file to You under the Apache License, Version 2.0
  7.   (the "License" ); you may not use this file except in compliance with
  8.   the License.  You may obtain a copy of the License at
  9.       http://www.apache.org/licenses/LICENSE-2.0
  10.   Unless required by applicable law or agreed to in writing, software
  11.   distributed under the License is distributed on an "AS IS" BASIS,
  12.   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13.   See the License for the specific language governing permissions and
  14.   limitations under the License.
  15. -->
  16. <!-- Note:  A "Server" is not itself a "Container", so you may not
  17.      define subcomponents such as "Valves" at this level.
  18.      Documentation at /docs/config/server.html
  19. -->
  20. <Server port="8005" shutdown="SHUTDOWN">
  21.   <!--APR library loader. Documentation at /docs/apr.html -->
  22.   <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
  23.   <!--Initialize Jasper prior to webapps are loaded. Documentation at /docs/jasper-howto.html -->
  24.   <Listener className="org.apache.catalina.core.JasperListener" />
  25.   <!-- JMX Support for the Tomcat server. Documentation at /docs/non-existent.html -->
  26.   <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" />
  27.   <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
  28.   <!-- Global JNDI resources
  29.        Documentation at /docs/jndi-resources-howto.html
  30.   -->
  31.   <GlobalNamingResources>
  32.     <!-- Editable user database that can also be used by
  33.          UserDatabaseRealm to authenticate users
  34.     -->
  35.     <Resource name="UserDatabase" auth="Container"
  36.               type="org.apache.catalina.UserDatabase"
  37.               description="User database that can be updated and saved"
  38.               factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
  39.               pathname="conf/tomcat-users.xml" />
  40.   </GlobalNamingResources>
  41.   <!-- A "Service" is a collection of one or more "Connectors" that share
  42.        a single "Container" Note:  A "Service" is not itself a "Container",
  43.        so you may not define subcomponents such as "Valves" at this level.
  44.        Documentation at /docs/config/service.html
  45.    -->
  46.   <Service name="Catalina">
  47.  
  48.     <!--The connectors can use a shared executor, you can define one or more named thread pools-->
  49.     <!--
  50.     <Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
  51.         maxThreads="150" minSpareThreads="4"/>
  52.     -->
  53.    
  54.    
  55.     <!-- A "Connector" represents an endpoint by which requests are received
  56.          and responses are returned. Documentation at :
  57.          Java HTTP Connector: /docs/config/http.html (blocking & non-blocking)
  58.          Java AJP  Connector: /docs/config/ajp.html
  59.          APR (HTTP/AJP) Connector: /docs/apr.html
  60.          Define a non-SSL HTTP/1.1 Connector on port 8080
  61.     -->
  62.     <Connector port="8080" protocol="HTTP/1.1"
  63.                connectionTimeout="20000"
  64.                redirectPort="8443" />
  65.     <!-- A "Connector" using the shared thread pool-->
  66.     <!--
  67.     <Connector executor="tomcatThreadPool"
  68.                port="8080" protocol="HTTP/1.1"
  69.                connectionTimeout="20000"
  70.                redirectPort="8443" />
  71.     -->         
  72.     <!-- Define a SSL HTTP/1.1 Connector on port 8443
  73.          This connector uses the JSSE configuration, when using APR, the
  74.          connector should be using the OpenSSL style configuration
  75.          described in the APR documentation -->
  76.     <!--
  77.     <Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
  78.                maxThreads="150" scheme="https" secure="true"
  79.                clientAuth="false" sslProtocol="TLS" />
  80.     -->
  81.     <!-- Define an AJP 1.3 Connector on port 8009 -->
  82.     <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
  83.     <!-- An Engine represents the entry point (within Catalina) that processes
  84.          every request.  The Engine implementation for Tomcat stand alone
  85.          analyzes the HTTP headers included with the request, and passes them
  86.          on to the appropriate Host (virtual host).
  87.          Documentation at /docs/config/engine.html -->
  88.     <!-- You should set jvmRoute to support load-balancing via AJP ie :
  89.     <Engine name="Standalone" defaultHost="localhost" jvmRoute="jvm1">       
  90.     -->
  91.     <Engine name="Catalina" defaultHost="localhost">
  92.       <!--For clustering, please take a look at documentation at:
  93.           /docs/cluster-howto.html  (simple how to)
  94.           /docs/config/cluster.html (reference documentation) -->
  95.       <!--
  96.       <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>
  97.       -->       
  98.       <!-- The request dumper valve dumps useful debugging information about
  99.            the request and response data received and sent by Tomcat.
  100.            Documentation at: /docs/config/valve.html -->
  101.       <!--
  102.       <Valve className="org.apache.catalina.valves.RequestDumperValve"/>
  103.       -->
  104.       <!-- This Realm uses the UserDatabase configured in the global JNDI
  105.            resources under the key "UserDatabase".  Any edits
  106.            that are performed against this UserDatabase are immediately
  107.            available for use by the Realm.  -->
  108.       <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
  109.              resourceName="UserDatabase"/>
  110.       <!-- Define the default virtual host
  111.            Note: XML Schema validation will not work with Xerces 2.2.
  112.        -->
  113.       <Host name="localhost"  appBase="webapps"
  114.             unpackWARs="true" autoDeploy="true"
  115.             xmlValidation="false" xmlNamespaceAware="false">
  116.         <!-- SingleSignOn valve, share authentication between web applications
  117.              Documentation at: /docs/config/valve.html -->
  118.         <!--
  119.         <Valve className="org.apache.catalina.authenticator.SingleSignOn" />
  120.         -->
  121.         <!-- Access log processes all example.
  122.              Documentation at: /docs/config/valve.html -->
  123.         <!--
  124.         <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" 
  125.                prefix="localhost_access_log." suffix=".txt" pattern="common" resolveHosts="false"/>
  126.         -->
  127.       </Host>
  128.     </Engine>
  129.   </Service>
  130. </Server>


Message édité par tofti le 07-01-2010 à 17:16:10

Aller à :
Ajouter une réponse
  FORUM HardWare.fr
  Programmation
  Java

  Site web en java (jsp/servlet) sous Apache/Tomcat

 

Sujets relatifs
[JSP-Servlet] doPost ne fonctionne pasRecuperer un Attribut Bean dans Servlet
[JAVA]Probleme affichage adresse memoireProblème avec news pour site web
pb java oracle besoin daide svp urgent[PHP] Comment coder un moteur de recherche sur mon site ?
[PHP] Extraire automatiquement une image d'un site (cf.Facebook share)Comment publier une vidéo de son propre site sur Facebook ?
Attente conditionnelle en javareverse engineering java
Plus de sujets relatifs à : Site web en java (jsp/servlet) sous Apache/Tomcat


Copyright © 1997-2022 Hardware.fr SARL (Signaler un contenu illicite / Données personnelles) / Groupe LDLC / Shop HFR