added a random id to avoid browser cache

git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/data-transfer/uri-resolver@122524 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Francesco Mangiacrapa 2016-01-26 15:22:37 +00:00
parent bf498fc721
commit 5189be3d57
1 changed files with 52 additions and 51 deletions

View File

@ -8,6 +8,7 @@ import java.io.StringReader;
import java.net.URLEncoder;
import java.util.HashMap;
import java.util.Map;
import java.util.Random;
import java.util.Timer;
import java.util.TimerTask;
@ -211,7 +212,7 @@ public class GisResolver extends HttpServlet{
String gisPortletUrl = getGisViewerApplicationURL(scope);
logger.info("Gis Viewer Application url is: " + gisPortletUrl);
gisPortletUrl+="?wmsrequest="+wmsRequest;
gisPortletUrl+="?rid="+new Random().nextLong()+"&wmsrequest="+wmsRequest;
/*resp.setContentType(TEXT_PLAIN);
resp.setCharacterEncoding(UTF_8);
@ -351,7 +352,7 @@ public class GisResolver extends HttpServlet{
StringBuffer url = new StringBuffer();
url.append(scheme).append("://").append(serverName);
if ((serverPort != 80) && (serverPort != 443)) {
if (serverPort != 80 && serverPort != 443) {
url.append(":").append(serverPort);
}