I am trying to write a Java program that runs on the server as a CGI and then it will be able to save an uploaded file.

I am running on an MVS system so I can't use imports like javax.* or apache.* and most examples use those imports.

<input type="file" name="filename">

I have code that parses the data from the HTML POST but I am not clear on how I get the Data Input Stream to save it on the Server ?