Hi all, I'm not sure if this is the right forum for this post. If my doubt is correct,
I beg your pardon.
Anyway, I would like to ask a question on how I decided to implement the MVC pattern
for a simple javaEE application (when I say "javaEE" I mean pure javaEE without any additional
framework, so: servlet, jsp ejbeans...).
My mvc works in this way:
view -> a set of jsp pages;
controller -> a single servlet;
model -> a set of non-instantiable java classes containing static methods.
each user request is managed by the servlet which decides the correct
static method to call among the classes of the model. In particular,
each form in the jsps contains 3 hidden fields: classToCall, methodToCall
and destionationPage. Once the servlet receives the http post, it reads
these 3 hidden fields and 1) call the right method in the right class
2) moves the user to the correct jsp which displays the result of the
My doubt regards the implementation of the model as "static" classes: since many
frameworks tipically handle user requests by creating a bean on the fly and calling
an instance method of it, I would like to know if my "static" model can have any
Thanks a lot for your help, bye
Edited by: Nico on 29-ott-2011 14.53