Developpement personnel club Forum
Vous souhaitez réagir à ce message ? Créez un compte en quelques clics ou connectez-vous pour continuer.
Developpement personnel club Forum

Forum réservé au membre du club developpement-personnel-club.com
 
AccueilAccueil  RechercherRechercher  Dernières imagesDernières images  S'enregistrerS'enregistrer  Connexion  
Le deal à ne pas rater :
Funko POP! Jumbo One Piece Kaido Dragon Form : où l’acheter ?
Voir le deal

 

 Aidez moi Svp

Aller en bas 
2 participants
AuteurMessage
icha




Nombre de messages : 7
Date d'inscription : 13/05/2009

Aidez moi Svp Empty
MessageSujet: Aidez moi Svp   Aidez moi Svp EmptyMer 13 Mai - 18:59

Bonjour

je me bloque au niveau d'une application Gestion des journaux

Bon voilà l'énonce :
On souhaite gérer les journaux ainsi que leurs journalistes un journaliste travail pour un seul journal et peut rédiger plusieurs articles.
Le salaire des journalistes est en fonction de nombre d'article rédiger par celui-ci sachant que chaque journaliste a un salaire de base de 3000 dh

L'analyse a donnée le shéma relationnel suivant

journal(numjournal,Nom,dateAparu)
journaliste(numJournaliste,nom,adresse,#numjournal)
Article(NumArt,titre,description,dateredaction)
Rediger(NumLigneRedaction,#Numjournaliste,#NumArt,prix)

travail à réaliser :
1-créer le shéma GestionJournal avec les différentes tables,Insérer quelques lignes pour le test
2-Créer une page permettant de mettre à jour les journaliste:
--Ajout(le numéro de journal est récupéré automatiquement à partir de la base de données (liste déroulante)
--SUppression (avec confirmation)
--Modification(avec confirmation)
--Affichage de tous les journaliste dans une liste
3-créer une fenetre permettant d'afficher le liste des articles d'un journaliste choisi dans une liste récupérer automatiquement à partir de la base de données dans une table avec une possibilité d'ajouter un article.
4-Ajouter dans la page créer dans la question 2 un lien pour chaque journaliste permettant d'afficher les articles rédigés par celui-ci.
5-créer une page permettant de rediger un article (ajouter un enregistrement dans la table rédiger), le numéro de journaliste et de l'article doit etre récupéré automatiquement à partir de la base de données(utiliser des listes deroulantes ).
6-créer une page permettant de rechercher un article par titre ou par mots clés (seulement les articles répondant aux critéres de recherche seront affichés dans la table)
7-créer une page permetttant d'afficher pour une date données la liste de journalistes avec leur salaire de ce mois.
8-Gestion de droit:
--créer 3 profiles:public,journaliste et administrateur
--le profile public ne peut faire que la consultation des articles
--le profil journaliste il peut en plus des droits du profil public,consulter son salaire pour un mois données(la page de la qst 9),ecrire une article
--le profile admin:droit d'admin
9:créer une page permettant d'afficher le salaire du journaliste connecter dans l'application

N.B respect les normes de developpement java/j2ee

utiliser Myeclipse comme ide + postgresql Base de données


Réponse j'ai réaliser jusqu'a présent


Qst 1:une Base de données postgresql
j'ai crée mon projet web sous MyEclipse j'ai génére HIbernate Capabilite bref j'ai suivi les etapes du video sur ce lien :
sur http://www.translate.google.com/tran...l=en&tl=fr [ Lien ]



bon je vais citer les etapes de creation de mon projet

1) Premiérement sous myeclipse j'ai crée un projet web
2) j'ai ajouter hibernate Capabilites + jar de ma base données postgresql et les jar de hibernate
3) je me suis connecté a ma BD sous myeclipse en utilisant User Mdp et CHaine de connection tous c bien dérouler j'ai générer mes fichiers de mapping tous comme les videos situer dans le liens

voilà mes classe que j'ai jusqu'a mnt


Package Dao


class ArticleDao.java

Code:

package Dao;
// default package
 
 
import java.util.Date;
import java.util.List;
import java.util.Set;
 
import metier.Article;
 
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.hibernate.LockMode;
import org.hibernate.Query;
import org.hibernate.criterion.Example;
 
 
/**
    * A data access object (DAO) providing persistence and search support for Article entities.
          * Transaction control of the save(), update() and delete() operations
      can directly support Spring container-managed transactions or they can be augmented   to handle user-managed Spring transactions.
      Each of these methods provides additional information for how to configure it for the desired type of transaction control.    
    * @see .Article
  * @author MyEclipse Persistence Tools
 */
 
public class ArticleDAO extends BaseHibernateDAO  {
    private static final Log log = LogFactory.getLog(ArticleDAO.class);
   //property constants
   public static final String TITRE = "titre";
   public static final String DESCRIPTION = "description";
 
 
 
   
    public void save(Article transientInstance) {
        log.debug("saving Article instance");
        try {
            getSession().save(transientInstance);
            log.debug("save successful");
        } catch (RuntimeException re) {
            log.error("save failed", re);
            throw re;
        }
    }
   
   public void delete(Article persistentInstance) {
        log.debug("deleting Article instance");
        try {
            getSession().delete(persistentInstance);
            log.debug("delete successful");
        } catch (RuntimeException re) {
            log.error("delete failed", re);
            throw re;
        }
    }
   
    public Article findById( java.lang.Integer id) {
        log.debug("getting Article instance with id: " + id);
        try {
            Article instance = (Article) getSession()
                    .get("Article", id);
            return instance;
        } catch (RuntimeException re) {
            log.error("get failed", re);
            throw re;
        }
    }
   
   
    public List findByExample(Article instance) {
        log.debug("finding Article instance by example");
        try {
            List results = getSession()
                    .createCriteria("Article")
                    .add(Example.create(instance))
            .list();
            log.debug("find by example successful, result size: " + results.size());
            return results;
        } catch (RuntimeException re) {
            log.error("find by example failed", re);
            throw re;
        }
    }   
   
    public List findByProperty(String propertyName, Object value) {
      log.debug("finding Article instance with property: " + propertyName
            + ", value: " + value);
      try {
        String queryString = "from Article as model where model."
                          + propertyName + "= ?";
        Query queryObject = getSession().createQuery(queryString);
       queryObject.setParameter(0, value);
       return queryObject.list();
      } catch (RuntimeException re) {
        log.error("find by property name failed", re);
        throw re;
      }
   }
 
