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

Wildfly/JBoss Java Discussion :

Securité et exception avec JSF


Sujet :

Wildfly/JBoss Java

  1. #21
    Expert éminent sénior
    Avatar de tchize_
    Homme Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Avril 2007
    Messages
    25 481
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 44
    Localisation : Belgique

    Informations professionnelles :
    Activité : Ingénieur développement logiciels
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Avril 2007
    Messages : 25 481
    Points : 48 806
    Points
    48 806
    Par défaut
    Des spécialistes jboss auront peut être la réponse, je transfère le thread.

  2. #22
    Candidat au Club
    Inscrit en
    Septembre 2008
    Messages
    16
    Détails du profil
    Informations forums :
    Inscription : Septembre 2008
    Messages : 16
    Points : 2
    Points
    2
    Par défaut
    Merci pour l'aide donc pas de solution à ce problème je pense.
    le fichier web.xml est correct. mais la redirection ne se fait pas meme si la page exist dans le context de projet.

  3. #23
    Rédacteur

    Profil pro
    Inscrit en
    Juin 2003
    Messages
    4 184
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juin 2003
    Messages : 4 184
    Points : 5 059
    Points
    5 059
    Par défaut
    essaye de mettre la redirection dans le web.xml commun à toutes les web app:

    /jboss-web.deployer/conf/web.xm
    et au lieu d'un page JSP/JSF; utilise une simple page HTML pour tester..

  4. #24
    Candidat au Club
    Inscrit en
    Septembre 2008
    Messages
    16
    Détails du profil
    Informations forums :
    Inscription : Septembre 2008
    Messages : 16
    Points : 2
    Points
    2
    Par défaut
    salut,
    franchement j'ai pas bien saisi l'idée
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    essaye de mettre la redirection dans le web.xml commun à toutes les web app:
    
    Citation:
    
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    /jboss-web.deployer/conf/web.xml
    et au lieu d'une page JSP/JSF; utilise une simple page HTML pour tester..
    merci de bien éclaircir votre idée.

  5. #25
    Rédacteur

    Profil pro
    Inscrit en
    Juin 2003
    Messages
    4 184
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juin 2003
    Messages : 4 184
    Points : 5 059
    Points
    5 059
    Par défaut
    au lieu de mettre la définition dans le web.xml de l'application, essaye de le faire dans le web.xml partagé qui se trouve dans /ton-dossier-de-déploiement/jboss-web.deployer/conf/web.xml

    ce fichier est partagé par toutes les applications déployées.

  6. #26
    Candidat au Club
    Inscrit en
    Septembre 2008
    Messages
    16
    Détails du profil
    Informations forums :
    Inscription : Septembre 2008
    Messages : 16
    Points : 2
    Points
    2
    Par défaut
    voila la sortie de JBoss, le problème est au niveau de FacesContext,
    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
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    
    Caused by: java.lang.NullPointerException
            at ma.perenity.presentation.LoginForm.authentificate(LoginForm.java:96)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:585)
            at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:126)
    
            ... 27 more
    09:29:04,843 ERROR [[jsp]] Servlet.service() for servlet jsp threw exception
    javax.servlet.jsp.JspException: Cannot find FacesContext
            at javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:405)
    
            at com.sun.faces.taglib.jsf_core.ViewTag.doStartTag(ViewTag.java:105)
            at org.apache.jsp.redirectErreur_jsp._jspx_meth_f_view_0(org.apache.jsp.
    redirectErreur_jsp:99)
            at org.apache.jsp.redirectErreur_jsp._jspService(org.apache.jsp.redirect
    Erreur_jsp:75)
            at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
            at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper
    .java:322)
            at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:3
    14)
            at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
    icationFilterChain.java:252)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
    ilterChain.java:173)
            at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDisp
    atcher.java:672)
            at org.apache.catalina.core.ApplicationDispatcher.processRequest(Applica
    tionDispatcher.java:465)
            at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationD
    ispatcher.java:398)
            at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDis
    patcher.java:301)
            at org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.j
    ava:362)
            at org.apache.catalina.core.StandardHostValve.throwable(StandardHostValv
    e.java:211)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
    ava:134)
            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
    ava:105)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
    ve.java:107)
            at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
    a:148)
            at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
    :856)
            at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
    ssConnection(Http11Protocol.java:744)
            at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpo
    int.java:527)
            at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWor
    kerThread.java:112)
            at java.lang.Thread.run(Thread.java:595)
    09:29:04,843 ERROR [[localhost]] Exception Processing ErrorPage[exceptionType=ja
    vax.servlet.ServletException, location=/redirectErreur.jsp]
    javax.servlet.ServletException: Cannot find FacesContext
            at org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageC
    ontextImpl.java:848)
            at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageCon
    textImpl.java:781)
            at org.apache.jsp.redirectErreur_jsp._jspService(org.apache.jsp.redirect
    Erreur_jsp:84)
            at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
            at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper
    .java:322)
            at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:3
    14)
            at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
    icationFilterChain.java:252)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
    ilterChain.java:173)
            at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDisp
    atcher.java:672)
            at org.apache.catalina.core.ApplicationDispatcher.processRequest(Applica
    tionDispatcher.java:465)
            at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationD
    ispatcher.java:398)
            at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDis
    patcher.java:301)
            at org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.j
    ava:362)
            at org.apache.catalina.core.StandardHostValve.throwable(StandardHostValv
    e.java:211)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
    ava:134)
            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
    ava:105)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
    ve.java:107)
            at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
    a:148)
            at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
    :856)
            at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
    ssConnection(Http11Protocol.java:744)
            at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpo
    int.java:527)
            at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWor
    kerThread.java:112)
            at java.lang.Thread.run(Thread.java:595)

    pour l'aidé de deployé au niveau de fichier de JBoss, c'est l'a testée mais pas de resultat toujours les mêmes résultats. la question qui se pose : est ce que il y a quelqu'un qui a vécu le même problème, et il a arrivé à le résoudre ou bien il n'y a pas de solution?? ou bien il y a un autre chemin qui peut mener vers le meme but sachant qu'il soit optimal? Merci pour l'aide.

  7. #27
    Expert éminent sénior
    Avatar de tchize_
    Homme Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Avril 2007
    Messages
    25 481
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 44
    Localisation : Belgique

    Informations professionnelles :
    Activité : Ingénieur développement logiciels
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Avril 2007
    Messages : 25 481
    Points : 48 806
    Points
    48 806
    Par défaut
    09:29:04,843 ERROR [[localhost]] Exception Processing ErrorPage[exceptionType=ja
    vax.servlet.ServletException, location=/redirectErreur.jsp]
    javax.servlet.ServletException: Cannot find FacesContext
    La redirection a bien lieu, mais t'as un erreur dans ta gestion d'erreur. C'est pas un simple jsp que tu utilise, Tu sessaie d'utiliser du jsf, tu ne dois donc pas faire le redirect vers redirectErreur.jsp, mais vers redirectErreur.jsf !

  8. #28
    Candidat au Club
    Inscrit en
    Septembre 2008
    Messages
    16
    Détails du profil
    Informations forums :
    Inscription : Septembre 2008
    Messages : 16
    Points : 2
    Points
    2
    Par défaut
    Bon Merci pour l'aide, quand je supprime dans ma page tous les tags JSF, la redirection se faite tres bien en gardant /redirectErreur.jsp dans le fichier web.xml
    et quand j'ajout des tags JSF dans la page redirectErreur.jsp et je modifie le fichier web.xml ( /redirectErreur.jsf ) la redirection ne se fait pas.
    donc le probleme vient de ce coté
    Merci pour les informations.

    le problème se converge vers la resolution!!!!!!!!!

  9. #29
    Futur Membre du Club
    Profil pro
    Inscrit en
    Mars 2006
    Messages
    18
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mars 2006
    Messages : 18
    Points : 6
    Points
    6
    Par défaut
    Si tu cherches (encore) la solution , je pense tout simplement que tu dois créer un gestionnaire d'exceptions personnalisé.

    J'ai exactement le même problème que toi et en fait, JSF (myfaces) implémente un gestionnaire d'exceptions....

    Va voir la dessus :

    http://josephmarques.wordpress.com/2...tion-handling/

    Lucas

Discussions similaires

  1. Gestion des exceptions avec JSF RI 1.2
    Par darsky dans le forum JSF
    Réponses: 5
    Dernier message: 12/11/2008, 12h25
  2. gestion d'exception avec jsf
    Par Jacobian dans le forum JSF
    Réponses: 4
    Dernier message: 24/09/2008, 14h49
  3. Réponses: 2
    Dernier message: 14/02/2005, 14h26
  4. Réponses: 3
    Dernier message: 09/11/2004, 14h43
  5. INSO Filter : "USER-defined exception" avec ctx_do
    Par Wiztiti dans le forum Oracle
    Réponses: 2
    Dernier message: 01/06/2004, 16h14

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