I\'ve read heaps of blogs on Vim\'s supposedly great omnicompletion, and yet no matter what I do I can\'t get it to work satisfactorily. It took me ages to figure discover that
Here is a "JDE" feature for vim: http://www.vim.org/scripts/script.php?script_id=1213 One of the listed features is "Code completion ( working for java and jsp,taglib,html,xml,xsl,xsd) (VIM 7.0 required) "
And here is a Java autocompletion script: http://vim.sourceforge.net/scripts/script.php?script_id=1785
This one isn't Java, but I found it to be quite clear and understandable; perhaps it might be worth reading. Here is a recipe on setting up autocompletion for Drupal. A custom AWK script builds an autocompletion dictionary for vim. http://www.thingy-ma-jig.co.uk/blog/18-08-2009/drupal-autocomplete-vim
Good luck.