java - Right way to postprocess a file after upload with a JSP -


i have written jsp , class takes file upload , stores locally on server. after saving file, uploaded file processed. required method calls should not called statically file storage.

not this:

storefile (file); mypostprocessingmanager pm = new mypostprocessingmanager(file); pm.createthumbs(); pm.dofoobarwiththefile(); 

this coupling tight.

the methods should started on kind of "event". after uploading file event fired , informed appropriate classes carry out further processing.

the whole fails on fact not know , how need register appropriate listener. in instances done in main class. can not since not have central starting point.

i wrong track? maybe 1 of has idea?

thanks , greetings, ben


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -