Passwords via web for multiple systems

I have a web front in in Domino that the user is prompted for username and password. I need to also query the user for username and password for the Mainframe. None of the IDs or passwords are consistant across the systems, and we are not using single signon or LDAP.

How would be the best method of getting that information(password and username) for the mainframe and also passing it back and forth to the mainframe for each request of data?

I am currently using COM objects for testing with a generic ID, but that is for dev testing only and I am not passing password or username info and will go away when we start user testing, so I thought about passing it that way, but how do I keep that information consistant when the user goes from page to page?

The setup is Domino communicates with a host integrator via COM objects, and the request is processed by the middleware server and then the mainframe, and the response is sent back to Domino via the COM object.

Any help is greatly appreciated.

Subject: Passwords via web for multiple systems

Using profile docs in a protected (also encrypted?) Notes database (or SQL) database is probably the best solution. Every time user passes his mainframe password you put that value in profile doc and then you can use that value in your other scripts using his Domino name (which is always known for logged in users).By “profile docs” I mean documents created as normal docs “Set doc = new NotesDocument(db)” and not those useless profile docsuments which are created with “Set doc = db.GetProfileDocument(…”

You can also use servlets, web services, text files and other solutions for keeping userinfo but creating custom profile docs is the most easy and compatible solution.