   public List findByTitre(Object titre
   ) {
      return findByProperty(TITRE, titre
      );
   }
   
   public List findByDescription(Object description
   ) {
      return findByProperty(DESCRIPTION, description
      );
   }
   
 
   public List findAll() {
      log.debug("finding all Article instances");
      try {
         String queryString = "from Article";
           Query queryObject = getSession().createQuery(queryString);
          return queryObject.list();
      } catch (RuntimeException re) {
         log.error("find all failed", re);
         throw re;
      }
   }
   
    public Article merge(Article detachedInstance) {
        log.debug("merging Article instance");
        try {
            Article result = (Article) getSession()
                    .merge(detachedInstance);
            log.debug("merge successful");
            return result;
        } catch (RuntimeException re) {
            log.error("merge failed", re);
            throw re;
        }
    }
 
    public void attachDirty(Article instance) {
        log.debug("attaching dirty Article instance");
        try {
            getSession().saveOrUpdate(instance);
            log.debug("attach successful");
        } catch (RuntimeException re) {
            log.error("attach failed", re);
            throw re;
        }
    }
   
    public void attachClean(Article instance) {
        log.debug("attaching clean Article instance");
        try {
            getSession().lock(instance, LockMode.NONE);
            log.debug("attach successful");
        } catch (RuntimeException re) {
            log.error("attach failed", re);
            throw re;
        }
    }
}
 

Revenir en haut Aller en bas
icha




Nombre de messages : 7
Date d'inscription : 13/05/2009

Aidez moi Svp Empty
MessageSujet: Re: Aidez moi Svp   Aidez moi Svp EmptyMer 13 Mai - 19:00

Class JournalDao.java
Code:

package Dao;
// default package


import java.util.Date;
import java.util.List;
import java.util.Set;

import metier.Journal;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.hibernate.LockMode;
import org.hibernate.Query;
import org.hibernate.criterion.Example;


/**
    * A data access object (DAO) providing persistence and search support for Journal entities.
          * Transaction control of the save(), update() and delete() operations
      can directly support Spring container-managed transactions or they can be augmented   to handle user-managed Spring transactions.
      Each of these methods provides additional information for how to configure it for the desired type of transaction control.    
    * @see .Journal
  * @author MyEclipse Persistence Tools
 */

public class JournalDAO extends BaseHibernateDAO  {
    private static final Log log = LogFactory.getLog(JournalDAO.class);
   //property constants
   public static final String NOM = "nom";



   
    public void save(Journal transientInstance) {
        log.debug("saving Journal instance");
        try {
            getSession().save(transientInstance);
            log.debug("save successful");
        } catch (RuntimeException re) {
            log.error("save failed", re);
            throw re;
        }
    }
   
   public void delete(Journal persistentInstance) {
        log.debug("deleting Journal instance");
        try {
            getSession().delete(persistentInstance);
            log.debug("delete successful");
        } catch (RuntimeException re) {
            log.error("delete failed", re);
            throw re;
        }
    }
   
    public Journal findById( java.lang.Integer id) {
        log.debug("getting Journal instance with id: " + id);
        try {
            Journal instance = (Journal) getSession()
                    .get("Journal", id);
            return instance;
        } catch (RuntimeException re) {
            log.error("get failed", re);
            throw re;
        }
    }
   
   
    public List findByExample(Journal instance) {
        log.debug("finding Journal instance by example");
        try {
            List results = getSession()
                    .createCriteria("Journal")
                    .add(Example.create(instance))
            .list();
            log.debug("find by example successful, result size: " + results.size());
            return results;
        } catch (RuntimeException re) {
            log.error("find by example failed", re);
            throw re;
        }
    }   
   
    public List findByProperty(String propertyName, Object value) {
      log.debug("finding Journal instance with property: " + propertyName
            + ", value: " + value);
      try {
        String queryString = "from Journal as model where model."
                          + propertyName + "= ?";
        Query queryObject = getSession().createQuery(queryString);
       queryObject.setParameter(0, value);
       return queryObject.list();
      } catch (RuntimeException re) {
        log.error("find by property name failed", re);
        throw re;
      }
   }

   public List findByNom(Object nom
   ) {
      return findByProperty(NOM, nom
      );
   }
   

   public List findAll() {
      log.debug("finding all Journal instances");
      try {
         String queryString = "from Journal";
           Query queryObject = getSession().createQuery(queryString);
          return queryObject.list();
      } catch (RuntimeException re) {
         log.error("find all failed", re);
         throw re;
      }
   }
   
    public Journal merge(Journal detachedInstance) {
        log.debug("merging Journal instance");
        try {
            Journal result = (Journal) getSession()
                    .merge(detachedInstance);
            log.debug("merge successful");
            return result;
        } catch (RuntimeException re) {
            log.error("merge failed", re);
            throw re;
        }
    }

    public void attachDirty(Journal instance) {
        log.debug("attaching dirty Journal instance");
        try {
            getSession().saveOrUpdate(instance);
            log.debug("attach successful");
        } catch (RuntimeException re) {
            log.error("attach failed", re);
            throw re;
        }
    }
   
    public void attachClean(Journal instance) {
        log.debug("attaching clean Journal instance");
        try {
            getSession().lock(instance, LockMode.NONE);
            log.debug("attach successful");
        } catch (RuntimeException re) {
            log.error("attach failed", re);
            throw re;
        }
    }
}


class JOurnalisteDao.java
Code:

package Dao;
// default package


import java.util.List;
import java.util.Set;

import metier.Journaliste;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.hibernate.LockMode;
import org.hibernate.Query;
import org.hibernate.criterion.Example;


/**
    * A data access object (DAO) providing persistence and search support for Journaliste entities.
          * Transaction control of the save(), update() and delete() operations
      can directly support Spring container-managed transactions or they can be augmented   to handle user-managed Spring transactions.
      Each of these methods provides additional information for how to configure it for the desired type of transaction control.    
    * @see .Journaliste
  * @author MyEclipse Persistence Tools
 */

