After deployment of a java project in spring hibernate can i call a jsp automatically after some interval without sending any request to the server?
Can We use .bat file or .exe ?
Any suggestion
Thanks
After deployment of a java project in spring hibernate can i call a jsp automatically after some interval without sending any request to the server?
Can We use .bat file or .exe ?
Any suggestion
Thanks
You should spawn a Thread and let it do the email retrieval and dumping emails to DB. You could start this Thread on application deployment using a ServletContextListener implementation registered in your web.xml. Following articles might help you to get a more detail understanding.
http://docs.oracle.com/javase/tutorial/essential/concurrency/runthread.html
http://www.mkyong.com/servlet/what-is-listener-servletcontextlistener-example/
As I know a server can not call JSP automatically (can only to perform auto compilation). It task is out of nature of server. Application server cloud execute jsp pages only by requests. You can develop a tool (in java as example) which could simulate a request to the server by requesting some jsp page or execute a .class file of jsp page directly. As another solution is to send http request to the server by telnet from command line which you can put into a .bat file and execute it after deployment. Also you can use http://curl.haxx.se/ tool to perform any type requests from command line to your server.
telnet example:
telnet 127.0.0.1 8080
then
GET /myapp/index.jsp
If you want to use the request to trigger server side behaviour, you should really consider to use an EJB-Timer as an alternative.
The other option is to use your infrastructure (cron, windows scheduler) to make a request.