As I understand the situation, the most crucial problem will be to play the samples as loops & with a release phase. All web-audio I saw so far just plays audio files as they are. Looping in that context typically means just repeating the audio file. The piano website (http://mudcu.be/piano/) is no exception. Apparently, it just plays a sample without internal looping.
Splitting the samples in a loop and a release file could be a solution if there's a way to play samples immediately after each other without a delay and witouth overlap. I'm not aware of a way to do that that works on all/most popular browsers. Perhaps, it's possible to stream the audio data from javascript running as part of the web site to the browsers player? That way, it may be possible to "switch" between the sample parts as needed.
That said, if Java is needed for the midi interface anyway, it may be possible to implement the whole thing in Java. Though, as Masi wrote, that would not work on iOS... BTW: would it be possible to access a midi keyboard from an iOS browser?
Might be an example against the "HTML5 will destroy all native apps" point of view.