Mercurial > hg > digilib-old
view client/digitallibrary/dlInfo-json.jsp @ 754:ce5a0e6b5ee9 jquery
reading image info asynchronously works now. has just no use yet.
author | robcast |
---|---|
date | Sun, 06 Feb 2011 00:12:47 +0100 |
parents | 39bd5128811c |
children |
line wrap: on
line source
<%@ page language="java" %> <%! // create DocumentBean instance for all JSP requests digilib.servlet.DocumentBean docBean = new digilib.servlet.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); } } %><% // parsing the query digilib.servlet.DigilibRequest dlRequest = new digilib.servlet.DigilibRequest(request); docBean.setRequest(dlRequest); %> // JSON format metadata about request and image { <% 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 = ""; } %>"<%= key %>" : "<%= val %>", <% } %> }