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 :

Problème de "No FormBeanConfig found in module"


Sujet :

Struts 1 Java

  1. #1
    Nouveau membre du Club
    Profil pro
    Inscrit en
    Février 2007
    Messages
    50
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Février 2007
    Messages : 50
    Points : 38
    Points
    38
    Par défaut Problème de "No FormBeanConfig found in module"
    Salut à tous.

    Voilà je débute dans Struts et me voilà déjà confronter à des problèmes surement de config

    Voilà mon struts-config.xml :
    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
    <?xml version="1.0" encoding="ISO-8859-1" ?>
     
    <!DOCTYPE struts-config PUBLIC
        "-//Apache Software Foundation//DTD Struts Configuration 1.3//EN"
        "http://jakarta.apache.org/struts/dtds/struts-config_1_3.dtd">
     
    <struts-config>
    	<form-beans>
    		<form-bean name="ConfigAddElementForm" type="ot.form.ConfigAddElementBean" />
    	</form-beans>
     
       <action-mappings>
     
          <action
    			path="/Main"
    			parameter="/view/Main.jsp"
    			type="org.apache.struts.actions.ForwardAction"
    		/>     
     
    	  <!--  DEBUT CONFIG ADD ELEMENT -->
     
         <action
    			path="/ConfigAddElement"
    			parameter="/view/ConfigAddElement.jsp"
    			type="ot.action.ConfigAddElementAction"
    			name="ConfigAddElemenForm"
    			scope="request"
    			>
    			<forward name="ConfigAddElementError" path="/ConfigAddElementError.do"/>
    			<forward name="ConfigAddElementSuccess" path="/ConfigAddElementSuccess.do"/>
    		</action>
     
    	  <action
    			path="/ConfigAddElementError"
    			parameter="/view/ConfigAddElement.jsp?result=error"
    			type="org.apache.struts.actions.ForwardAction">  
    		</action>
     
    		<action
    			path="/ConfigAddElementSuccess"
    			parameter="/view/ConfigAddElement.jsp?result=success"
    			type="org.apache.struts.actions.ForwardAction">  
    		</action> 
     
    		<!--  FIN CONFIG ADD ELEMENT -->
     
        </action-mappings>
     
    </struts-config>
    Mon web.xml :
    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
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/j2ee/dtds/web-app_2_3.dtd">
     
    <web-app>
     
    	<servlet>
    		<servlet-name>action</servlet-name>
    		<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
    		<init-param>
    			<param-name>config</param-name>
    			<param-value>/WEB-INF/struts-config.xml</param-value>
    		</init-param>
    	</servlet>
     
    	<servlet-mapping>
    		<servlet-name>action</servlet-name>
    		<url-pattern>*.do</url-pattern>
    	</servlet-mapping>
     
    </web-app>
    Et enfin ma JSP :
    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
    <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
    <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
    <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
     
    <jsp:include page="/layout/Header.jsp" flush="true" />
     
    <h1>Configuration des éléments</h1>
    <h2>Ajout dun nouvel élément</h2>
    <html:form name="ConfigAddElement" type="ot.form.ConfigAddElementBean" action="ConfigAddElement.do">
    	Nom : <html:text property="elementName" />
    </html:form>
    <html:link page="/Main.do">
    Retour au menu principal
    </html:link>
     
    <jsp:include page="/jsp/Footer.jsp" flush="true" />
    J'ai bien une classe Action nommé ConfigAddElementAction dans ot.action et une classe pour mon Form-bean ConfigAddElementBean dans ot.form.

    Quand je vais sur la page ConfigAddElement.do, la page reste blanche, pas de code source derrière et les logs me disent :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    15 févr. 2007 10:33:41 org.apache.struts.chain.commands.CreateActionForm execute
    ATTENTION: No FormBeanConfig found in module  under name ConfigAddElemenBean
    Si dans ma JSP j'enlève les <html:form>, ma page s'affiche correctement. Mais bon je veux afficher mon formulaire

    Merci de m'aider, çà a l'air d'un problème à la con en plus

  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
    Le nom que tu as donné à ton form-bean dans la balise form-bean du struts-config.xml est ConfigAddElement et non ConfigAddElementBean.

    Dans le mapping de ton Action, il faut donc remplacer ConfigAddElementBean par ConfigAddElement dans l'attribut name :
    Code xml : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    <action
    		path="/ConfigAddElement"
    		parameter="/view/ConfigAddElement.jsp"
    		type="ot.action.ConfigAddElementAction"
    		name="ConfigAddElement"
    		scope="request"
    		>
    		<forward name="ConfigAddElementError" path="/ConfigAddElementError.do"/>
    		<forward name="ConfigAddElementSuccess" path="/ConfigAddElementSuccess.do"/>
    </action>

  3. #3
    Nouveau membre du Club
    Profil pro
    Inscrit en
    Février 2007
    Messages
    50
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Février 2007
    Messages : 50
    Points : 38
    Points
    38
    Par défaut
    Citation Envoyé par c_nvy
    Le nom que tu as donné à ton form-bean dans la balise form-bean du struts-config.xml est ConfigAddElement et non ConfigAddElementBean.

    Dans le mapping de ton Action, il faut donc remplacer ConfigAddElementBean par ConfigAddElement dans l'attribut name :
    Code xml : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    <action
    		path="/ConfigAddElement"
    		parameter="/view/ConfigAddElement.jsp"
    		type="ot.action.ConfigAddElementAction"
    		name="ConfigAddElement"
    		scope="request"
    		>
    		<forward name="ConfigAddElementError" path="/ConfigAddElementError.do"/>
    		<forward name="ConfigAddElementSuccess" path="/ConfigAddElementSuccess.do"/>
    </action>
    Oui je l'ai vu je l'avais déjà changer, j'ai mis "ConfigAddElementForm" aux 2 et c'est toujours pareil.

  4. #4
    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
    Dans le mapping de ton Action, il manque un "t" à element.
    Remplace ConfigAddElemenForm par ConfigAddElementForm.

  5. #5
    Nouveau membre du Club
    Profil pro
    Inscrit en
    Février 2007
    Messages
    50
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Février 2007
    Messages : 50
    Points : 38
    Points
    38
    Par défaut
    J'ai corrigé et toujours une page blanche. J'ai remi la version 1.0 de Struts et le message d'erreur dans la log est :
    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
    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
    2007-02-15 11:29:04 StandardWrapperValve[action]: "Servlet.service()" pour la servlet action a généré une exception
    javax.servlet.ServletException: Exception creating bean of class ot.form.ConfigAddElementBean: java.lang.InstantiationException: ot.form.ConfigAddElementBean
    	at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:495)
    	at org.apache.jsp.ConfigAddElement_jsp._jspService(ConfigAddElement_jsp.java:74)
    	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:92)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
    	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:162)
    	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:240)
    	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:187)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
    	at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:627)
    	at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:382)
    	at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:306)
    	at org.apache.struts.actions.ForwardAction.perform(ForwardAction.java:161)
    	at org.apache.struts.action.ActionServlet.processActionPerform(ActionServlet.java:1787)
    	at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1586)
    	at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:492)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:696)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:198)
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:144)
    	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:209)
    	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:595)
    	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:432)
    	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:954)
    	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:138)
    	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:595)
    	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:432)
    	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:954)
    	at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2459)
    	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:132)
    	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:595)
    	at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:118)
    	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:593)
    	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:116)
    	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:593)
    	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:432)
    	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:954)
    	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:126)
    	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:595)
    	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:432)
    	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:954)
    	at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:152)
    	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
    	at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
    	at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
    	at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
    	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
    	at java.lang.Thread.run(Thread.java:534)
    ----- Root Cause -----
    javax.servlet.jsp.JspException: Exception creating bean of class ot.form.ConfigAddElementBean: java.lang.InstantiationException: ot.form.ConfigAddElementBean
    	at org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:568)
    	at org.apache.jsp.ConfigAddElement_jsp._jspx_meth_html_form_0(ConfigAddElement_jsp.java:88)
    	at org.apache.jsp.ConfigAddElement_jsp._jspService(ConfigAddElement_jsp.java:63)
    	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:92)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
    	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:162)
    	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:240)
    	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:187)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
    	at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:627)
    	at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:382)
    	at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:306)
    	at org.apache.struts.actions.ForwardAction.perform(ForwardAction.java:161)
    	at org.apache.struts.action.ActionServlet.processActionPerform(ActionServlet.java:1787)
    	at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1586)
    	at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:492)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:696)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:198)
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:144)
    	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:209)
    	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:595)
    	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:432)
    	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:954)
    	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:138)
    	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:595)
    	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:432)
    	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:954)
    	at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2459)
    	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:132)
    	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:595)
    	at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:118)
    	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:593)
    	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:116)
    	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:593)
    	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:432)
    	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:954)
    	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:126)
    	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:595)
    	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:432)
    	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:954)
    	at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:152)
    	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
    	at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
    	at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
    	at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
    	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
    	at java.lang.Thread.run(Thread.java:534)

  6. #6
    Nouveau membre du Club
    Profil pro
    Inscrit en
    Février 2007
    Messages
    50
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Février 2007
    Messages : 50
    Points : 38
    Points
    38
    Par défaut
    Il se complique vraiment la vie pour rien se Struts
    A la poubelle allez hop

Discussions similaires

  1. Réponses: 2
    Dernier message: 06/07/2009, 14h46
  2. Problème Java RMI - Stubs Not Found
    Par mamatt dans le forum API standards et tierces
    Réponses: 1
    Dernier message: 29/01/2009, 12h57
  3. Réponses: 17
    Dernier message: 31/10/2008, 14h53
  4. [MySQL] Problème insertion lors de la présence de double quote
    Par wormseric dans le forum PHP & Base de données
    Réponses: 2
    Dernier message: 26/01/2007, 18h23
  5. Problème de "cxControls.dcu" no found sur Delphi 5
    Par Clemsou dans le forum Langage
    Réponses: 2
    Dernier message: 16/08/2005, 12h50

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