A bug of 9cbs blog

xiaoxiao2021-03-06  85

When I just added an article, I jumped into the article list page after successfully. There are 4 articles in the current list. If I refreshed the page at this time, this time the list shows five articles, the article I just added again. Then refresh is added again. This should be a small bug of 9CBS. I will have similar refresh questions when I use Struts. Now my solution is to jump in the Action ......... IF (DBID) > 0) {Actionforward Forward = New ActionForward ("ShowlistDetail.do?dbid=" DBID); Forward.SetRedirect (TRUE); Return (Forward);} else {return (mapping.findforward ("error");} If you add a success, don't leave the page customization in Struts-Config.xml, and make a Forward in the action, and set Forward.SetRedirect (TRUE); this can also pass the parameters, or resolve the refresh problem. But there will be some problems in the future. I believe there will be better ways

转载请注明原文地址:https://www.9cbs.com/read-107124.html

New Post(0)