Processing HTML Form Data

The javaxt-server library includes an innovative form processor that makes it easy to upload files and process HTML form data. Here's an example:
package com.example;
import javaxt.http.servlet.*;

public class ServletTest extends HttpServlet {

    public void processRequest(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, {


      //Instantiate the form iterator and loop through the form inputs
        java.util.Iterator<FormInput> it = request.getFormInputs();
        while (it.hasNext()){
            FormInput input =;
            if (input.isFile()){

              //Save file to a directory
                input.getValue().toFile(new"/temp/uploads/" + input.getFileName()));

              //Simply print the input name/value
                System.out.println(input.getName() + ": " + input.getValue());