在structs-config的配置文件中设置scope="request",它默认的是scope="session"。

解决方案 »

  1.   

    如:
    <action attribute="uf" name="uf" parameter="method"
                path="/usermanager"
                scope="request"
                type="com.demo.IndexAction">
      

  2.   

    同上,主要是表单对应的actionform是session的,所以每次打开,html:text会把actionform里面对应的值读出来,如果设成request,则重新打开页面actionform为空
      

  3.   

    最好一次请求用 scope="request"。
    如果要使用 session 也可以,但注意在 DATA 的范围内,要在适当的地方 将 DATA 从 session
    中移除。