I need to upload .dat file from jsp page. I am using struts. I am using
<input type="file" name="file" size=25 />
in jsp and in action class
FileUploadForm uploadForm = (FileUploadForm) form;
FormFile file = uploadForm.getFile();
InputStream stream = file.getInputStream();
After this I am confused. I dont want to open and read the dat file as the size of the may be big. I just wanna create/copy the same dat file in some specified path in server as per the original name of the dat file. How to do it?
And if there is no other way but read it then also tell me how read and write it to dat file.