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

Servlets/JSP Java Discussion :

Problème de passage d'une page XHTML vers page JSP


Sujet :

Servlets/JSP Java

  1. #1
    Membre à l'essai
    Homme Profil pro
    Développeur Java
    Inscrit en
    Mai 2008
    Messages
    26
    Détails du profil
    Informations personnelles :
    Sexe : Homme

    Informations professionnelles :
    Activité : Développeur Java
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Mai 2008
    Messages : 26
    Points : 17
    Points
    17
    Par défaut Problème de passage d'une page XHTML vers page JSP
    bonjour

    j'ai une page d'authentification de type xhtml codée par richfaces je voulais

    passer de cette page vers une page jsp en utilisant le fichier faces-config.xml

    j'ai configurer mon bean manager et le navigation Rule de faces-config.xml

    mais ça pas marcher pourtant j'ai pu me naviguer vers des autres page xhtml.

    je suis vraiment bloqué dan cette étape

  2. #2
    Membre émérite
    Avatar de Nesmontou
    Homme Profil pro
    Architecte logiciel
    Inscrit en
    Septembre 2004
    Messages
    1 612
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 42
    Localisation : France, Nord (Nord Pas de Calais)

    Informations professionnelles :
    Activité : Architecte logiciel
    Secteur : Finance

    Informations forums :
    Inscription : Septembre 2004
    Messages : 1 612
    Points : 2 969
    Points
    2 969
    Par défaut
    Bonjour,

    Il faudrait nous montrer un peu de code / configuration pour que l'on puisse t'aider

  3. #3
    Membre à l'essai
    Homme Profil pro
    Développeur Java
    Inscrit en
    Mai 2008
    Messages
    26
    Détails du profil
    Informations personnelles :
    Sexe : Homme

    Informations professionnelles :
    Activité : Développeur Java
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Mai 2008
    Messages : 26
    Points : 17
    Points
    17
    Par défaut
    voilà ma page richfaces et elle fonctionne correctement sous Jboss

    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
     
    <html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:a4j="http://richfaces.org/a4j"
    xmlns:rich="http://richfaces.org/rich">
    <head>
    <title>Authentification</title> 
    <style type='text/css'>
    .containerB{
    background-image:url(./image/cloud.jpg);
    background-repeat:no-repeat;
    background-size: 100%;
    }
    </style>
     
    </head>
    <body class="containerB">
     
        <div align="center">  
     
         <br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><rich:spacer width="1" height="50" />          
          <rich:panel style="width:320px;">  
            <f:facet name="header">  
                <h:outputText value="#{loginController.text}"></h:outputText>  
            </f:facet><a4j:form reRender="_panel_test2" ajaxSubmit="true">
            <h:panelGrid columns="2">  
     
                <h:outputText value="Login"/>
    			<h:inputText value="#{loginController.userName}"/>  
                <h:outputText value="Mot de passe:"/>  
     
    					<h:inputSecret value="#{loginController.password}"></h:inputSecret>
     
    		  <h:outputText value="Role" />
     
                  <rich:comboBox value="#{loginController.role}"  defaultLabel="select a role...">
    							<f:selectItems  value="#{loginController.roleItems}"/>
    						</rich:comboBox>  
     
     
     
     
        <a4j:commandButton value="Login" action="#{loginController.envoyer}"  oncomplete="javascript:Richfaces.showModalPanel('_panel_test2',{left:'auto',top:'auto'})">
     
        </a4j:commandButton>
     
            </h:panelGrid>
             </a4j:form>  
          </rich:panel>    
     
          <br /><br /><br /><br /><rich:modalPanel id="_panel_test2" height="100" width="200">
     
    <f:facet name="header">Authentification</f:facet>
    <f:facet name="controls">
    <h:graphicImage value="./image/close.png" style="cursor:pointer"
    onclick="Richfaces.hideModalPanel('_panel_test2')" />
    </f:facet>
    <rich:panel style="border:0;height:40px">
     
    <h:panelGrid id="login" border="0" columns="1">
     
    <h:outputText value="#{loginController.y} "></h:outputText>
          <h:form>   
     
    	<h:outputText value="#{loginController.message} "></h:outputText> 
     
    	 </h:form>  
    	</h:panelGrid> </rich:panel>
     
    	</rich:modalPanel>
          </div>  
     
     
     
    </body>
    </html>
    voilà le 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
    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
     
    <?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>LoginRichFaces</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>test.jsp</welcome-file>
      </welcome-file-list>
     <context-param>
        <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
        <param-value>com.sun.facelets.FaceletViewHandler</param-value>
      </context-param>
     
     
      <context-param>
        <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
        <param-value>.xhtml</param-value>
       </context-param>
     
     
     
      <context-param>
        <param-name>org.richfaces.CONTROL_SKINNING</param-name>
        <param-value>enable</param-value>
      </context-param>
      <context-param>
        <param-name>org.richfaces.SKIN</param-name>
        <param-value>emeraldTown</param-value>
      </context-param>
      <filter>
        <display-name>RichFaces Filter</display-name>
        <filter-name>richfaces</filter-name>
        <filter-class>org.ajax4jsf.Filter</filter-class>
      </filter>
      <filter-mapping>
        <filter-name>richfaces</filter-name>
        <servlet-name>Faces Servlet</servlet-name>
        <dispatcher>REQUEST</dispatcher>
        <dispatcher>FORWARD</dispatcher>
        <dispatcher>INCLUDE</dispatcher>
      </filter-mapping>
     
     
      <servlet>
        <servlet-name>Faces Servlet</servlet-name>
        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
      </servlet>
      <servlet-mapping>
        <servlet-name>Faces Servlet</servlet-name>
     
        <url-pattern>*.jsp</url-pattern>
      </servlet-mapping>
    </web-app>
    voilà le code de faces-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
     
     
    <?xml version="1.0" encoding="UTF-8"?>
     
    <faces-config
        xmlns="http://java.sun.com/xml/ns/javaee"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd"
        version="1.2">
     
        <managed-bean>
    		<managed-bean-name>loginController</managed-bean-name>
    		<managed-bean-class>org.esprit.LoginController</managed-bean-class>
    		<managed-bean-scope>session</managed-bean-scope>
    	</managed-bean>
        <navigation-rule>
        	<display-name>login.xhtml</display-name>
        	<from-view-id>/login.xhtml</from-view-id>
        	<navigation-case>
        		<from-outcome>loginAdmin-success</from-outcome>
        		<to-view-id>/test.jsp</to-view-id>
        	</navigation-case>
        </navigation-rule>
     
     
     
    </faces-config>
    j'ai pas compris pourquoi il n'accepte pas d'afficher la page jsp pourtant il m'affiche les page d'extention xhtml !!!!

Discussions similaires

  1. Réponses: 1
    Dernier message: 23/05/2010, 09h08
  2. Problème de passage PChar à une DLL
    Par yupa dans le forum Débuter
    Réponses: 7
    Dernier message: 14/05/2009, 14h38
  3. [regex]Passage d'une regexp Ruby vers Java
    Par GLDavid dans le forum Collection et Stream
    Réponses: 6
    Dernier message: 11/09/2007, 09h37
  4. [VBA]Problème de passage dans une boucle
    Par Halima91 dans le forum VBA Access
    Réponses: 4
    Dernier message: 30/03/2007, 04h09
  5. problème de passage d'une variable
    Par khayri dans le forum Struts 1
    Réponses: 15
    Dernier message: 12/01/2007, 09h30

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