How to load a VAADIN Java web page using curl or anything else -



How to load a VAADIN Java web page using curl or anything else -

for vaadin java application, created class wich loaded when go on designed web page.

this class must started each day @ 12:00am, wanted create bash script wich uses curl request designed page tolaod class , start everything.

them problem is, when tried page curl using

curl http://localhost:8080/cub2dv725/mailengine

i this:

<!doctype html> <html> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta http-equiv="x-ua-compatible" content="ie=11;chrome=1"> <style type="text/css">html, body {height:100%;margin:0;}</style> <link rel="shortcut icon" type="image/vnd.microsoft.icon" href="./vaadin/themes/reindeer/favicon.ico"> <link rel="icon" type="image/vnd.microsoft.icon" href="./vaadin/themes/reindeer/favicon.ico"> </head> <body scroll="auto" class=" v-generated-body"> <div id="cub2dv725marketingmailengine-730874983" class=" v-app reindeer"> <div class=" v-app-loading"></div> <noscript> have enable javascript in browser utilize application built vaadin. </noscript> </div> <iframe tabindex="-1" id="__gwt_historyframe" style="position:absolute;width:0;height:0;border:0;overflow:hidden" src="javascript:false"></iframe> <script type="text/javascript" src="./vaadin/vaadinbootstrap.js"></script> <script type="text/javascript">//<![cdata[ if (!window.vaadin) alert("failed load bootstrap javascript: .\/vaadin\/vaadinbootstrap.js"); if (typeof window.__gwtstatsevent != 'function') { vaadin.gwtstatsevents = []; window.__gwtstatsevent = function(event) {vaadin.gwtstatsevents.push(event); homecoming true;}; } vaadin.initapplication("cub2dv725marketingmailengine-730874983",{ "heartbeatinterval": 300, "versioninfo": { "vaadinversion": "7.2.5" }, "vaadindir": ".\/vaadin\/", "autherrmsg": { "message": "take note of unsaved data, , <u>click here<\/u> or press esc continue.", "caption": "authentication problem" }, "widgetset": "com.vaadin.defaultwidgetset", "theme": "reindeer", "debug": true, "comerrmsg": { "message": "take note of unsaved data, , <u>click here<\/u> or press esc continue.", "caption": "communication problem" }, "standalone": true, "sessexpmsg": { "message": "take note of unsaved data, , <u>click here<\/u> or press esc key continue.", "caption": "session expired" } }); //]]></script> </body> </html>

and class has not been loaded (i know because there system.out.print("loaded"); @ start of class.

i found solution using phantomjs

just created script.js code:

var page = require('webpage').create(); page.open('http://localhost:8080/cub2dv725/mailengine', function() { phantom.exit(); });

and bash script:

here, /var/lib/phantomjs extracted it

/var/lib/phantomjs/bin/phantomjs /var/scripts/script.js

now need add together crontab entry start script each day @ 12:00am

java curl tomcat7 vaadin

Comments

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -