File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSP and the fly likes Simple Command MVC webapp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Simple Command MVC webapp" Watch "Simple Command MVC webapp" New topic

Simple Command MVC webapp

Dan Parsons
Ranch Hand

Joined: May 30, 2007
Posts: 70
I want to create a JSP Form page (first.jsp) on Tomcat 4.1.27 with a form that has about 20 input entries where the form will validate all 20 fields and show validation errors on the same page as the original form page (first.jsp). For example, if someone has a blank entry on the Firstname field then it will show this message in red next to the field: First Name is required.

If the data passes the validations it will populate an Oracle database.

I think Ben Souther's Simple Command MVC webapp (http://localhost:8080/SimpleCommand/) will be perfect for what I am going to do where I can make some minor changes to fit what I want.
Please advise if this is a good idea to use the SimpleCommand webapp for my project?? If so, any other ideas or suggestions??
[ July 31, 2007: Message edited by: Dan Parsons ]
Ben Souther

Joined: Dec 11, 2004
Posts: 13410

The intent of SimpleCommand was to teach, with the simplest app possible, the concept of the command pattern or front controller pattern as used in server side Java apps.

For simplicity's sake, in the controller, I branched on a form parameter.
Most real world implementations will parse the URL, and use the last part of that to determine what command or action to execute.

If you want something that is more ready for prime time but not as intrusive as most other frameworks, take a look at Bear Bibeault's FrontMan framework.
I've been using it in some of my own work lately and it's been a real time saver.

If you've already been through SimpleMVC and SimpleCommand, learning it should be a snap. It took me about 20 minutes to get up and running with it.

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
I agree. Here's the link:
subject: Simple Command MVC webapp
It's not a secret anymore!