From 59f78a67d7357fd31de68fc2b623f95b3d654ebc Mon Sep 17 00:00:00 2001 From: rudolf Date: Fri, 24 Oct 2003 08:18:40 +0000 Subject: MOA-ID version 1.1 (initial) git-svn-id: https://joinup.ec.europa.eu/svn/moa-idspss/trunk@18 d688527b-c9ab-4aba-bd8d-4036d912da1d --- id.oa/html/index.jsp | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 id.oa/html/index.jsp (limited to 'id.oa/html/index.jsp') diff --git a/id.oa/html/index.jsp b/id.oa/html/index.jsp new file mode 100644 index 000000000..5111e5103 --- /dev/null +++ b/id.oa/html/index.jsp @@ -0,0 +1,56 @@ +<%@ page import="java.util.*,javax.servlet.http.*,sun.misc.BASE64Decoder" %> + + +Sample Online Application + + +

Sample Online Application

+ +

Request headers: + + <% + /* collect parameters from request */ + for (Enumeration enum = request.getHeaderNames(); enum.hasMoreElements(); ) { + String key = (String) enum.nextElement(); + String value = request.getHeader(key); %> + + <% } %> +
<%=key%><%=value%>
+

+ +

Request parameters: + + <% + /* collect parameters from request */ + for (Enumeration enum = request.getParameterNames(); enum.hasMoreElements(); ) { + String name = (String) enum.nextElement(); + String value = request.getParameter(name); %> + + <% } %> +
<%=name%><%=value%>
+

+ +

Cookies: + + <% + /* collect attributes from request */ + Cookie[] cookies = request.getCookies(); + if (cookies != null) { + for (int i = 0; i < cookies.length; i++) { + Cookie cookie = cookies[i]; %> + + <% } + } %> +
<%=cookie.getName()%><%=cookie.getValue()%>
+

+ +<% String authHeader = request.getHeader("Authorization"); + if (authHeader != null) { + authHeader = authHeader.substring(authHeader.indexOf(" ")+1); + String decAuthHeader = new String(new BASE64Decoder().decodeBuffer(authHeader)); +%> +

Basic authentication credentials: <%=decAuthHeader%>

+<% } %> +

Form sample

+ + \ No newline at end of file -- cgit v1.2.3