diff options
author | tkellner <tkellner@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4> | 2012-10-16 14:57:13 +0000 |
---|---|---|
committer | tkellner <tkellner@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4> | 2012-10-16 14:57:13 +0000 |
commit | 20470a3c7cdc57d782bdeaafcbcb0bf86c4e71bb (patch) | |
tree | ce260336c756fc741ac590c73a3ab31712b55bea /BKUOnline/src/main/java/at/gv/egiz | |
parent | fe92034a92f420baaa2545aa31801ff15cae0865 (diff) | |
download | mocca-20470a3c7cdc57d782bdeaafcbcb0bf86c4e71bb.tar.gz mocca-20470a3c7cdc57d782bdeaafcbcb0bf86c4e71bb.tar.bz2 mocca-20470a3c7cdc57d782bdeaafcbcb0bf86c4e71bb.zip |
Set a compact P3P Policy header to let IE accept cookies
git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@1149 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4
Diffstat (limited to 'BKUOnline/src/main/java/at/gv/egiz')
4 files changed, 16 insertions, 0 deletions
diff --git a/BKUOnline/src/main/java/at/gv/egiz/bku/online/webapp/MoccaParameterBean.java b/BKUOnline/src/main/java/at/gv/egiz/bku/online/webapp/MoccaParameterBean.java index e6a79e97..74d6515d 100644 --- a/BKUOnline/src/main/java/at/gv/egiz/bku/online/webapp/MoccaParameterBean.java +++ b/BKUOnline/src/main/java/at/gv/egiz/bku/online/webapp/MoccaParameterBean.java @@ -67,6 +67,8 @@ public class MoccaParameterBean { public static final String PARAM_LOCALE = "locale"; public static final Pattern PATTERN_LOCALE = Pattern.compile("[a-zA-Z][a-zA-Z](_[a-zA-Z][a-zA-Z]){0,2}"); + public static final String P3P_POLICY = "CP=\"NON DSP COR CUR ADM DEV TAI PSA PSD OUR DEL IND UNI COM NAV INT CNT STA\""; + private Charset charset = Charset.forName("ISO-8859-1"); private HTTPBindingProcessor bindingProcessor; diff --git a/BKUOnline/src/main/java/at/gv/egiz/bku/online/webapp/ResultServlet.java b/BKUOnline/src/main/java/at/gv/egiz/bku/online/webapp/ResultServlet.java index 4eb7ea66..db59ad5d 100644 --- a/BKUOnline/src/main/java/at/gv/egiz/bku/online/webapp/ResultServlet.java +++ b/BKUOnline/src/main/java/at/gv/egiz/bku/online/webapp/ResultServlet.java @@ -87,6 +87,9 @@ public class ResultServlet extends HttpServlet { protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, java.io.IOException { + // Set P3P Policy Header + resp.addHeader("P3P", MoccaParameterBean.P3P_POLICY); + BindingProcessorManager bindingProcessorManager = (BindingProcessorManager) getServletContext() .getAttribute("bindingProcessorManager"); if (bindingProcessorManager == null) { diff --git a/BKUOnline/src/main/java/at/gv/egiz/bku/online/webapp/UIServlet.java b/BKUOnline/src/main/java/at/gv/egiz/bku/online/webapp/UIServlet.java index 516f75ea..8d5eacd9 100644 --- a/BKUOnline/src/main/java/at/gv/egiz/bku/online/webapp/UIServlet.java +++ b/BKUOnline/src/main/java/at/gv/egiz/bku/online/webapp/UIServlet.java @@ -70,6 +70,9 @@ public class UIServlet extends HttpServlet { protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { + // Set P3P Policy Header + resp.addHeader("P3P", MoccaParameterBean.P3P_POLICY); + BindingProcessorManager bindingProcessorManager = (BindingProcessorManager) getServletContext() .getAttribute("bindingProcessorManager"); if (bindingProcessorManager == null) { @@ -110,6 +113,10 @@ public class UIServlet extends HttpServlet { @Override protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { + + // Set P3P Policy Header + resp.addHeader("P3P", MoccaParameterBean.P3P_POLICY); + super.doPost(req, resp); } diff --git a/BKUOnline/src/main/java/at/gv/egiz/bku/online/webapp/WebRequestHandler.java b/BKUOnline/src/main/java/at/gv/egiz/bku/online/webapp/WebRequestHandler.java index 8c8d27b2..72443b27 100644 --- a/BKUOnline/src/main/java/at/gv/egiz/bku/online/webapp/WebRequestHandler.java +++ b/BKUOnline/src/main/java/at/gv/egiz/bku/online/webapp/WebRequestHandler.java @@ -56,6 +56,10 @@ public class WebRequestHandler extends HttpServlet { protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, java.io.IOException { + + // Set P3P Policy Header + resp.addHeader("P3P", MoccaParameterBean.P3P_POLICY); + BindingProcessorManager bindingProcessorManager = (BindingProcessorManager) getServletContext() .getAttribute("bindingProcessorManager"); if (bindingProcessorManager == null) { |