Description: File f = new File("D:\\1.jpg")
Attachments attachments = new Attachments()
FileDataSource ds = new FileDataSource(f)
DataHandler dh = new DataHandler(ds)
attachments.addDataHandler("12345678", dh)
File list (Check if you may need any files):
LoginAction.java