request.setAttribute不起作用 [英] request.setAttribute is not working
本文介绍了request.setAttribute不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经在jsp中设置了一个请求并提交了表单.
而且我在action类中得到了值,但是我在action中得到了空值.
我的代码是:
Mainjsp.jsp
I have set a request in jsp and submitted the form.
And I get the value in action class,but im getting null value in action.
My code is:
Mainjsp.jsp
<%request.setAttribute("dispatch", "add");%>
Action.java
Action.java
request.getAttribute("dispatch");
请帮忙.
在此先感谢您.
Please help in this.
Thanks in advance.
推荐答案
本文应为您提供有关实现方法的帮助:
getAttribute()请求对象的方法 [
This article should help you out on how this is implemented:
getAttribute() Method Of The Request Object[^]
这篇关于request.setAttribute不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文