1、新建jsp页面,创建Form表单,注意action要使用绝对路径,这里指向的是一个servlet。

JavaWeb开发之页面传值


2、提交数据

JavaWeb开发之页面传值


3、在接收页重写doPost方法(若第一步method="get"则重写doGet),通过request对象获取。

JavaWeb开发之页面传值

若接收页是jsp,那么调用隐藏的request对象获取,在xxx.jsp插入代码:

 <% String []books = request.getParameterValues("book")%>


相关文章:

  • 2022-01-19
  • 2021-05-22
  • 2021-12-28
  • 2022-01-04
  • 2021-12-30
  • 2021-08-07
  • 2022-01-13
猜你喜欢
  • 2022-12-23
  • 2022-02-10
  • 2021-10-09
  • 2021-12-15
  • 2021-08-08
  • 2021-10-04
  • 2021-10-01
相关资源
相似解决方案