将变量从servlet传递到jsp [英] Pass variables from servlet to jsp
本文介绍了将变量从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.
这篇关于将变量从servlet传递到jsp的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文