%@ page import="java.text.SimpleDateFormat"%> <%@ page import="java.io.File"%> <%@ page import="java.net.URL"%> <%@ page import="java.net.URLEncoder"%> <%@ page import="java.net.MalformedURLException"%> <%@ page import="java.io.IOException"%> <%@ page import="java.io.FileOutputStream"%> <%@ page import="java.io.FileInputStream"%> <%@ page import="java.io.InputStream"%> <%@ page import="java.util.Vector"%> <%@ page import="org.crosswire.community.data.User"%> <%@ page import="org.crosswire.community.data.Document"%> <%@ page import="org.crosswire.xml.XMLRepo"%> <%@ page import="org.crosswire.sword.mgr.SWMgr"%> <%@ page import="org.crosswire.sword.modules.SWModule"%> <%@ page import="org.crosswire.sword.mgr.SWConfig"%> <%@ page import="com.objectspace.jgl.HashMap"%> <%@ page import="com.objectspace.jgl.Map"%> <%@ page import="java.util.Enumeration"%> <%@ page import="java.awt.image.BufferedImage"%> <%@ page import="java.awt.Graphics2D"%> <%@ page import="javax.imageio.ImageIO"%> <% String projectName = request.getParameter("project"); if (projectName == null) projectName = "indexing"; XMLRepo repo = XMLRepo.instance(pageContext); String user = request.getParameter("user"); String doc = request.getParameter("doc"); if (user == null || doc == null) { out.print("
Must specify parameters: user,doc"); return; } { SimpleDateFormat df = new SimpleDateFormat("dd-MMM-yyyy"); String root = session.getServletContext().getContextPath(); String libURL = "/users/" + user + "/library"; String libPath = session.getServletContext() .getRealPath(libURL); File file = new File(libPath); if (!file.exists()) { out.print("user: "+user+" has no library"); return; } Document modDoc = (Document)repo.get(new Document(user, doc), false); if (modDoc == null) { out.print("user: "+user+" has no document named: "+doc+""); return; } %>