The reference to entity "preinfo" must end with the ';'delimiter.

struts2redirect-action 传递 参数 
 

  使用struts2框架,在提交一个请求后,将获取的数据对象再要生成一个序列号,为了防止刷新生成冗余序列号,就在请求处理完成后,直接重定向到显示该信息的action中:


 
    showpreinfo?preinfo.order_number=${preinfo.order_number}&preinfo.company_name=${preinfo.company_name}
 

 
 /error.jsp
 


因为使用了redirectAction,所以要注意不能将showpreinf?preinfo.order_number=${preinfo.order_number}写成showpreinf.action?preinfo.order_number=${preinfo.order_number}

在这个配置文件里,多个参数的连接符使用了"&",但XML的语法规范,应该使用"&"代替"&",原理和HTML中的转义相同,开始没有注意,在struts分析配置文件时,总是报出这样的错误:

The reference to entity "preinfo" must end with the ';'delimiter.

?

进行上面说明的替换后,就正常了。

你可能感兴趣的:(java)