To start off, form is an instance of coldfusion.filter.FormScope, which lives in cfusion\lib\cfusion.jar. If you're comfortable reading Java bytecode, you may find it interesting to inspect. Here are the methods it exposes publicly:
- String getEncoding() - Not a terribly interesting. Tells you your text encoding. For example, mine returned "UTF-8"
- List<com.oreilly.servlet.multipart.Part> getPartsArray() - Very interesting. Ever look at HTTP headers in your browser's inspector? Those go in here. If files are being submitted, you can get useful information by looking at the values here. I'll go into more depth on this later, when I talk about how I used this to properly support file uploads.
- coldfusion.util.FastHashtable getTempFiles() - On the ColdFusion side, FastHashtable is a struct. Every file submitted to this page will have an entry in this struct, indexed by the form field's name. The items stored in the struct are standard Java Files, pointing to the (temporary) place on your server where the file has been uploaded. For example, I just uploaded a text file which landed as C:\Coldfusion10\cfusion\runtime\conf\Catalina\localhost\tmp\neotmp6148837847015402066.tmp. You'll want to go through cffile to put that file somewhere useful.
- void processServerSideValidation() - My guess is that this is called by ColdFusion to perform validation on parameters that were passed in. You shouldn't have a need to call this yourself.
- void processServerSideValidation() - Another function that is probably only needed internally by ColdFusion
- void setEncoding(String) - The partner to getEncoding().
- void setEncoding(String, HttpServletRequest, ServletContext) - Another partner to getEncoding(). Do not touch.
- int size() - Tells you the number of items in the form scope (includes form.fieldNames)