Post form fields and upload files to an XPage

My employeer has assigned me the following task:

a) Create an ‘index’ page containing only a HTML with fields (like Firstname and Lastname) as well as a couple of file upload controls and a ‘Submit’ button which will post everything to an XPage (see b below).

b) Create an XPage which should receive form field names and values as well as the uploaded files and send an email to someone with it all. The XPage has no ‘normal’ UI (XPage renderer set to false) and should just redirect the user to somewhere else after successfull retrieval of posted data.

So now my question is: The index page is not problem, but I’d like to know how to use an XPage to retrieve the form fields and file uploads?

Subject: A combination of DbLookup, getDocument, getAttactments…

or are you looking at some other area?

Subject: I wan’t to get the uploaded file stream and form fields

I don’t understand your answer, but I need to make the logic on the XPage RECEIVE/READ/PARSE the posted form fields and uploaded files(s).

I’ll just use the XPage as a kind of servlet so I won’t be using it “the normal way” which would include file upload controls etc. I wan’t it to dive deeper into the stream comming from the client.