I have faced simillar problem. What you need to do is replace the files Forms6.nsf & Forms5.nsf under the folder iNotes in the Domino Data Directory. If you have a backup of these file at the time when webmail was working properly replace these files from backup else setup up a fresh domino server temporarily and copy the files from the fresh installation.
Do always keep a backup of the existing copy before you make any changes. Also if you are running yourt domino server under cluster mode you need to shutdown all domino servers, replace the files and start the servers one by one.