各位大侠帮帮忙:
由于才刚刚学习Struts 没有多久,久遇到了难题了:
以下是小弟编写的程序:
在Action中我用:request.setAttribute("hello", "Stuttgart");来存入值:
在jsp页面中我用:hello(jsp脚本):<%=request.getAttribute("hello") %><br>
但得到的值页面显示为:hello(jsp脚本):null
而且我在struts-config.xml 中设置了redirect=“false”
希望能得到牛人指点,小弟先谢啦!!!
由于才刚刚学习Struts 没有多久,久遇到了难题了:
以下是小弟编写的程序:
在Action中我用:request.setAttribute("hello", "Stuttgart");来存入值:
在jsp页面中我用:hello(jsp脚本):<%=request.getAttribute("hello") %><br>
但得到的值页面显示为:hello(jsp脚本):null
而且我在struts-config.xml 中设置了redirect=“false”
希望能得到牛人指点,小弟先谢啦!!!
或者你尝试在action里面用out。print来输出看行不行先
request.setAttribute("hello", "Stuttgart");JSP${requestScope.hello}