Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Get "caption": "Authentication problem" when HttpPost to vaadin
I am trying to httpPost vaadin project url
String url = "http://localhost:8080/ProjectName/";
client = new DefaultHttpClient();
HttpPost request = new HttpPost(url + parameter); // here you put the entire URL with the GET parameters
HttpResponse response = client.execute(request);
// from here is postprocessing to handle the response, in my case JSON
BufferedReader rd = new BufferedReader(new InputStreamReader(response.getEntity().getContent()));
String line = "";
StringBuilder sb = new StringBuilder("");
while ((line = rd.readLine()) != null) {
sb.append(line);
}
Returning string is like below.
Why always returning
: "caption": "Authentication problem", and : "caption": "Communication problem" . ???
What do i have to do to overcome these problems?
<!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">
<title>ProjectName</title>
<style type="text/css">html, body {height:100%;margin:0;}</style>
<link rel="shortcut icon" type="image/vnd.microsoft.icon" href="./VAADIN/themes/dashboard/favicon.ico">
<link rel="icon" type="image/vnd.microsoft.icon" href="./VAADIN/themes/dashboard/favicon.ico">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0, user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<link rel="apple-touch-icon" href="/ProjectName/VAADIN/themes/dashboard/img/app-icon.png">
</head>
<body scroll="auto" class=" v-generated-body">
<div id="ProjectName-136206756" class=" v-app dashboard">
<div class=" v-app-loading"></div>
<noscript> You have to enable javascript in your browser to use an application built with Vaadin. </noscript>
</div>
<script type="text/javascript" src="./VAADIN/vaadinBootstrap.js"></script>
<script type="text/javascript">//<![CDATA[if (!window.vaadin) alert("Failed to load the bootstrap javascript: ./VAADIN/vaadinBootstrap.js");if (typeof window.__gwtStatsEvent != 'function')
{vaadin.gwtStatsEvents = [];window.__gwtStatsEvent = function(event) {vaadin.gwtStatsEvents.push(event); return true;};}
vaadin.initApplication("ProjectName-136206756",{ "authErrMsg": { "caption": "Authentication problem",
"message": "Take note of any unsaved data, and <u>click here<\/u> or press ESC to continue." },
"comErrMsg": { "caption": "Communication problem", "message": "Take note of any unsaved data, and <u>click here<\/u> or press ESC to continue." },
"debug": true, "heartbeatInterval": 600, "serviceUrl": ".", "sessExpMsg": { "caption": "Session Expired", "message": "Session expired" },
"standalone": true, "theme": "dashboard", "vaadinDir": "./VAADIN/", "versionInfo": {"vaadinVersion": "7.3.8"}, "widgetset": "com.ProjectName.WidgetSet"});//]]></script>
</body>
</html>
Hi,
you can't really use a Vaadin application without a browser (with JavaScript support). You should maybe consider setting up a REST service instead?
-Olli