webMathematica provides a number of key functions for working with web features such as HTTP sessions and file upload.
MSPReturn — halt processing of the current page and return a different result
MSPSessionVariable — scope a variable to an HTTP session
MSPGetUploadFile — get the name of a file uploaded with the HTTP request
MSPURLStore — store a result on the server that can be retrieved with a URL