JSP 和 HTML - 刷新不会更新网页数据
在我的网络客户端中,我在 if 语句中有一个像这样的命令
myList = myBean.getNewList();
,它引用全局列表并以表格形式显示在网页中。
为什么我的网页在我再次刷新页面之前不会更新屏幕上的表格?按下按钮后它似乎会立即自行刷新
In my web client I have inside an if statement a command like this
myList = myBean.getNewList();
that references a global List and is displayed in table form in the web page.
How is it that my web page doesn't update the table on screen till I refresh the page again? It seems to refresh by its self straight away after a button is pressed
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
该代码在哪里?在 *.jsp 文件中,还是在某些支持 java 操作中?
最有可能的是,在通过单击按钮向服务器发出请求之前,该代码永远不会被调用,这可能会执行以下操作之一(取决于您的应用程序):
Where is that code? In the *.jsp file, or in some backing java action?
Most likely, that code is never called until there is a request made to the server, via a button click which would probably do one of the following (depending on your application):