as I understand from documentation :
values from your form should be set as parametes to method
setCredentials() off the service you like to use.
which ultiamtely will take them and use tomcatLogin to
authenticate agains container.
I have not tried it myself yet wiill do it tonight I am also
interested in how that works in practice.