英文:
Kick off CRON JOB and send the back end data automatically to several JSPS
问题
I searched all over but was unable to find a suitable answer, and hence posting this question.
I have a spring boot application that needs to be scheduled through a cron job to run every hour and fetch data from a web site. I split the list into 5 groups. I need to push the list data into 5 different jsp's (automatically update it every hour).
for example -->
groupList1 to group1.jsp
groupList2 to group2.jsp
groupList3 to group3.jsp
groupList4 to group4.jsp
groupList5 to group5.jsp
I am unable to find information where the data can be pushed to several screens without having to click the submit button. So set up something in the controller to push it to the front end.
I am new to JSP's and hence would like some advice on this.
I am using a Tomcat server, Eclipse 4.25 Java 11 and springboot.
Thanks.
The CRON job, web service works fine. Have split it into 5 groups,
I am able to make the front end work if I have a jsp page with a form and a submit button, calls the controller,--> back end service --> controller (postmapping) --> JSP.
I am unable to figure out a way to automate it to:
cron job --> controller --> web service --> controller --> display on 5 separate JSP pages. I am unable to figure out the post mapping that has to be done from controller to JSP.
英文:
I searched all over but was unable to find a suitable answer, and hence posting this question.
I have a spring boot application that needs to be scheduled through a cron job to run every hour and fetch data from a web site. I split the list into 5 groups. I need to push the list data into 5 different jsp's (automatically update it every hour).
for example -->
groupList1 to group1.jsp
groupList2 to group2.jsp
groupList3 to group3.jsp
groupList4 to group4.jsp
groupList5 to group5.jsp
I am unable to find information where the data can be pushed to several screens without having to click the submit button. So set up something in the controller to push it to the front end.
I am new to JSP's and hence would like some advice on this.
I am using a Tomcat server, Eclipse 4.25 Java 11 and springboot.
Thanks.
The CRON job, web service works fine. Have split it into 5 groups,
I am able to make the front end work if I have a jsp page with a form and a submit button, calls the controller,--> back end service --> controller (postmapping) --> JSP.
I am unable to figure out a way to automate it to:
cron job --> controller --> web service --> controller --> display on 5 seperate JSP pages. I am unable to figure out the post mapping that has to be done from controller to JSP.
答案1
得分: 0
这个问题通过在JavaScript中添加一个定时器来解决,该定时器每隔几小时刷新页面。
这个问题可以关闭/标记为已回答。
英文:
The problem was solved by adding a timer to the java script which refreshed the page every few hours.
This question can be closed/marked as answered.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论