aboutsummaryrefslogtreecommitdiff
path: root/id/oa/src/main/webapp/index.jsp
diff options
context:
space:
mode:
authorkstranacher <kstranacher@d688527b-c9ab-4aba-bd8d-4036d912da1d>2012-02-20 11:21:24 +0000
committerkstranacher <kstranacher@d688527b-c9ab-4aba-bd8d-4036d912da1d>2012-02-20 11:21:24 +0000
commitd3352bc9db1891c8f90f8c542eac65da64a234d3 (patch)
treef7b7c932e39e201d22ef5232bf90081c2d357885 /id/oa/src/main/webapp/index.jsp
parent9b1af165432c82d64f49d3e3730534b224230b53 (diff)
parentb858a62942137068394790a22c10b968e1c41e0f (diff)
downloadmoa-id-spss-dd91951b305a143b38daa08f08175d65c09705a5.tar.gz
moa-id-spss-dd91951b305a143b38daa08f08175d65c09705a5.tar.bz2
moa-id-spss-dd91951b305a143b38daa08f08175d65c09705a5.zip
MOA-IDSPSS Release 1.5.1.tags/1.5.1
git-svn-id: https://joinup.ec.europa.eu/svn/moa-idspss/tags/1.5.1@1271 d688527b-c9ab-4aba-bd8d-4036d912da1d
Diffstat (limited to 'id/oa/src/main/webapp/index.jsp')
-rw-r--r--id/oa/src/main/webapp/index.jsp60
1 files changed, 60 insertions, 0 deletions
diff --git a/id/oa/src/main/webapp/index.jsp b/id/oa/src/main/webapp/index.jsp
new file mode 100644
index 000000000..35e49d743
--- /dev/null
+++ b/id/oa/src/main/webapp/index.jsp
@@ -0,0 +1,60 @@
+<%@ page import="java.util.*,javax.servlet.http.*,sun.misc.BASE64Decoder" %>
+<html>
+<head>
+<title>Sample Online Application</title>
+</head>
+<body>
+<h1>Sample Online Application</h1>
+
+<p>Request headers:
+<table border="1">
+ <%
+ /* collect parameters from request */
+ for (Enumeration headers = request.getHeaderNames(); headers.hasMoreElements(); ) {
+ String key = (String) headers.nextElement();
+ String value = request.getHeader(key); %>
+ <tr><td><%=key%></td><td><%=value%></td></tr>
+ <% } %>
+</table>
+</p>
+
+<% String query=request.getQueryString(); %>
+<p>QueryString: "<%=query%>"
+</p>
+
+<p>Request parameters:
+<table border="1">
+ <%
+ /* collect parameters from request */
+ for (Enumeration params = request.getParameterNames(); params.hasMoreElements(); ) {
+ String name = (String) params.nextElement();
+ String value = request.getParameter(name); %>
+ <tr><td><%=name%></td><td><%=value%></td></tr>
+ <% } %>
+</table>
+</p>
+
+<p>Cookies:
+<table border="1">
+ <%
+ /* collect attributes from request */
+ Cookie[] cookies = request.getCookies();
+ if (cookies != null) {
+ for (int i = 0; i < cookies.length; i++) {
+ Cookie cookie = cookies[i]; %>
+ <tr><td><%=cookie.getName()%></td><td><%=cookie.getValue()%></td></tr>
+ <% }
+ } %>
+</table>
+</p>
+
+<% String authHeader = request.getHeader("Authorization");
+ if (authHeader != null) {
+ authHeader = authHeader.substring(authHeader.indexOf(" ")+1);
+ String decAuthHeader = new String(new BASE64Decoder().decodeBuffer(authHeader));
+%>
+<p>Basic authentication credentials: <%=decAuthHeader%></p>
+<% } %>
+<p><a href="form.jsp">Form sample</a></p>
+</body>
+</html> \ No newline at end of file