启动CRON JOB并自动将后端数据发送到多个JSPS。

huangapple go评论71阅读模式
英文:

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.

huangapple
  • 本文由 发表于 2023年2月8日 13:50:13
  • 转载请务必保留本文链接:https://go.coder-hub.com/75381804.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定