如何将Java中数据显示到jsp页面之中

2025-03-28 18:35:06
推荐回答(1个)
回答1:

通过request.setAttribute();将数据塞到作用域,然后在jsp页面用el表达式获取。例如:

request.setAttribute("name", "zhangsan");

jsp页面:

${name}