public class JournalisteDAO extends BaseHibernateDAO  {
    private static final Log log = LogFactory.getLog(JournalisteDAO.class);
   //property constants
   public static final String NOM = "nom";
   public static final String ADRESSE = "adresse";



   
    public void save(Journaliste transientInstance) {
        log.debug("saving Journaliste instance");
        try {
            getSession().save(transientInstance);
            log.debug("save successful");
        } catch (RuntimeException re) {
            log.error("save failed", re);
            throw re;
        }
    }
   
   public void delete(Journaliste persistentInstance) {
        log.debug("deleting Journaliste instance");
        try {
            getSession().delete(persistentInstance);
            log.debug("delete successful");
        } catch (RuntimeException re) {
            log.error("delete failed", re);
            throw re;
        }
    }
   
    public Journaliste findById( java.lang.Integer id) {
        log.debug("getting Journaliste instance with id: " + id);
        try {
            Journaliste instance = (Journaliste) getSession()
                    .get("Journaliste", id);
            return instance;
        } catch (RuntimeException re) {
            log.error("get failed", re);
            throw re;
        }
    }
   
   
    public List findByExample(Journaliste instance) {
        log.debug("finding Journaliste instance by example");
        try {
            List results = getSession()
                    .createCriteria("Journaliste")
                    .add(Example.create(instance))
            .list();
            log.debug("find by example successful, result size: " + results.size());
            return results;
        } catch (RuntimeException re) {
            log.error("find by example failed", re);
            throw re;
        }
    }   
   
    public List findByProperty(String propertyName, Object value) {
      log.debug("finding Journaliste instance with property: " + propertyName
            + ", value: " + value);
      try {
        String queryString = "from Journaliste as model where model."
                          + propertyName + "= ?";
        Query queryObject = getSession().createQuery(queryString);
       queryObject.setParameter(0, value);
       return queryObject.list();
      } catch (RuntimeException re) {
        log.error("find by property name failed", re);
        throw re;
      }
   }

   public List findByNom(Object nom
   ) {
      return findByProperty(NOM, nom
      );
   }
   
   public List findByAdresse(Object adresse
   ) {
      return findByProperty(ADRESSE, adresse
      );
   }
   

   public List findAll() {
      log.debug("finding all Journaliste instances");
      try {
         String queryString = "from Journaliste";
           Query queryObject = getSession().createQuery(queryString);
          return queryObject.list();
      } catch (RuntimeException re) {
         log.error("find all failed", re);
         throw re;
      }
   }
   
    public Journaliste merge(Journaliste detachedInstance) {
        log.debug("merging Journaliste instance");
        try {
            Journaliste result = (Journaliste) getSession()
                    .merge(detachedInstance);
            log.debug("merge successful");
            return result;
        } catch (RuntimeException re) {
            log.error("merge failed", re);
            throw re;
        }
    }

    public void attachDirty(Journaliste instance) {
        log.debug("attaching dirty Journaliste instance");
        try {
            getSession().saveOrUpdate(instance);
            log.debug("attach successful");
        } catch (RuntimeException re) {
            log.error("attach failed", re);
            throw re;
        }
    }
   
    public void attachClean(Journaliste instance) {
        log.debug("attaching clean Journaliste instance");
        try {
            getSession().lock(instance, LockMode.NONE);
            log.debug("attach successful");
        } catch (RuntimeException re) {
            log.error("attach failed", re);
            throw re;
        }
    }
}
Revenir en haut Aller en bas
icha




Nombre de messages : 7
Date d'inscription : 13/05/2009

Aidez moi Svp Empty
MessageSujet: Re: Aidez moi Svp   Aidez moi Svp EmptyMer 13 Mai - 19:04

class RedigerDao
Code:

package Dao;
// default package


import java.util.List;

import metier.Rediger;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.hibernate.LockMode;
import org.hibernate.Query;
import org.hibernate.criterion.Example;


/**
    * A data access object (DAO) providing persistence and search support for Rediger entities.
          * Transaction control of the save(), update() and delete() operations
      can directly support Spring container-managed transactions or they can be augmented   to handle user-managed Spring transactions.
      Each of these methods provides additional information for how to configure it for the desired type of transaction control.    
    * @see .Rediger
  * @author MyEclipse Persistence Tools
 */

public class RedigerDAO extends BaseHibernateDAO  {
    private static final Log log = LogFactory.getLog(RedigerDAO.class);
   //property constants
   public static final String PRIX = "prix";



   
    public void save(Rediger transientInstance) {
        log.debug("saving Rediger instance");
        try {
            getSession().save(transientInstance);
            log.debug("save successful");
        } catch (RuntimeException re) {
            log.error("save failed", re);
            throw re;
        }
    }
   
   public void delete(Rediger persistentInstance) {
        log.debug("deleting Rediger instance");
        try {
            getSession().delete(persistentInstance);
            log.debug("delete successful");
        } catch (RuntimeException re) {
            log.error("delete failed", re);
            throw re;
        }
    }
   
    public Rediger findById( java.lang.Integer id) {
        log.debug("getting Rediger instance with id: " + id);
        try {
            Rediger instance = (Rediger) getSession()
                    .get("Rediger", id);
            return instance;
        } catch (RuntimeException re) {
            log.error("get failed", re);
            throw re;
        }
    }
   
   
    public List findByExample(Rediger instance) {
        log.debug("finding Rediger instance by example");
        try {
            List results = getSession()
                    .createCriteria("Rediger")
                    .add(Example.create(instance))
            .list();
            log.debug("find by example successful, result size: " + results.size());
            return results;
        } catch (RuntimeException re) {
            log.error("find by example failed", re);
            throw re;
        }
    }   
   
    public List findByProperty(String propertyName, Object value) {
      log.debug("finding Rediger instance with property: " + propertyName
            + ", value: " + value);
      try {
        String queryString = "from Rediger as model where model."
                          + propertyName + "= ?";
        Query queryObject = getSession().createQuery(queryString);
       queryObject.setParameter(0, value);
       return queryObject.list();
      } catch (RuntimeException re) {
        log.error("find by property name failed", re);
        throw re;
      }
   }

   public List findByPrix(Object prix
   ) {
      return findByProperty(PRIX, prix
      );
   }
   

