<result name="error" type="redirectAction" >/gallery/beforeUploadPhoto.action?gallery.galleryId=${galleryId}&amp;error=${error}</result> 怎么在页面中获取error=${error}的值。

解决方案 »

  1.   

    <s:property value="#request.error"/>
      

  2.   

    <s:property value="#parameters.error"/>
      

  3.   

    获取不到啊。需求是:校验一个页面里面的输入值合法性,但是验证页面是一个action,不是一个jsp。验证失败的话就会要重新进入“验证页面”,这时我在action'method里判断得出的错误信息,怎么传到“验证页面中”?如果<result type="dispacher" />反而能获取.我现在想用一个url中用参数把“错误信息”传到action中但是获取不到?请高手解答,拜谢了
      

  4.   

    可用 ! 谢谢。看了你是struts2 标签,知道我EL表达式用错了。
    你一般验证页面是个action是怎么验证的?
      

  5.   


    <result name="error" type="redirectAction" >/gallery/beforeUploadPhoto.action?gallery.galleryId=${galleryId}&amp;error=${error}</result> 这说明你的参数是传到action中的,那么在action中可以用属性保存,然后action处理完直接就可以在页面上用标签显示了,