[Struts + Tomcat] Service time qui explose
Bonjour à tous.
Je suis nouveau avec Struts (et le web dev avec Java). Avec mes collègues de promo, nous avons écrit une petite application qui fonctionne plutôt bien. Par contre, après une dizaine de requêtes struts (*.do), aucune page n'est rendue. En regardant le status de tomcat, on se rend compte que la requête est en statut "Service" et ce depuis un temps incroyablement long (aussi longtemps que l'on attende)
Cette image vous expliquera la situation bien mieux que mon texte : (voir la 3eme ligne : "POST ProjetSI/Connection.do HTTP/1.1") Elle provient du manager de tomcat 6.
http://kephpage.free.fr/divers/tomcat-statut.png
Diminuer l'option "maxWaitTimeout" ou "connectionTimeout" de la configuration de Tomcat n'y change rien.
Voici le server.xml de Tomcat :
Code:
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 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148
|
<?xml version='1.0' encoding='utf-8'?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- Note: A "Server" is not itself a "Container", so you may not
define subcomponents such as "Valves" at this level.
Documentation at /docs/config/server.html
-->
<Server port="8005" shutdown="SHUTDOWN">
<!--APR library loader. Documentation at /docs/apr.html -->
<Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
<!--Initialize Jasper prior to webapps are loaded. Documentation at /docs/jasper-howto.html -->
<Listener className="org.apache.catalina.core.JasperListener" />
<!-- JMX Support for the Tomcat server. Documentation at /docs/non-existent.html -->
<Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" />
<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
<!-- Global JNDI resources
Documentation at /docs/jndi-resources-howto.html
-->
<GlobalNamingResources>
<!-- Editable user database that can also be used by
UserDatabaseRealm to authenticate users
-->
<Resource name="UserDatabase" auth="Container"
type="org.apache.catalina.UserDatabase"
description="User database that can be updated and saved"
factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
pathname="conf/tomcat-users.xml" />
</GlobalNamingResources>
<!-- A "Service" is a collection of one or more "Connectors" that share
a single "Container" Note: A "Service" is not itself a "Container",
so you may not define subcomponents such as "Valves" at this level.
Documentation at /docs/config/service.html
-->
<Service name="Catalina">
<!--The connectors can use a shared executor, you can define one or more named thread pools-->
<Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
maxThreads="150" minSpareThreads="40" maxWaitTimeout="150"/>
<!-- A "Connector" represents an endpoint by which requests are received
and responses are returned. Documentation at :
Java HTTP Connector: /docs/config/http.html (blocking & non-blocking)
Java AJP Connector: /docs/config/ajp.html
APR (HTTP/AJP) Connector: /docs/apr.html
Define a non-SSL HTTP/1.1 Connector on port 8080
-->
<!-->
<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />-->
<!-- A "Connector" using the shared thread pool-->
<Connector executor="tomcatThreadPool"
port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
<!-- Define a SSL HTTP/1.1 Connector on port 8443
This connector uses the JSSE configuration, when using APR, the
connector should be using the OpenSSL style configuration
described in the APR documentation -->
<!--
<Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
maxThreads="150" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS" />
-->
<!-- Define an AJP 1.3 Connector on port 8009 -->
<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
<!-- An Engine represents the entry point (within Catalina) that processes
every request. The Engine implementation for Tomcat stand alone
analyzes the HTTP headers included with the request, and passes them
on to the appropriate Host (virtual host).
Documentation at /docs/config/engine.html -->
<!-- You should set jvmRoute to support load-balancing via AJP ie :
<Engine name="Standalone" defaultHost="localhost" jvmRoute="jvm1">
-->
<Engine name="Catalina" defaultHost="localhost">
<!--For clustering, please take a look at documentation at:
/docs/cluster-howto.html (simple how to)
/docs/config/cluster.html (reference documentation) -->
<!--
<Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>
-->
<!-- The request dumper valve dumps useful debugging information about
the request and response data received and sent by Tomcat.
Documentation at: /docs/config/valve.html -->
<!--
<Valve className="org.apache.catalina.valves.RequestDumperValve"/>
-->
<!-- This Realm uses the UserDatabase configured in the global JNDI
resources under the key "UserDatabase". Any edits
that are performed against this UserDatabase are immediately
available for use by the Realm. -->
<Realm className="org.apache.catalina.realm.UserDatabaseRealm"
resourceName="UserDatabase"/>
<!-- Define the default virtual host
Note: XML Schema validation will not work with Xerces 2.2.
-->
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
<!-- SingleSignOn valve, share authentication between web applications
Documentation at: /docs/config/valve.html -->
<!--
<Valve className="org.apache.catalina.authenticator.SingleSignOn" />
-->
<!-- Access log processes all example.
Documentation at: /docs/config/valve.html -->
<!--
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="localhost_access_log." suffix=".txt" pattern="common" resolveHosts="false"/>
-->
</Host>
</Engine>
</Service>
</Server> |
Et le fichier struts-config.xml :
Code:
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 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382
|
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts-config PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 1.2//EN"
"http://jakarta.apache.org/struts/dtds/struts-config_1_2.dtd">
<struts-config>
<data-sources>
<data-source key="Normal" type="org.apache.tomcat.dbcp.dbcp.BasicDataSource">
<set-property
property="driverClassName"
value="com.mysql.jdbc.Driver" />
<set-property
property="url"
value="jdbc:mysql://localhost/colloque" />
<set-property
property="username"
value="root" />
<set-property
property="password"
value="" />
<!--<set-property
property="maxActive"
value="10" />
<set-property
property="maxWait"
value="5000" />
<set-property property="defaultAutoCommit" value="false" />
<set-property property="defaultReadOnly" value="false" />-->
</data-source>
</data-sources>
<form-beans>
<form-bean name="Voir_articleForm" type="si.actionforms.auteur.Voir_articleForm"/>
<form-bean name="ModifierArticleForm" type="si.actionforms.auteur.ModifierArticleForm"/>
<form-bean name="OubliMDPForm" type="si.actionforms.gestionIdentite.OubliMDPForm"/>
<form-bean name="assignCommunicationForm" type="si.actionforms.comite.AssignCommunicationForm"/>
<form-bean name="DefinirGrilleForm" type="si.actionforms.comite.DefinirGrilleForm"/>
<form-bean name="Valider_avis_articleForm" type="si.actionforms.relecteur.Valider_avis_articleForm"/>
<form-bean name="UploadForm" type="si.actionforms.UploadForm"/>
<form-bean name="Modification_parametresForm" type="si.actionforms.Modification_parametresForm"/>
<form-bean name="suppThemeForm" type="si.actionforms.SuppThemeForm"/>
<form-bean name="suppSubThemeForm" type="si.actionforms.SuppSubThemeForm"/>
<form-bean name='deconnectionForm' type='si.actionforms.gestionIdentite.DeconnectionForm' />
<form-bean name='connectionForm' type='si.actionforms.gestionIdentite.ConnectionForm' />
<form-bean name='inscriptionForm' type='si.actionforms.gestionIdentite.InscriptionForm' />
<form-bean name='selection_comForm' type='si.actionforms.Selection_comForm' />
<form-bean name='identificationForm' type='si.actionforms.IdentificationForm' />
<form-bean name='modificationForm' type='si.actionforms.gestionIdentite.ModificationForm' />
<form-bean name='addSubThemeChairman' type='si.actionforms.AddSubThemeForm' />
<form-bean name='addThemeChairman' type='si.actionforms.AddThemeForm' />
<form-bean name='authorToRewieverForm' type='si.actionforms.AuthorToRewieverForm' />
<form-bean name='modifyDateForm' type='si.actionforms.ModifyDateForm' />
<form-bean name='acceptRelecteurForm' type='si.actionforms.AcceptRelecteurForm' />
<form-bean name='acceptComiteForm' type='si.actionforms.AcceptComiteForm' />
<form-bean name='suppUtilisateurForm' type='si.actionforms.SuppUtilisateurForm' />
<form-bean name='Modification_parametresRelecteurForm' type='si.actionforms.Modification_parametresRelecteurForm' />
</form-beans>
<global-exceptions>
</global-exceptions>
<global-forwards>
<forward name="/keph2" path="/keph.jsp"/>
</global-forwards>
<action-mappings>
<action path="/Accueil"
type="si.actionforms.AccueilAction"
validate="true">
<forward path="index.jsp"/>
</action>
<action path="/Keph" parameter="/keph.jsp"
type="org.apache.struts.actions.ForwardAction"/>
<action path="/AddThemes" parameter="/ajoutTheme.jsp"
type="org.apache.struts.actions.ForwardAction"/>
<action path="/AffichageAuteurs" parameter="/comite_gestionmembreauteur.jsp"
type="org.apache.struts.actions.ForwardAction"/>
<action path="/AffichageComite" parameter="/comite_gestionmembrecomite.jsp"
type="org.apache.struts.actions.ForwardAction"/>
<action path="/AffichageRelecteurs" parameter="/comite_gestionmembrerelecteur.jsp"
type="org.apache.struts.actions.ForwardAction"/>
<action path="/SuppThemes" parameter="/suppr_theme.jsp"
type="org.apache.struts.actions.ForwardAction"/>
<action path="/ListPeople" parameter="/list_people.jsp"
type="org.apache.struts.actions.ForwardAction"/>
<action path="/ArbitrageRelecteur" parameter="/comite_listerelecteur.jsp"
type="org.apache.struts.actions.ForwardAction"/>
<action path="/ArbitrageComite" parameter="/comite_listecomite.jsp"
type="org.apache.struts.actions.ForwardAction"/>
<action path="/Modification"
type="si.actionforms.gestionIdentite.ModificationAction"
input="/modif_parametres.jsp"
name="modificationForm" >
<forward name="succes" path="/modif_parametres.jsp"/>
<forward name="echec" path="/modif_parametres.jsp"/>
</action>
<action path="/auteur_comm"
type="si.actionforms.AuteurCommAction">
<forward name="echec" path="/comite_gestionmembreauteur.jsp"/>
<forward name="succes" path="/auteur_comm.jsp"/>
</action>
<action path="/contact"
type="si.actionforms.ContactAction">
<forward name="echec" path="/index.jsp"/>
<forward name="succes" path="/contact.jsp"/>
</action>
<action path="/relecteur_comm"
type="si.actionforms.RelecteurCommAction">
<forward name="echec" path="/comite_gestionmembrerelecteur.jsp"/>
<forward name="succes" path="/relecteur_comm.jsp"/>
</action>
<action path="/Deconnection"
type="si.actionforms.gestionIdentite.DeconnectionAction"
validate="true"
name="deconnectionForm" ><!-- on s'en fiche ici -->
<forward name="succes" path="/index.jsp"/>
</action>
<action path="/Valider_avis_article"
type="si.actionforms.relecteurValideAction"
name="relecteurArticleForm" >
<forward name="succes" path="/validationEffectuee.jsp" />
<forward name="succes" path="/relecteur_envoi_avis.jsp" />
</action>
<action path="/Selection_com"
type="si.actionforms.Selection_comAction"
name="selection_comForm" >
<forward name="succes" path="/envoi_article.jsp"/>
<forward name="echec" path="/connection.jsp"/>
</action>
<action path="/Connection"
type="si.actionforms.gestionIdentite.ConnectionAction"
input="/connection.jsp"
name="connectionForm" >
<forward name="succes" path="/accueil.jsp"/>
<forward name="echec" path="/connection.jsp"/>
</action>
<action path="/chairman_gestion_membres"
type="si.actionforms.SuppUtilisateurAction"
input="/list_people.jsp"
name="suppUtilisateurForm" >
<forward name="succes" path="/list_people.jsp"/>
<forward name="echec" path="/list_people.jsp"/>
</action>
<action path="/AccepterRelecteur"
type="si.actionforms.AcceptRelecteurAction"
input="/comite_listerelecteur.jsp"
name="acceptRelecteurForm"
parameter="hidden" >
<forward name="succes" path="/comite_listerelecteur.jsp"/>
<forward name="echec" path="/comite_listerelecteur.jsp"/>
</action>
<action path="/AccepterComite"
type="si.actionforms.AcceptComiteAction"
input="/comite_listecomite.jsp"
name="acceptComiteForm" >
<forward name="succes" path="/comite_listecomite.jsp"/>
<forward name="echec" path="/comite_listecomite.jsp"/>
</action>
<action path="/Inscription"
type="si.actionforms.gestionIdentite.InscriptionAction"
validate="true"
input="/inscription.jsp"
name="inscriptionForm" >
<forward name="succes" path="/connection.jsp"/>
<forward name="echec" path="/inscription.jsp"/>
</action>
<action path="/AddThemeChairman"
type="si.actionforms.AddThemeAction"
validate="true"
input="/ajoutTheme.jsp"
name="addThemeChairman" >
<forward name="succes" path="/ajoutTheme.jsp"/>
<forward name="echec" path="/ajoutTheme.jsp"/>
</action>
<action
path="/ModifierDates"
input="/accueil_chairman.jsp"
name="modifyDateForm"
validate="true"
type="si.actionforms.ModifyDateAction"
>
<forward name="echec" path="/accueil_chairman.jsp"/>
<forward name="succes" path="/accueil_chairman.jsp"/>
</action>
<action
path="/AddSubThemeChairman"
input="/ajoutTheme.jsp"
name="addSubThemeChairman"
validate="true"
type="si.actionforms.AddSubThemeAction"
>
<forward name="echec" path="/ajoutTheme.jsp"/>
<forward name="succes" path="/ajoutTheme.jsp"/>
</action>
<action
path="/AuteurRelecteur"
input="/modif_parametres.jsp"
name="authorToRewieverForm"
validate="true"
type="si.actionforms.AuthorToRewieverAction"
>
<forward name="echec" path="/modif_parametres.jsp"/>
<forward name="succes" path="/modif_parametres.jsp"/>
</action>
<action path="/profil"
type="si.actionforms.ProfilAction"
validate="true">
<forward name="succes" path="/modif_parametres.jsp"/>
<forward name="echec" path="/accueil.jsp"/>
</action>
<action path="/article"
type="si.actionforms.ArticleAction"
validate="true">
<forward name="succes" path="/relecteur_envoi_avis.jsp"/>
<forward name="echec" path="/accueil_relecteurs.jsp"/>
</action>
<action
path="/Envoi_article"
input="/envoi_article.jsp"
name="Modification_parametresForm"
validate="true"
type="si.actionforms.Modification_parametresAction"
parameter="hidden">
<forward name="modifTheme" path="/envoi_article.jsp"/>
<forward name="succes" path="/accueil.jsp"/>
</action>
<action
path="/ModificationRelecteur"
input="/modif_parametres.jsp"
name="Modification_parametresRelecteurForm"
validate="true"
type="si.actionforms.Modification_parametresRelecteurAction">
<forward name="echec" path="/modif_parametres.jsp"/>
<forward name="succes" path="/modif_parametres.jsp"/>
</action>
<action
path="/SuppThemeChairman"
input="/suppr_theme.jsp"
name="suppThemeForm"
validate="true"
type="si.actionforms.SuppThemeAction">
<forward name="echec" path="/suppr_theme.jsp"/>
<forward name="succes" path="/suppr_theme.jsp"/>
</action>
<action
path="/testSup"
input="/suppr_theme.jsp"
name="suppSubThemeForm"
validate="true"
type="si.actionforms.SuppSubThemeAction"
parameter="hidden">
<forward name="echec" path="/suppr_theme.jsp"/>
<forward name="succes" path="/suppr_theme.jsp"/>
</action>
<action
input="/accueil_relecteurs.jsp"
name="Valider_avis_articleForm"
path="/Valider_avis_article"
scope="request"
type="si.actionforms.relecteur.Valider_avis_articleAction" >
<forward name="echec" path="/accueil.jsp"/>
<forward name="succes" path="/accueil_relecteur.jsp"/>
</action>
<action
input="/mdp_oubli.jsp"
name="OubliMDPForm"
path="/oubli_mdp"
type="si.actionforms.gestionIdentite.OubliMDPAction">
<forward name="echec" path="/mdp_oubli.jsp"/>
<forward name="succes" path="/mdp_oubli.jsp"/>
</action>
<action input="/" name="assignCommunicationForm" path="/AssignCommunication" scope="session" type="si.actionforms.comite.AssignCommunicationAction"/>
<action
input="/comite_definitgrille.jsp"
name="DefinirGrilleForm"
path="/Definir_grille"
type="si.actionforms.comite.DefinirGrilleAction">
<forward name="echec" path="/comite_definitgrille.jsp"/>
<forward name="succes" path="/comite_definitgrille.jsp"/>
</action>
<action path="/Voir_grille_vierge" type="si.actionforms.comite.VoirGrilleViergeAction"/>
<action path="/Voir_Article" type="si.actionforms.auteur.Voir_articleAction"/>
</action-mappings>
<controller processorClass="org.apache.struts.tiles.TilesRequestProcessor"/>
<message-resources parameter="si/struts/ApplicationResource"/>
<!-- ========================= Tiles plugin ===============================-->
<!--
This plugin initialize Tiles definition factory. This later can takes some
parameters explained here after. The plugin first read parameters from
web.xml, thenoverload them with parameters defined here. All parameters
are optional.
The plugin should be declared in each struts-config file.
- definitions-config: (optional)
Specify configuration file names. There can be several comma
separated file names (default: ?? )
- moduleAware: (optional - struts1.1)
Specify if the Tiles definition factory is module aware. If true
(default), there will be one factory for each Struts module.
If false, there will be one common factory for all module. In this
later case, it is still needed to declare one plugin per module.
The factory will be initialized with parameters found in the first
initialized plugin (generally the one associated with the default
module).
true : One factory per module. (default)
false : one single shared factory for all modules
- definitions-parser-validate: (optional)
Specify if xml parser should validate the Tiles configuration file.
true : validate. DTD should be specified in file header (default)
false : no validation
Paths found in Tiles definitions are relative to the main context.
-->
<plug-in className="org.apache.struts.tiles.TilesPlugin" >
<set-property property="definitions-config" value="/WEB-INF/tiles-defs.xml" />
<set-property property="moduleAware" value="true" />
</plug-in>
<!-- ========================= Validator plugin ================================= -->
<plug-in className="org.apache.struts.validator.ValidatorPlugIn">
<set-property
property="pathnames"
value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml"/>
</plug-in>
</struts-config> |
Et bien entendu, rien n'apparait dans les logs de Tomcat.
Je suis désolé si ma description du problème n'est pas très précise, j'ai du mal à l'exprimer.
J'espère que mon erreur vous sautera aux yeux.
Bonne journée et merci d'avance,
Keph