   public List findAll() {
      log.debug("finding all Rediger instances");
      try {
         String queryString = "from Rediger";
           Query queryObject = getSession().createQuery(queryString);
          return queryObject.list();
      } catch (RuntimeException re) {
         log.error("find all failed", re);
         throw re;
      }
   }
   
    public Rediger merge(Rediger detachedInstance) {
        log.debug("merging Rediger instance");
        try {
            Rediger result = (Rediger) getSession()
                    .merge(detachedInstance);
            log.debug("merge successful");
            return result;
        } catch (RuntimeException re) {
            log.error("merge failed", re);
            throw re;
        }
    }

    public void attachDirty(Rediger instance) {
        log.debug("attaching dirty Rediger instance");
        try {
            getSession().saveOrUpdate(instance);
            log.debug("attach successful");
        } catch (RuntimeException re) {
            log.error("attach failed", re);
            throw re;
        }
    }
   
    public void attachClean(Rediger instance) {
        log.debug("attaching clean Rediger instance");
        try {
            getSession().lock(instance, LockMode.NONE);
            log.debug("attach successful");
        } catch (RuntimeException re) {
            log.error("attach failed", re);
            throw re;
        }
    }
}

class IBaseHibernateDAO.java

Code:
package Dao;
// default package

import org.hibernate.Session;


/**
 * Data access interface for domain model
 * @author MyEclipse Persistence Tools
 */
public interface IBaseHibernateDAO {
   public Session getSession();
}

class BaseHibernateDAO.java

[CODE]
package Dao;
// default package


import org.hibernate.Session;
import persistance.HibernateSessionFactory;


/**
* Data access object (DAO) for domain model
* @author MyEclipse Persistence Tools
*/
public class BaseHibernateDAO implements IBaseHibernateDAO {

public Session getSession() {
return HibernateSessionFactory.getSession();
}

}

class AbstractRediger.java

[code]package Dao;
import metier.Article;
import metier.Journaliste;

// default package



/**
* AbstractRediger entity provides the base persistence definition of the Rediger entity. @author MyEclipse Persistence Tools
*/

public abstract class AbstractRediger implements java.io.Serializable {


// Fields

private Integer numLigneRedaction;
private Journaliste journaliste;
private Article article;
private Double prix;


// Constructors

/** default constructor */
public AbstractRediger() {
}


/** full constructor */
public AbstractRediger(Journaliste journaliste, Article article, Double prix) {
this.journaliste = journaliste;
this.article = article;
this.prix = prix;
}


// Property accessors

public Integer getNumLigneRedaction() {
return this.numLigneRedaction;
}

public void setNumLigneRedaction(Integer numLigneRedaction) {
this.numLigneRedaction = numLigneRedaction;
}

public Journaliste getJournaliste() {
return this.journaliste;
}

public void setJournaliste(Journaliste journaliste) {
this.journaliste = journaliste;
}

public Article getArticle() {
return this.article;
}

public void setArticle(Article article) {
this.article = article;
}

public Double getPrix() {
return this.prix;
}

public void setPrix(Double prix) {
this.prix = prix;
}









}[/code]

class AbstractJournaliste.java

[code]package Dao;
// default package

import java.util.HashSet;
import java.util.Set;

import metier.Journal;


/**
* AbstractJournaliste entity provides the base persistence definition of the Journaliste entity. @author MyEclipse Persistence Tools
*/

public abstract class AbstractJournaliste implements java.io.Serializable {


// Fields

private Integer numJournaliste;
private Journal journal;
private String nom;
private String adresse;
private Set redigers = new HashSet(0);


// Constructors

/** default constructor */
public AbstractJournaliste() {
}


/** full constructor */
public AbstractJournaliste(Journal journal, String nom, String adresse, Set redigers) {
this.journal = journal;
this.nom = nom;
this.adresse = adresse;
this.redigers = redigers;
}


// Property accessors

public Integer getNumJournaliste() {
return this.numJournaliste;
}

public void setNumJournaliste(Integer numJournaliste) {
this.numJournaliste = numJournaliste;
}

public Journal getJournal() {
return this.journal;
}

public void setJournal(Journal journal) {
this.journal = journal;
}

public String getNom() {
return this.nom;
}

public void setNom(String nom) {
this.nom = nom;
}

public String getAdresse() {
return this.adresse;
}

public void setAdresse(String adresse) {
this.adresse = adresse;
}

public Set getRedigers() {
return this.redigers;
}

public void setRedigers(Set redigers) {
this.redigers = redigers;
}









}[/code]
Revenir en haut Aller en bas
icha




Nombre de messages : 7
Date d'inscription : 13/05/2009

Aidez moi Svp Empty
MessageSujet: Re: Aidez moi Svp   Aidez moi Svp EmptyMer 13 Mai - 19:06

class AbstractJournal.java

Code:

package Dao;
// default package

import java.util.Date;
import java.util.HashSet;
import java.util.Set;


/**
 * AbstractJournal entity provides the base persistence definition of the Journal entity. @author MyEclipse Persistence Tools
 */

public abstract class AbstractJournal  implements java.io.Serializable {


    // Fields   

    private Integer numJournal;
    private String nom;
    private Date dateAparu;
    private Set journalistes = new HashSet(0);


    // Constructors

    /** default constructor */
    public AbstractJournal() {
    }

   
    /** full constructor */
    public AbstractJournal(String nom, Date dateAparu, Set journalistes) {
        this.nom = nom;
        this.dateAparu = dateAparu;
        this.journalistes = journalistes;
    }

 
    // Property accessors

    public Integer getNumJournal() {
        return this.numJournal;
    }
   
    public void setNumJournal(Integer numJournal) {
        this.numJournal = numJournal;
    }

    public String getNom() {
        return this.nom;
    }
   
    public void setNom(String nom) {
        this.nom = nom;
    }

    public Date getDateAparu() {
        return this.dateAparu;
    }
   
    public void setDateAparu(Date dateAparu) {
        this.dateAparu = dateAparu;
    }

    public Set getJournalistes() {
        return this.journalistes;
    }
   
    public void setJournalistes(Set journalistes) {
        this.journalistes = journalistes;
    }
 








}


Class AbstractArticle.java

Code:

package Dao;
// default package

import java.util.Date;
import java.util.HashSet;
import java.util.Set;


/**
 * AbstractArticle entity provides the base persistence definition of the Article entity. @author MyEclipse Persistence Tools
 */

