将变量从servlet传递到jsp
问题描述:
如何将变量从servlet传递到jsp?
setAttribute
和getAttribute
对我不起作用:-(
How can I pass variable from servlet to jsp?
setAttribute
and getAttribute
didn't work for me :-(
答
您可以将所有值设置为响应对象,然后再向jsp发送请求.或者,您可以将值放入会话Bean并在jsp中访问它.
You could set all the values into the response object before forwaring the request to the jsp. Or you can put your values into a session bean and access it in the jsp.