Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Simple Command MVC webapp

 
Dan Parsons
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

http://www.coderanch.com/t/34646/ba/Front-Man
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic