<%@ page import="java.io.*" %> --pagage a importe
/*下面两段代码等价*/
<jsp:useBean id="groupeNoms" class="model.Group" scope="application" /> --scope的值比如:session,application,request 等3个值。
public class MaServlet extends HttpServlet{
protected void doGet(HttpServletRequset req,HttpServletResponse resp) throws ServletException,IOException{
HttpSession session = request.GetSession(true);
GroupeInvdiv g = new GroupeIndiv();
session.setAttribut("monGroupe",g);
getServletContext().getRequestDispatcher("/vue/page.jsp").forward(req,resp);
}
}
<jsp:useBean id="groupeNoms" class="model.Group" scope="application" />
<html>Nombre d'elements=<%=monGroupe.taille()%>
</html>
<select>--在iterator里面我们可以删除元素,foreach里不可以
<% Iterator it = malist.iterator();
while(it.hasNext()){
String art=(String) it.next();}%>
<option value="">
</select>