%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%> <%@ page import="org.apache.commons.fileupload.*" %> <%@ page import="java.io.BufferedReader" %> <%@ page import="java.io.File" %> <%@ page import="java.io.InputStream" %> <%@ page import="java.io.BufferedOutputStream" %> <%@ page import="java.io.InputStreamReader" %> <%@ page import="java.util.List" %> <%@ page import="org.crosswire.xml.XMLBlock" %> <%@ page import="org.crosswire.sword.keys.VerseKey" %> <% String userID = null; String xml = null; try { DiskFileUpload fu = new DiskFileUpload(); // maximum size before a FileUploadException will be thrown fu.setSizeMax(99000000); // maximum size that will be stored in memory fu.setSizeThreshold(4096); // the location for saving data that is larger than getSizeThreshold() fu.setRepositoryPath(session.getServletContext().getRealPath("tmp/")); List fileItems = fu.parseRequest(request); // assume we know there are two files. The first file is a small // text file, the second is unknown and is written to a file on // the server for (int i = 0; i < fileItems.size(); i++) { FileItem fi = (FileItem)fileItems.get(i); if (fi.isFormField()) { if ("userID".equals(fi.getFieldName())) { userID = fi.getString(); } } else { // filename on the client xml = convertRegToXML(fi.get()); } } } catch (Exception e) { e.printStackTrace(); } %>
scope | mss_sel | verse | sourceword | targetword | type | owner | mss | blocks | places | sel_plcs | comment |
---|---|---|---|---|---|---|---|---|---|---|---|
<%=verseText.length() > 0?"Verse" : "Global"%> | <%=verseText%> | <%=verses.length > v ? verses[v] : ""%> | <%=r.getValue("p")%> | <%=q%> | Spelling | <%=userID%> | <%=r.getAttribute("mss")%> | <%=r.getAttribute("blocks")%> | <%=r.getAttribute("places")%> | <%=r.getValue("sel_plcs")%> |