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

Struts 1 Java Discussion :

migration Struts 1.1 en 1.3.8


Sujet :

Struts 1 Java

  1. #1
    Futur Membre du Club
    Profil pro
    Inscrit en
    Juillet 2007
    Messages
    7
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juillet 2007
    Messages : 7
    Points : 5
    Points
    5
    Par défaut migration Struts 1.1 en 1.3.8
    j'essaie en vain de migrer mon appli de struts 1.1 en 1.3.8.

    j'ai à priori suivi toutes les évolutions des différentes versions commen entre autre ActionError et ActionErrors.

    Mon server se lance. l'appli s'affiche mais par contre l'écran devient blanc dès qu'une fenetred'erreur doit s'afficher via les éléments struts. (struts-config.xml, message.properties, exception.xml, ..)

    auriez-vous une idée pour régler mon problème ?
    Je n'ai pas trouver de solution sur différents forum.
    Merci pour la réponse

  2. #2
    Expert éminent

    Femme Profil pro
    Inscrit en
    Juillet 2005
    Messages
    5 793
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : France

    Informations forums :
    Inscription : Juillet 2005
    Messages : 5 793
    Points : 7 778
    Points
    7 778
    Par défaut
    Est-ce une page d'erreur que tu affiches en cas d'erreur de validation ou en cas d'exception ?
    Si c'est en cas d'erreur de validation, la ressource (jsp ou autre) référencée dans l'attibut input dans le mapping de l'Action est-elle correcte ?

    Avec un peu de code, ce serait sûrement plus facile de t'aider.

  3. #3
    Futur Membre du Club
    Profil pro
    Inscrit en
    Juillet 2007
    Messages
    7
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juillet 2007
    Messages : 7
    Points : 5
    Points
    5
    Par défaut
    L'erreur à affichée est une exception levée dans du code java.
    ci-dessous j'ajoute des extraits des fichiers struts-config.xml et exceptions.xml
    Pour être précisn normalement l'affichage de la fenêtre d'erreur se fait après le rollBack. En debug avec java 1.5 et struts 1.1 j'execute un finally alors qu'avec struts 1.3.8 il ne passe pas dans le finally. Et si je force l'execution du finally ij y a plantage de l'appli.

    J'espère que cela aidera. Sinon si des infos manquent je peux encore les fournir mais il faudra me dire ce que je dois mettre.

    struts-config.xml :
    -----------------
    Code xml : 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
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.3//EN" "http://struts.apache.org/dtds/struts-config_1_3.dtd">
     
    <struts-config>
        <form-beans>
    ...
        </form-beans>
       <global-forwards>
    ...
        </global-forwards>
    ...
        <action-mappings>
                <action path="/action/form/prsignes"
            	validate="true"
            	input="/JSP/prsignes/prsignes.jsp"
                type="com.sncf.action.prsignes.RechercherPrSignesAction"
                name="RecherchePrSignes">
                <forward name="success" path="/JSP/prsignes/prsignes.jsp"/>
                <forward name="creer" path="/JSP/prsignes/prsignes.jsp"/>
            </action>
    ...        
        </action-mappings>
     
    	<!--                   Definition des plugins Struts                   -->
     
        <plug-in className="com.sa.plugin.ressources.PluginRessources"/>
        <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>

    exceptions.xml :
    --------------
    Code xml : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <configurationexceptions>
    ...
    	<exceptiondefinition>
    		<codeerreur>eb34</codeerreur>
    		<bloquante>false</bloquante>
    		<coderetourvue>creer</coderetourvue>
    		<messagevue>prsignes.decalage_hor.except</messagevue>
    		<messageexception>Le décalage horaire doit être une entier.</messageexception>
    	</exceptiondefinition>
    ...
    </configurationexceptions>

  4. #4
    Futur Membre du Club
    Profil pro
    Inscrit en
    Juillet 2007
    Messages
    7
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juillet 2007
    Messages : 7
    Points : 5
    Points
    5
    Par défaut
    Bonsoir,

    J'ai progressé dans la récupération du problème.
    Je joins ci-dessous le log récupéré.

    Tout à l'air de provenir du remplacement :
    _ des classes ActionError et ActionErrors par ActionMessage et ActionMessages.
    _ ResponseUtils et RequestUtils par TagUtils.getInstance

    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
    17:43:05,296 ERROR [action]:253 - "Servlet.service()" pour la servlet action a généré une exception
    javax.servlet.jsp.JspException: Cannot find message resources under key org.apache.struts.action.MESSAGE
    	at org.apache.struts.taglib.TagUtils.retrieveMessageResources(TagUtils.java:1112)
    	at org.apache.struts.taglib.TagUtils.present(TagUtils.java:1055)
    	at org.apache.struts.taglib.html.ErrorsTag.doStartTag(ErrorsTag.java:200)
    	at org.apache.jsp.JSP.template.template_005fprincipal_jsp._jspx_meth_sncfhtml_005ferrors_005f0(template_005fprincipal_jsp.java:162)
    	at org.apache.jsp.JSP.template.template_005fprincipal_jsp._jspService(template_005fprincipal_jsp.java:92)
    	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
    	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
    	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
    	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
    	at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:679)
    	at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:584)
    	at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:497)
    	at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:965)
    	at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:600)
    	at org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java:138)
    	at org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:152)
    	at org.apache.struts.tiles.taglib.InsertTag.doInclude(InsertTag.java:764)
    	at org.apache.struts.tiles.taglib.InsertTag$InsertHandler.doEndTag(InsertTag.java:896)
    	at org.apache.struts.tiles.taglib.InsertTag.doEndTag(InsertTag.java:465)
    	at org.apache.jsp.JSP.prsignes.prsignes_jsp._jspx_meth_template_005finsert_005f0(prsignes_jsp.java:120)
    	at org.apache.jsp.JSP.prsignes.prsignes_jsp._jspService(prsignes_jsp.java:62)
    	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
    	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
    	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
    	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
    	at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:679)
    	at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:461)
    	at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:399)
    	at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
    	at org.apache.struts.chain.commands.servlet.PerformForward.handleAsForward(PerformForward.java:113)
    	at org.apache.struts.chain.commands.servlet.PerformForward.perform(PerformForward.java:96)
    	at org.apache.struts.chain.commands.AbstractPerformForward.execute(AbstractPerformForward.java:54)
    	at org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)
    	at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
    	at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304)
    	at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
    	at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)
    	at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
    	at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
    	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
    	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
    	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
    	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
    	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
    	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:875)
    	at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
    	at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
    	at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
    	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
    	at java.lang.Thread.run(Unknown Source)

  5. #5
    Expert éminent

    Femme Profil pro
    Inscrit en
    Juillet 2005
    Messages
    5 793
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : France

    Informations forums :
    Inscription : Juillet 2005
    Messages : 5 793
    Points : 7 778
    Points
    7 778
    Par défaut
    Il faut créer un fichier properties des messages dans le répertoire des sources et le référencer dans la balise message-resources dans le struts-config.xml.

    Pour plus de précisions, voir le chapitre Message Resources configuration sur le site officiel de Struts.

  6. #6
    Futur Membre du Club
    Profil pro
    Inscrit en
    Juillet 2007
    Messages
    7
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juillet 2007
    Messages : 7
    Points : 5
    Points
    5
    Par défaut Suite et fin
    Merci beaucoup pour l'aide.

    J'ai ajouté le fichier properties dans la balise du fichier struts-config.
    Mais il a fallu que je supprime aussi les \\ qui terminait toutes les lignes des messages car sinon struts considère que la ligne du message n'est pas terminée dixit le message d'erreur affiché.

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

Discussions similaires

  1. migration struts 1.1 vers struts 1.2
    Par jayjaypg22 dans le forum Struts 1
    Réponses: 0
    Dernier message: 24/02/2010, 12h21
  2. Migration Struts 1.0.2 vers Struts 1.1
    Par VIP001 dans le forum Struts 1
    Réponses: 7
    Dernier message: 06/02/2009, 19h21
  3. [Portlet] Migration application Struts en portlet JSR 168
    Par bobic dans le forum Portails
    Réponses: 1
    Dernier message: 24/12/2008, 11h27
  4. Migration Struts 1.2.9 vers Struts 1.3.8
    Par mmschnef dans le forum Struts 1
    Réponses: 5
    Dernier message: 03/04/2007, 14h33
  5. [WebSphere][Struts]Migration de v4.5 à V6.1
    Par Niik0o dans le forum Websphere
    Réponses: 3
    Dernier message: 16/05/2006, 15h46

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