I'm trying to upload a file from an .jsp. This is the .jsp part
<form class="user" action="./messaggio" method="POST" enctype="multipart/form-data">
//other input
<input type="file" name="allegato" id="allegato">
//other things
The file should be converted in a Base64 String and stored into the DB. I'm using Tomcat 8.5 and 3.1 Servlet and i have to do it server side without using JS. I really don't know how to continue. I've looking on stackoverflow without understandig well what's the exact process to follow. I'm not looking for the code, but the flow of the event. Sorry for my english. Thanks.