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
|
protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
try{
ObjectOutputStream sortieObjet= new ObjectOutputStream(resp.getOutputStream());
ObjectInputStream entreeObjet= new ObjectInputStream(req.getInputStream());
/*récupération des données de l'applet */
t=(String)entreeObjet.readObject();
/******************************renvoi un Hashtable du résultat */
Integer gameId=0;
gameId= getLogin().get_gameId();
Hashtable<String, String> hashtable = new Hashtable<String, String>();
....
....
....
...
...
sortieObjet.writeObject(hashtable);
}catch(Exception e){
System.out.println("Post Erreur :" + e.getMessage());
}
}
private Login getLogin(){
FacesContext context = FacesContext.getCurrentInstance();
Object obj = FacesContext.getCurrentInstance().getApplication().getELResolver().getValue(context.getELContext(), null, "login");
return (Login) obj;
} |