public abstract class AbstractArticle  implements java.io.Serializable {


    // Fields   

    private Integer numArticle;
    private String titre;
    private String description;
    private Date dateRedaction;
    private Set redigers = new HashSet(0);


    // Constructors

    /** default constructor */
    public AbstractArticle() {
    }

   
    /** full constructor */
    public AbstractArticle(String titre, String description, Date dateRedaction, Set redigers) {
        this.titre = titre;
        this.description = description;
        this.dateRedaction = dateRedaction;
        this.redigers = redigers;
    }

 
    // Property accessors

    public Integer getNumArticle() {
        return this.numArticle;
    }
   
    public void setNumArticle(Integer numArticle) {
        this.numArticle = numArticle;
    }

    public String getTitre() {
        return this.titre;
    }
   
    public void setTitre(String titre) {
        this.titre = titre;
    }

    public String getDescription() {
        return this.description;
    }
   
    public void setDescription(String description) {
        this.description = description;
    }

    public Date getDateRedaction() {
        return this.dateRedaction;
    }
   
    public void setDateRedaction(Date dateRedaction) {
        this.dateRedaction = dateRedaction;
    }

    public Set getRedigers() {
        return this.redigers;
    }
   
    public void setRedigers(Set redigers) {
        this.redigers = redigers;
    }
 








}


[color:effa="Red"]
package Metier



class Article.java

Code:

package metier;
// default package


import java.util.Date;
import java.util.Set;

import Dao.AbstractArticle;


/**
 * Article entity. @author MyEclipse Persistence Tools
 */
public class Article extends AbstractArticle implements java.io.Serializable {

    // Constructors

    /** default constructor */
    public Article() {
    }

   
    /** full constructor */
    public Article(String titre, String description, Date dateRedaction, Set redigers) {
        super(titre, description, dateRedaction, redigers);       
    }
 
}

class Journaliste.java

Code:

package metier;
// default package


import java.util.Set;

import Dao.AbstractJournaliste;



/**
 * Journaliste entity. @author MyEclipse Persistence Tools
 */
public class Journaliste extends AbstractJournaliste implements java.io.Serializable {

    // Constructors

    /** default constructor */
    public Journaliste() {
    }

   
    /** full constructor */
    public Journaliste(Journal journal, String nom, String adresse, Set redigers) {
        super(journal, nom, adresse, redigers);       
    }
 
}

class Journal.java

Code:

package metier;
// default package


import java.util.Date;
import java.util.Set;

import Dao.AbstractJournal;


/**
 * Journal entity. @author MyEclipse Persistence Tools
 */
public class Journal extends AbstractJournal implements java.io.Serializable {

    // Constructors

    /** default constructor */
    public Journal() {
    }

   
    /** full constructor */
    public Journal(String nom, Date dateAparu, Set journalistes) {
        super(nom, dateAparu, journalistes);       
    }
 
}



class Rediger.java

Code:

package metier;
import Dao.AbstractRediger;

// default package



/**
 * Rediger entity. @author MyEclipse Persistence Tools
 */
public class Rediger extends AbstractRediger implements java.io.Serializable {

    // Constructors

    /** default constructor */
    public Rediger() {
    }

   
    /** full constructor */
    public Rediger(Journaliste journaliste, Article article, Double prix) {
        super(journaliste, article, prix);       
    }
 
}


Article.hbm.xml

Code:

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<!--
    Mapping file autogenerated by MyEclipse Persistence Tools
-->
<hibernate-mapping>
    <class name="Article" table="Article" schema="public">
        <id name="numArticle" type="java.lang.Integer">
            <column name="NumArticle" />
            <generator class="Article"></generator>
        </id>
        <property name="titre" type="java.lang.String">
            <column name="Titre" />
        </property>
        <property name="description" type="java.lang.String">
            <column name="Description" />
        </property>
        <property name="dateRedaction" type="java.util.Date">
            <column name="DateRedaction" length="13" />
        </property>
        <set name="redigers" inverse="true">
            <key>
                <column name="NumArticle" />
            </key>
            <one-to-many class="Rediger" />
        </set>
    </class>
</hibernate-mapping>



Journal.hbm.xml

Code:

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<!--
    Mapping file autogenerated by MyEclipse Persistence Tools
-->
<hibernate-mapping>
    <class name="Journal" table="Journal" schema="public">
        <id name="numJournal" type="java.lang.Integer">
            <column name="NumJournal" />
            <generator class="Journal"></generator>
        </id>
        <property name="nom" type="java.lang.String">
            <column name="Nom" />
        </property>
        <property name="dateAparu" type="java.util.Date">
            <column name="DateAparu" length="13" />
        </property>
        <set name="journalistes" inverse="true">
            <key>
                <column name="NumJournal" />
            </key>
            <one-to-many class="Journaliste" />
        </set>
    </class>
</hibernate-mapping>



Journaliste.hbm.xml

Code:

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<!--
    Mapping file autogenerated by MyEclipse Persistence Tools
-->
<hibernate-mapping>
    <class name="Journaliste" table="Journaliste" schema="public">
        <id name="numJournaliste" type="java.lang.Integer">
            <column name="NumJournaliste" />
            <generator class="Journaliste"></generator>
        </id>
        <many-to-one name="journal" class="Journal" fetch="select">
            <column name="NumJournal" />
        </many-to-one>
        <property name="nom" type="java.lang.String">
            <column name="Nom" />
        </property>
        <property name="adresse" type="java.lang.String">
            <column name="Adresse" />
        </property>
        <set name="redigers" inverse="true">
            <key>
                <column name="NumJournaliste" />
            </key>
            <one-to-many class="Rediger" />
        </set>
    </class>
</hibernate-mapping>

Revenir en haut Aller en bas
icha




Nombre de messages : 7
Date d'inscription : 13/05/2009

Aidez moi Svp Empty
MessageSujet: Re: Aidez moi Svp   Aidez moi Svp EmptyMer 13 Mai - 19:07

Rediger.hbm.xml

Code:

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<!--
    Mapping file autogenerated by MyEclipse Persistence Tools
