I just started practicing struts, so I\'m kinda new to this framework. So, what I\'m trying to do is upload an image using this JSP file :
You can start with simple file upload example then you can see where the uploaded file is stored. If you get the uploaded file name is set you can copy file. You can prevent null pointer exception before you start saving.
if (myFileFileName != null)
InsertImage.save(this);
You can also add required
validator that will check the field value before your action is executed.