Salve a tutti, voglio implementare un eliminacode ho creato una pagina jsp con un pulsante che trasmette i dati presi da un database a una servlet al metodo post che a sua volta dovrebbe trasmette i dati a una jsp (monitor) posta su un altro computer solo che, nel monitor i dati non si vedono, si vedono solo dallo stesso pc e non da un altro pc qualcuno pu� spiegarmi in grandi linee come posso implementare un sistema del genere grazie. allego il metodo della servlete questa e la pagina del monitorcodice:protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // TODO Auto-generated method stub doGet(request, response); String tipo= request.getParameter("tipo"); String sportello=request.getParameter("sportello"); if(tipo.equals("0")) { System.out.println(tipo); System.out.println(sportello); int tipoInt= Integer.parseInt(tipo); ArrayList <UtenteBean> utenteChiamato = new ArrayList<UtenteBean>(); Connessione numeriInCoda = new Connessione(); try { utenteChiamato=numeriInCoda.chiamata(sportello, tipoInt); } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } for(UtenteBean cate : utenteChiamato) { String servizio = cate.getServizio(); String data =cate.getData(); int id=cate.getId(); String ora =cate.getOre(); String sportello2 = cate.getSportello(); System.out.println(servizio); System.out.println(data); System.out.println(id); System.out.println(sportello2); HttpSession session = request.getSession(); session.setAttribute("servizio", servizio); session.setAttribute("id", id); RequestDispatcher view = request.getRequestDispatcher("monitor.jsp"); view.forward(request, response); try { Connessione.cancella1(); } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } } } }codice:<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Insert title here</title> </head> <body> <%= session.getAttribute("servizio") %> <%= session.getAttribute("sportello") %> <%= session.getAttribute("id") %> </body> </html>

Rispondi quotando