-->
<hibernate-mapping>
    <class name="Rediger" table="Rediger" schema="public">
        <id name="numLigneRedaction" type="java.lang.Integer">
            <column name="NumLigneRedaction" />
            <generator class="Rediger"></generator>
        </id>
        <many-to-one name="journaliste" class="Journaliste" fetch="select">
            <column name="NumJournaliste" />
        </many-to-one>
        <many-to-one name="article" class="Article" fetch="select">
            <column name="NumArticle" />
        </many-to-one>
        <property name="prix" type="java.lang.Double">
            <column name="Prix" precision="17" scale="17" />
        </property>
    </class>
</hibernate-mapping>


[color:0639="Red"]package persistance

class HibernateSessionFactory.java

Code:

package persistance;

import org.hibernate.HibernateException;
import org.hibernate.Session;
import org.hibernate.cfg.Configuration;

/**
 * Configures and provides access to Hibernate sessions, tied to the
 * current thread of execution.  Follows the Thread Local Session
 * pattern, see {@link http://hibernate.org/42.html }.
 */
public class HibernateSessionFactory {

    /**
    * Location of hibernate.cfg.xml file.
    * Location should be on the classpath as Hibernate uses 
    * #resourceAsStream style lookup for its configuration file.
    * The default classpath location of the hibernate config file is
    * in the default package. Use #setConfigFile() to update
    * the location of the configuration file for the current session. 
    */
    private static String CONFIG_FILE_LOCATION = "/hibernate.cfg.xml";
   private static final ThreadLocal<Session> threadLocal = new ThreadLocal<Session>();
    private  static Configuration configuration = new Configuration();
    private static org.hibernate.SessionFactory sessionFactory;
    private static String configFile = CONFIG_FILE_LOCATION;

   static {
       try {
         configuration.configure(configFile);
         sessionFactory = configuration.buildSessionFactory();
      } catch (Exception e) {
         System.err
               .println("%%%% Error Creating SessionFactory %%%%");
         e.printStackTrace();
      }
    }
    private HibernateSessionFactory() {
    }
   
   /**
    * Returns the ThreadLocal Session instance.  Lazy initialize
    * the <code>SessionFactory</code> if needed.
    *
    *  @return Session
    *  @throws HibernateException
    */
    public static Session getSession() throws HibernateException {
        Session session = (Session) threadLocal.get();

      if (session == null || !session.isOpen()) {
         if (sessionFactory == null) {
            rebuildSessionFactory();
         }
         session = (sessionFactory != null) ? sessionFactory.openSession()
               : null;
         threadLocal.set(session);
      }

        return session;
    }

   /**
    *  Rebuild hibernate session factory
    *
    */
   public static void rebuildSessionFactory() {
      try {
         configuration.configure(configFile);
         sessionFactory = configuration.buildSessionFactory();
      } catch (Exception e) {
         System.err
               .println("%%%% Error Creating SessionFactory %%%%");
         e.printStackTrace();
      }
   }

   /**
    *  Close the single hibernate session instance.
    *
    *  @throws HibernateException
    */
    public static void closeSession() throws HibernateException {
        Session session = (Session) threadLocal.get();
        threadLocal.set(null);

        if (session != null) {
            session.close();
        }
    }

   /**
    *  return session factory
    *
    */
   public static org.hibernate.SessionFactory getSessionFactory() {
      return sessionFactory;
   }

   /**
    *  return session factory
    *
    *   session factory will be rebuilded in the next call
    */
   public static void setConfigFile(String configFile) {
      HibernateSessionFactory.configFile = configFile;
      sessionFactory = null;
   }

   /**
    *  return hibernate configuration
    *
    */
   public static Configuration getConfiguration() {
      return configuration;
   }

}
Revenir en haut Aller en bas
icha




Nombre de messages : 7
Date d'inscription : 13/05/2009

Aidez moi Svp Empty
MessageSujet: Re: Aidez moi Svp   Aidez moi Svp EmptyMer 13 Mai - 19:08

Dans la Src

class hibernate.cfg.xml
Code:


<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE hibernate-configuration PUBLIC
          "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
          "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">

<!-- Generated by MyEclipse Hibernate Tools.                  -->
<hibernate-configuration>

   <session-factory>
      <property name="connection.username">postgres</property>
      <property name="connection.url">
         jdbc:postgresql://localhost:5432/DBGestionJournaux
      </property>
      <property name="dialect">
         org.hibernate.dialect.PostgreSQLDialect
      </property>
      <property name="myeclipse.connection.profile">
         org.postgresql.Driver
      </property>
      <property name="connection.password">1234</property>
      <property name="connection.driver_class">
         org.postgresql.Driver
      </property>
      <mapping resource="./Journal.hbm.xml" />
      <mapping resource="./Rediger.hbm.xml" />
      <mapping resource="./Journaliste.hbm.xml" />
      <mapping resource="./Article.hbm.xml" />

   </session-factory>

</hibernate-configuration>

log4j.porprietes

Code:

 # # # Direct messages de stdout # # #
 log4j.appender.stdout=org.apache.log4j.ConsoleAppender log4j.appender.stdout = org.apache.log4j.ConsoleAppender
 log4j.appender.stdout.Target=System.out log4j.appender.stdout.Target = System.out
 log4j.appender.stdout.layout=org.apache.log4j.PatternLayout log4j.appender.stdout.layout = org.apache.log4j.PatternLayout
 log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c {1} :%L - %m%n log4j.appender.stdout.layout.ConversionPattern =% d (ABSOLUTE)% 5p% c (1):% L -% m% n

 ### set log levels - for more verbose logging change 'info' to 'debug' ### # # # Set log niveaux - pour plus de l'enregistrement des changements' info 'to' debug '# # #

 log4j.rootLogger=debug, stdout log4j.rootLogger = debug, stdout

 log4j.logger.org.hibernate=info log4j.logger.org.hibernate = info
 #log4j.logger.org.hibernate=debug # log4j.logger.org.hibernate = debug

 ### log HQL query parser activity # # # Log HQL query parser activité
 #log4j.logger.org.hibernate.hql.ast.AST=debug # log4j.logger.org.hibernate.hql.ast.AST = debug

 ### log just the SQL # # # Log, il suffit de le SQL
 log4j.logger.org.hibernate.SQL=debug log4j.logger.org.hibernate.SQL = debug

 ### log JDBC bind parameters ### # # # Log JDBC bind paramètres # # #
 log4j.logger.org.hibernate.type=info log4j.logger.org.hibernate.type = info

 ### log schema export/update ### # # # Log schema export / update # # #
 log4j.logger.org.hibernate.tool.hbm2ddl=info log4j.logger.org.hibernate.tool.hbm2ddl = info

 ### log HQL parse trees # # # Log HQL parse arbres
 #log4j.logger.org.hibernate.hql=debug # log4j.logger.org.hibernate.hql = debug

 ### log cache activity ### # # # Log cache activité # # #
 log4j.logger.org.hibernate.cache=info log4j.logger.org.hibernate.cache = info

 ### log transaction activity # # # Log transaction activité
 #log4j.logger.org.hibernate.transaction=debug # log4j.logger.org.hibernate.transaction = debug

 ### log JDBC resource acquisition # # # Log JDBC acquisition de ressources
 #log4j.logger.org.hibernate.jdbc=debug # log4j.logger.org.hibernate.jdbc = debug

 ### enable the following line if you want to track down connection ### # # # Activer la ligne suivante si vous voulez retrouver connexion # # #
 ### leakages when using DriverManagerConnectionProvider ### # # # DriverManagerConnectionProvider fuites lors de l'utilisation de # # #
 #log4j.logger.org.hibernate.connection.DriverManagerConnectionProvider=trace # log4j.logger.org.hibernate.connection.DriverManagerConnectionProvider = trace
