comparison client/src/main/webapp/dlInfo-xml.jsp @ 892:ba1eb2d821a2 mvnify

rearrange sources to maven directory standard
author robcast
date Tue, 19 Apr 2011 18:44:25 +0200
parents client/digitallibrary/dlInfo-xml.jsp@0885f5ca5b24
children
comparison
equal deleted inserted replaced
891:6584af320296 892:ba1eb2d821a2
1 <%@ page language="java" %><%!
2 // create DocumentBean instance for all JSP requests
3 digilib.servlet.DocumentBean docBean = new digilib.servlet.DocumentBean();
4
5 // initialize DocumentBean instance in JSP init
6 public void jspInit() {
7 try {
8 // set servlet init-parameter
9 docBean.setConfig(getServletConfig());
10 } catch (javax.servlet.ServletException e) {
11 System.out.println(e);
12 }
13 }
14 %><?xml version="1.0" encoding="UTF-8" ?>
15 <%
16 // process request
17 // get digilib config
18 digilib.servlet.DigilibConfiguration dlConfig = docBean.getDlConfig();
19 // parsing the query
20 digilib.servlet.DigilibRequest dlRequest = new digilib.servlet.DigilibRequest(request);
21 docBean.setRequest(dlRequest);
22
23 %><!-- Automatically generated XML snippet with document parameters -->
24 <document-parameters>
25 <%
26 Object[] keys = dlRequest.getParams().keySet().toArray();
27 java.util.Arrays.sort(keys);
28 int l = keys.length;
29 for (int i = 0; i < l; i++) {
30 String key = (String) keys[i];
31 String val = dlRequest.getAsString(key);
32 if (val.length() == 0) {
33 val = "";
34 }
35 %> <parameter name="<%= key %>" value="<%= val %>"/>
36 <%
37 }
38 %></document-parameters>