I am uploading image into DataBase. Before uploading the image,validate the image file format .
The file format should be (*.png,*.jpeg,*.jpg,*.gif) ,for other types must show error. this is the logic.
this is my jsp <form:form commandName="event" id="eventForm" name="eventForm" method="post" enctype="multipart/form-data">