Revenir en haut Aller en bas
icha




Nombre de messages : 7
Date d'inscription : 13/05/2009

Aidez moi Svp Empty
MessageSujet: Re: Aidez moi Svp   Aidez moi Svp EmptyMer 13 Mai - 19:08

Mes pages Web


J'ai réalisé l'interface de la qst 2 pages Mise a jour journaliste

avant j'ai crée un fiichier tag qui contient mon menu

menu.tag
Code:

    <table border="0" >
   <tr>
   <td><a href="/GestionJournauxF/pages/Accueil.jsp" class="menu" target="_self">Accueil</a></td></tr>
      <tr><td> <a href="/GestionJournauxF/pages/MAJJournaliste.jsp" class="menu" target="_self">MAJ-Journaliste</a></td></tr>
      <tr><td> <a href="#" class="menu" target="_self">Article</a></td></tr>
      <tr><td> <a href="#" class="menu" target="_self">Rediger-article</a></td></tr>
          <tr>    <td>  <a href="#" class="menu" target="_self">Rechercher-article</a></td></tr>
      <tr><td> <a href="#" class="menu" target="_self">Rechercher-Journaliste</a></td></tr>
      <tr><td> <a href="#" class="menu" target="_self">Salaire-Journaliste</a></td>
      </tr> </table>

Accueil.jsp

Code:


<%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@taglib tagdir="/WEB-INF/tags" prefix="menu"  %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
 
   <meta http-equiv="pragma" content="no-cache">
   <meta http-equiv="cache-control" content="no-cache">
   <meta http-equiv="expires" content="0">   
   <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
   <meta http-equiv="description" content="This is my page"> 
<title>********Gestion des Journaux*********</title>
</head>
<body>
 <center>
                        <form action="TestLogin.jsp" method="post">
    <table border="0" width="322" height="152">
<tbody>
<tr>
    <td><p class="titre-contenu">Nom utilisateur : </p></td>
    <td colspan="2"><input type="text" name="login" value="" /></td>
</tr>
<tr>
<td><p class="titre-contenu">Mot de passe : </p></td>
<td colspan="2"><input type="password" name="mdp" value="" /></td>
</tr>
<tr>
<td >&nbsp;&nbsp;&nbsp;&nbsp;<input type="submit" value="Se connecter" width="30" height="30"/></td>
<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="reset" value="Annuler" width="30" height="30"/></td>
</tr>
</tbody>
</table>

</form></center>

</body>
</html>

TestLogin.jsp
Code:

<%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<%@taglib tagdir="/WEB-INF/tags" prefix="menu"  %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
   

   <meta http-equiv="pragma" content="no-cache">
   <meta http-equiv="cache-control" content="no-cache">
   <meta http-equiv="expires" content="0">   
   <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
   <meta http-equiv="description" content="This is my page"> 
<title>********Gestion des Journaux*********</title>
<link rel="stylesheet" type="text/css" href="css/template.css" />
</head>
<body>

<%
                       if(request.getParameter("login").equals("admin") && request.getParameter("mdp").equals("123")){
         response.sendRedirect("LoginSuccess.jsp");
      }else{
         response.sendRedirect("LoginErreur.jsp");
      }
                   
                   
                   
                    %>
</body>
</html>



LoginSuccess.jsp
Code:
<%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<%@taglib tagdir="/WEB-INF/tags" prefix="menu"  %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
   
   <meta http-equiv="pragma" content="no-cache">
   <meta http-equiv="cache-control" content="no-cache">
   <meta http-equiv="expires" content="0">   
   <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
   <meta http-equiv="description" content="This is my page"> 
<title>********Gestion des Journaux*********</title>
<link rel="stylesheet" type="text/css" href="css/template.css" />
</head>
<body>
<h4><font color="blue">Admin connecté avec success</font></h4>
</body>
</html>



LoginErreur.jsp
Code:

<%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@page isErrorPage="true" %>
<%@taglib tagdir="/WEB-INF/tags" prefix="menu"  %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
   
    <title>My JSP 'index.jsp' starting page</title>
   <meta http-equiv="pragma" content="no-cache">
   <meta http-equiv="cache-control" content="no-cache">
   <meta http-equiv="expires" content="0">   
   <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
   <meta http-equiv="description" content="This is my page"> 
<title>********Gestion des Journaux*********</title>
<link rel="stylesheet" type="text/css" href="css/template.css" />
</head>
<body>
<h4><font color="red">Le login ou le mot de passe est Incorrect !!!!</font> </h4>
</body>
</html>



MAJ-journaliste.jsp

Code:
<%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%>
<%@ page import="Dao.*" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@taglib tagdir="/WEB-INF/tags" prefix="menu"  %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
   
    <title>My JSP 'index.jsp' starting page</title>
   <meta http-equiv="pragma" content="no-cache">
   <meta http-equiv="cache-control" content="no-cache">
   <meta http-equiv="expires" content="0">   
   <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
   <meta http-equiv="description" content="This is my page"> 
