You can buy this project and download/modify it how often you want.
HTML Test Page tn5250j - tn5250 client written in java.