Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Servlet Model-View-Controller (MVC)

843842Apr 18 2009 — edited Apr 21 2009
I'm working on a servlet where I can show the Client DB stuff via my doGET() || doPost(). Thing is, I'm looking to create 4 pages to which users can access where they must first be logged in. This includes.:
.
- Registration Page // check link below
- Login Page // also in link
- Signup Page // ohh and guess what.. no way, its in the link too
- Main Page // my custom page (shows info to client from the DB)

I'm just doing this for the sake of learning and if the login page looks like crap that's because it actually is crap. Either way, I'd still like to create this servlet the proper way. So... after some reading I found the famous "Model-View-Controller" (MVC) paradigm but found it looks really complicated.

I've found a tutorial here, [ Servlet Controller Sample|http://www.javafaq.nu/java-example-code-1033.html]

I was confused about a few things in this tutorial, to name a few, why does the login.jsp page do a <form action="post"> to the subscribe.HTML page? why not communicate directly with the servletcontroller / listcontroller?

Has anyone used this type of MVC design before? If you think I shouldn't go with this, can I also have session tracking without using this Front Controller Servlet so that all requests get redirect to the appropriate pages, things like.. if user is not logged in.. then redirect to him/her to the login page but if user is logged in redirect to main page.

Which approach would you guys recommend where I can have the possibility of logging in clients and accessing a Database?

Did I just go way over my head here or is this all realistic?

Any thoughts/suggestions/rants would be really really appreciated.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 19 2009
Added on Apr 18 2009
2 comments
745 views