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
|
// Servlet
...
public void service(HttpServletRequest request, HttpServletResponse response)
{
String windowSessionName = request.getParameter("WindowSessionName");
// Récupération du WindowSession
WindowSession windowSession = (WindowSession)request.getSession().getAttribute(windowSessionName);
// Création de l'objet d'échange utilisé par la jsp
DataPageBean pageBean = new DataPageBean();
windowSession.putObject("NomPourLaPage", pageBean);
...
ResultSet rs = stmt.executeQuery(...)
while (rs.next())
{
... chargement d'une liste dans pageBean
}
... appel de la page jsp via requestDispatcher ou autre
} |
Partager