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 :

java.lang.nullPointerException: Module 'null' not found


Sujet :

Struts 1 Java

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Candidat au Club
    Inscrit en
    Février 2011
    Messages
    1
    Détails du profil
    Informations forums :
    Inscription : Février 2011
    Messages : 1
    Par défaut java.lang.nullPointerException: Module 'null' not found
    Bonjour
    je suis débutant en JEE et en Frameworks
    j'ai essayé de déployer un premier programme Struts sous JBoss et avec eclipse mais j'ai rencontré l'erreur suivante:

    Etat HTTP 500 -

    type Rapport d'exception

    message

    description Le serveur a rencontr� une erreur interne () qui l'a emp�ch� de satisfaire la requ�te.

    exception

    org.apache.jasper.JasperException: java.lang.NullPointerException: Module 'null' not found.
    org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:515)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:411)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:322)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:249)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

    cause m�re

    java.lang.NullPointerException: Module 'null' not found.
    org.apache.struts.taglib.TagUtils.getModuleConfig(TagUtils.java:755)
    org.apache.struts.taglib.TagUtils.getModuleConfig(TagUtils.java:735)
    org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:818)
    org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:488)
    org.apache.jsp.pages.authentificationForm_jsp._jspx_meth_html_005fform_005f0(authentificationForm_jsp.java:150)
    org.apache.jsp.pages.authentificationForm_jsp._jspx_meth_html_005fhtml_005f0(authentificationForm_jsp.java:106)
    org.apache.jsp.pages.authentificationForm_jsp._jspService(authentificationForm_jsp.java:73)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:322)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:249)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
    note La trace compl�te de la cause m�re de cette erreur est disponible dans les fichiers journaux de JBoss Web/2.1.1.GA.
    JBoss Web/2.1.1.GA

    Mon fichier struts-config est le suivant:

    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 struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN"
     "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">
    <struts-config>
    <form-beans>
    <form-bean name="authentificationForm" type="actionform.AuthentificationForm"/>
    </form-beans>
    <global-exceptions></global-exceptions>
    <global-forwards></global-forwards>
    <action-mappings>
    <action path="/Authentification"
    type="action.AuthentificationAction"
    name="authentificationForm"
    scope = "request"
    input="/WebContent/pages/authentificationForm.jsp">
    <forward name="erreurs" path="/WebContent/pages/Erreurs.jsp"/>
    <forward name="succes"  path="/WebContent/pages/succes.jsp"/>
    </action>
    </action-mappings>
    </struts-config>
    Mon fichier 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
    21
    22
    23
    24
    25
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
      <display-name>installationstruts</display-name>
      <welcome-file-list>
        <welcome-file>index.html</welcome-file>
        <welcome-file>index.htm</welcome-file>
        <welcome-file>index.jsp</welcome-file>
        <welcome-file>default.html</welcome-file>
        <welcome-file>default.htm</welcome-file>
        <welcome-file>WebContent/pages/authentificationForm.jsp</welcome-file>
      </welcome-file-list>
      <servlet>
      <servlet-name>action</servlet-name>
      <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
      <init-param>
      <param-name>config</param-name>
      <param-value>/WebContent/WEB-INF/struts-config.xml</param-value>
      </init-param>
      <load-on-startup>2</load-on-startup>
      </servlet>
      <servlet-mapping>
      <servlet-name>action</servlet-name>
      <url-pattern>*.do</url-pattern>
      </servlet-mapping>
    </web-app>
    mon formulaire 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
    17
    <%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
    <%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
    <%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html:html>
    <head>
    <title>Authentification</title>
    <html:base/>
    </head>
    <body>
    <html:form action="Authentification.do">
    Identifiant : <html:text property="identifiant"/><br/>
    Mot de passe : <html:text property="motdepasse"/><br/>
    <html:submit value="Envoyer"/>
    </html:form>
    </body>
    </html:html>
    Ma classe action:

    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
    package action;
     
    import javax.servlet.http.*;
    import org.apache.struts.action.*;
    import actionform.AuthentificationForm;
     
    public class AuthentificationAction extends Action {
     
        public ActionForward execute(HttpServlet request, HttpServlet response,
                ActionMapping mapping,ActionForm form) 
        {
            AuthentificationForm authentificationForm = (AuthentificationForm) form;
     
            if (authentificationForm.getIdentifiant() == "yazid" && authentificationForm.getMotdepasse() == "yazid")
            {
                return mapping.findForward("succes");
            }
            else
            {
                return mapping.findForward("erreurs");
            }
        }
     
    }
    et enfin mon beans actionForm:

    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
    package actionform;
    import org.apache.struts.action.ActionForm;
     
    @SuppressWarnings("serial")
    public class AuthentificationForm extends ActionForm {
     
        private String identifiant;
        private String motdepasse;
     
        public String getIdentifiant()
        {
            return identifiant;
        }
     
        public String getMotdepasse()
        {
            return motdepasse;
        }
     
        public void setIdentifiant(String identifiant)
        {
            this.identifiant = identifiant;
        }
     
        public void setMotdepasse(String motdepasse)
        {
            this.motdepasse = motdepasse;
        }
    }
    es que quelqu'un pourrait m'aider car ça fait 2 jours que je suis dessus et je n'arrive toujours pas à savoir ou est l'erreur
    Merci d'avance.

  2. #2
    Membre éprouvé Avatar de wiss85
    Homme Profil pro
    Inscrit en
    Novembre 2009
    Messages
    90
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 40
    Localisation : Tunisie

    Informations forums :
    Inscription : Novembre 2009
    Messages : 90
    Par défaut
    vérifier le fichier struts-config.xml

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

    Informations forums :
    Inscription : Juillet 2009
    Messages : 10
    Par défaut
    Salut Yazid,

    T'as pu trouver une solution pour ton prbm ?? merci

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

Discussions similaires

  1. Réponses: 1
    Dernier message: 15/02/2011, 16h53
  2. Réponses: 3
    Dernier message: 16/05/2010, 21h20
  3. java.lang.NullPointerException: Module 'null' not found
    Par yacine.dev dans le forum Struts 1
    Réponses: 1
    Dernier message: 26/02/2010, 10h26
  4. Module 'null' not found
    Par gazier20 dans le forum Struts 1
    Réponses: 5
    Dernier message: 30/05/2007, 23h37

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