Package org.xadoop.servlet.utils

Examples of org.xadoop.servlet.utils.PostRequest


  public static final String ACTIONNAME = "login";

  public AbstractResult execute(HttpServletRequest req) {

    // get required parameters
    PostRequest postReq = new PostRequest();
    try {
      postReq.parse(req, null, false);
    } catch (Exception e) {
      return new Failure(e.getMessage());
    }
    String username = postReq.getFormField(LoginPage.USERNAME);
    String enteredPw = postReq.getFormField(LoginPage.PASSWORD);
    if (username == null) {
      return new Failure("No username given.");
    }
    if (username.length() > 40) {
      return new Failure("Too long username entered.");
View Full Code Here


    ServletContext ctx = req.getSession().getServletContext();
    String pathUploadDir = (String) ctx.getAttribute(XadoopConstants.CTX_PATHUPLOADDIR);
    XadoopConfig config = (XadoopConfig) ctx.getAttribute(XadoopConstants.CTX_CONFIG);

    // get required parameters
    PostRequest postReq = new PostRequest();
    try {
      postReq.parse(req, pathUploadDir, true);
    } catch (Exception e) {
      return new Failure(e.getMessage());
    }
    String xqueryengine = postReq.getFormField(XQueryMRPage.XMLPARSER);
    String querytext = postReq.getFormField(XQueryMRPage.QUERYTEXT);
    String streamingEnabled = postReq.getFormField(XQueryMRPage.STREAMING_SUPPORT);
    String datatext = postReq.getFormField(XQueryMRPage.DATATEXT);
    String dataExists = postReq.getFormField(XQueryMRPage.DATAEXISTS);
    String datafile = postReq.getFormField(XQueryMRPage.DATAFILE);
    String datapath = postReq.getFormField(XQueryMRPage.DATAPATH);
    String numTasksMapStr = postReq.getFormField(XQueryMRPage.NUMTASKSMAP);
    String numTasksRedStr = postReq.getFormField(XQueryMRPage.NUMTASKSRED);
   
    // execution directory
    Date now = new Date();
    String pathExecDir = pathUploadDir + execDirFormat.format(now) + "/";
    File execDir = new File(pathExecDir);
View Full Code Here

TOP

Related Classes of org.xadoop.servlet.utils.PostRequest

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.