From 43e57a42832ea8b4ceb0317f3c9028a4174ffa7b Mon Sep 17 00:00:00 2001 From: mcentner Date: Wed, 8 Aug 2007 07:25:32 +0000 Subject: Adapted project directory structure to suit the new maven based build process. git-svn-id: https://joinup.ec.europa.eu/svn/moa-idspss/trunk@909 d688527b-c9ab-4aba-bd8d-4036d912da1d --- id/oa/src/main/webapp/index.jsp | 60 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 id/oa/src/main/webapp/index.jsp (limited to 'id/oa/src/main/webapp/index.jsp') 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" %> + + +Sample Online Application + + +

Sample Online Application

+ +

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

+ +<% String query=request.getQueryString(); %> +

QueryString: "<%=query%>" +

+ +

Request parameters: + + <% + /* collect parameters from request */ + for (Enumeration params = request.getParameterNames(); params.hasMoreElements(); ) { + String name = (String) params.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