<title>********Gestion des Journaux*********</title>
<link rel="stylesheet" type="text/css" href="css/template.css" />

</head>
<body>
<center>
                        <table border="0" width="332" height="242" onmouseover="images/47.jpg">
                        <tr>
                        <td>Numéro Journaliste : </td>
                        <td><input type="text" name="NumJournaliste" value=""/></td>
                        </tr>
                          <tr>
                        <td>Nom Journaliste : </td>
                        <td><input type="text" name="Nom" value=""/></td>
                        </tr>
                          <tr>
                        <td>Adresse Journaliste : </td>
                      <td><textarea cols="20" rows="5" name="Adresse" ></textarea></td>
                        </tr>
                          <tr>
                        <td>Numéro Journal</td>
                        <td><select name="NumJournal" >
                        <%AbstractJournal j=new AbstractJournal(); %>
                        <option><%j.getNumJournal();%></option>
</select>
</td>
                        </tr>
                          <tr onmouseup="" onmouseover="" onmouseout="" onmousemove="" onmousedown="">
                        <td>&nbsp;&nbsp;&nbsp;&nbsp;<input type="button" name="ajouter" value="Ajouter" onk/></td>
                        <td>&nbsp;&nbsp;&nbsp;&nbsp;<input type="button" name="afficher" value="Afficher" onmouseup="images/47.jpg"/></td>
                        </tr>
                        </table>
                       
                        <table border="4" background="images/52.jpg" style="font-size: medium; width: 463px;" width="463" height="108">
                       
                        <tr><th>Numéro Journaliste</th>
                        <th>Nom Journaliste </th>
                        <th>Adresse Journaliste</th>
                        <th>Numero Journal</th>
                        <th>Supprimer</th>
                        <th>Modifier</th>
                        </tr>
                        <tr>
                        <td>ssdsdfsf</td>
                        <td>dsfdsfs</td>
                        <td>sdfdsf</td>
                        <td>dsfsdfs</td>
                      <td>sdfdsf</td>
                        <td>dsfsdfs</td>
                        </tr>
                        <tr>
                        <td>ssdsdfsf</td>
                        <td>dsfdsfs</td>
                        <td>sdfdsf</td>
                        <td>dsfsdfs</td>
                      <td>sdfdsf</td>
                        <td>dsfsdfs</td>
                        </tr>
                        <tr>
                        <td>ssdsdfsf</td>
                        <td>dsfdsfs</td>
                        <td>sdfdsf</td>
                        <td>dsfsdfs</td>
                      <td>sdfdsf</td>
                        <td>dsfsdfs</td>
                        </tr>
                        <tr>
                        <td>ssdsdfsf</td>
                        <td>dsfdsfs</td>
                        <td>sdfdsf</td>
                        <td>dsfsdfs</td>
                      <td>sdfdsf</td>
                        <td>dsfsdfs</td>
                        </tr>
                        <tr>
                        <td>ssdsdfsf</td>
                        <td>dsfdsfs</td>
                        <td>sdfdsf</td>
                        <td>dsfsdfs</td>
                      <td>sdfdsf</td>
                        <td>dsfsdfs</td>
                        </tr>
                        <tr>
                        <td>ssdsdfsf</td>
                        <td>dsfdsfs</td>
                        <td>sdfdsf</td>
                        <td>dsfsdfs</td>
                      <td>sdfdsf</td>
                        <td>dsfsdfs</td>
                        </tr>
                          <tr>
                        <td>ssdsdfsf</td>
                        <td>dsfdsfs</td>
                        <td>sdfdsf</td>
                        <td>dsfsdfs</td>
                        <td>sdfdsf</td>
                        <td>dsfsdfs</td>
                        </tr>
                        </table>
                        </center>





Hibernate.reveng.xml

Code:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-reverse-engineering PUBLIC "-//Hibernate/Hibernate Reverse Engineering DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-reverse-engineering-3.0.dtd" >

<hibernate-reverse-engineering>
   <table name="Article" schema="public" class="Article">
      <primary-key>
         <generator class="Article"></generator>
      </primary-key>
   </table>
   <table name="Journal" schema="public" class="Journal">
      <primary-key>
         <generator class="Journal"></generator>
      </primary-key>
   </table>
   <table name="Journaliste" schema="public" class="Journaliste">
      <primary-key>
         <generator class="Journaliste"></generator>
      </primary-key>
   </table>
<table name="Rediger" schema="public" class="Rediger">
   <primary-key>
      <generator class="Rediger"></generator>
   </primary-key>
</table>
</hibernate-reverse-engineering>

web.xml

Code:
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4"
   xmlns="http://java.sun.com/xml/ns/j2ee"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
   http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
  <welcome-file-list>
    <welcome-file>Accueil.jsp</welcome-file>
  </welcome-file-list>
</web-app>
Dans la pages MAJ_journaliste je ne sais pas comment je dois faire pour afficher dans la table la list des journaliste + le combobox ça ne marche il ne se remplit pas avec les ID des journaux a partir de la base données ???
SadSad
J4ATTEND VOTRE AIDE eT mERCI
Revenir en haut Aller en bas
Admin
Admin
Admin


Nombre de messages : 299
Age : 57
Date d'inscription : 12/11/2005

Aidez moi Svp Empty
MessageSujet: Re: Aidez moi Svp   Aidez moi Svp EmptyDim 17 Mai - 11:49

Bonjour,

Mais désolé, ce post n'a rien à faire ici.
Vous êtes sur un forum de développement personnel
et non de technique informatique.

Merci

Didier
http://www.confiance-en-moi.com
Revenir en haut Aller en bas
http://www.developpement-personnel-club.com
Contenu sponsorisé





Aidez moi Svp Empty
MessageSujet: Re: Aidez moi Svp   Aidez moi Svp Empty

Revenir en haut Aller en bas
 
Aidez moi Svp
Revenir en haut 
Page 1 sur 1
 Sujets similaires
-
» Aidez Moi je vous en prie..

Permission de ce forum:Vous ne pouvez pas répondre aux sujets dans ce forum
Developpement personnel club Forum :: Rubriques conseils :: Rubriques d'aides et conseils-
Sauter vers: