Mercurial > hg > digilib
view webapp/src/main/webapp/dlInfo-xml.jsp @ 1169:888cdaf022fe
shuffling classes around: moved last servlet dependencies from common to new servlet module.
moved common code from servlet2 and servlet3 to servlet.
moved DigilibConfiguration and DigilibRequest to digilib.conf package (needs changes in JSPs).
author | robcast |
---|---|
date | Wed, 27 Mar 2013 17:23:44 +0100 |
parents | de9c762ef86b |
children |
line wrap: on
line source
<%-- #%L digilib-webapp %% Copyright (C) 2004 - 2013 MPIWG Berlin %% This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Lesser Public License for more details. You should have received a copy of the GNU General Lesser Public License along with this program. If not, see <http://www.gnu.org/licenses/lgpl-3.0.html>. #L% Author: Robert Casties (robcast@berlios.de) --%><%@ page language="java" import="digilib.servlet.DocumentBean, digilib.conf.DigilibServletRequest"%><%! // create DocumentBean instance for all JSP requests DocumentBean docBean = new DocumentBean(); // initialize DocumentBean instance in JSP init public void jspInit() { try { // set servlet init-parameter docBean.setConfig(getServletConfig()); } catch (javax.servlet.ServletException e) { System.out.println(e); } } %><?xml version="1.0" encoding="UTF-8" ?> <% // process request // parsing the query DigilibServletRequest dlRequest = new DigilibServletRequest(request); docBean.setRequest(dlRequest); %><!-- Automatically generated XML snippet with document parameters --> <document-parameters> <% Object[] keys = dlRequest.getParams().keySet().toArray(); java.util.Arrays.sort(keys); int l = keys.length; for (int i = 0; i < l; i++) { String key = (String) keys[i]; String val = dlRequest.getAsString(key); if (val.length() == 0) { val = ""; } %> <parameter name="<%= key %>" value="<%= val %>"/> <% } %></document-parameters>