%-- Document : import_test Created on : Feb 11, 2008, 12:59:28 PM Author : aili --%> <%@page contentType="text/html" pageEncoding="UTF-8" import="java.util.*,java.lang.*,java.io.*,pets.beans.*,org.apache.commons.fileupload.*" %> <%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%> <%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%> <% if(FileUpload.isMultipartContent(request)) { DiskFileUpload fileUpload= new DiskFileUpload(); List items = fileUpload.parseRequest(request); if (items.size()>0){ Iterator iter = items.iterator(); while (iter.hasNext()) { FileItem item = (FileItem) iter.next(); if (!item.isFormField()) { if(item.getSize()>0){ try { Integer user_id = sess.getLoggedInUserId(); Integer hasTest = ejb.import_test(item, user_id); if (hasTest == 0) { %><% } else if (hasTest == 1) { %><% } } catch (Exception e) { System.out.println("error:" + e); } } } } } } %> <%@ include file="../../../WEB-INF/jspf/Header.jspf" %> <%@ include file="../../../WEB-INF/jspf/UserMenu.jspf" %> " /> " onClick="window.location.href='tests_management.faces'" /> <%@ include file ="../../../WEB-INF/jspf/Footer.jspf" %>