wood burning stoves*
The moose likes Cattle Drive and the fly likes Servlets-3a and MVC Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » This Site » Cattle Drive
Bookmark "Servlets-3a and MVC" Watch "Servlets-3a and MVC" New topic
Author

Servlets-3a and MVC

Dick Summerfield
Ranch Hand

Joined: Oct 04, 2007
Posts: 90
While waiting for a nitpick on Servlets-1, I've been looking ahead even as far as Servlets-3a and can honestly say that for the first time I really feel like using the icon...
I have the BeeServlet using the MVC pattern working (I kept typing BeerServlet - wonder why? -and eventually gave up and made it say
glug... glug... instead of buzz... buzz...).

A saw it as a good start towards Servlets-3a. However that needs input, and submit and feedback on the same screen layout as the input - seems too big a leap for me at the moment .

I'd thought about studying Servlets from a book I'd found on the web, ("Core Servlets and Java Server Pages" by Marty Hall -http://pdf.coreservlets.com/)
Maybe I'll still do this, but when they get to the MVC bit they start talking about, Struts, Beans and I don't know what - I get the impression we are supposed to keep it free of those things(?)

Also,they don't seem to mention ActionServlet etc. - at least not our homemade one, on javaranch.common...

I found a SimpleMVC example servlet in CodeBarn from Ben Souther - but was I little bit disappointed (sorry, Ben ) not to find any source - only a .war (Web Application Archive). I tried briefly to get it running but it's based on the TomCat Server and us cowpokes use Orion .

Any tips about where to look and for what, would be most welcome (I've already done quite a bit of forum searching on things like ActionServlet, MVC, Servlets-3a, Reverse2, etc. but this has, if anything, only
served to increase my confusion

Dick.
[ February 20, 2008: Message edited by: Dick Summerfield ]
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9044
    
  10
... A saw it as a good start towards Servlets-3a. However that needs input, and submit and feedback on the same screen layout as the input - seems too big a leap for me at the moment .

Input and submit are covered in Assignment Servlets-2 (Reverse).

Assignment Servlets-3a (Reverse2) adds feedback on the same screen layout. One step at a time.

I'd thought about studying Servlets from a book I'd found on the web, (Core Servlets and Java Server Pages) by Marty Hall. Maybe I'll still do this, but when they get to the MVC bit they start talking about, Struts, Beans and I don't know what - I get the impression we are supposed to keep it free of those things(?)

ActionServlet is much simpler than Struts, Beans, etc.

Also,they don't seem to mention ActionServlet etc. - at least not our homemade one, on javaranch.common...

You can look at the source code of ActionServlet if you want to ... or you can view the javadoc which is linked to from the com.javaranch.common page (which you've probably already forgotten about since OOP-1)

I found a SimpleMVC example servlet in CodeBarn from Ben Souther - but was I little bit disappointed (sorry, Ben ) not to find any source - only a .war (Web Application Archive). I tried briefly to get it running but it's based on the TomCat Server and us cowpokes use Orion .


We are planning to move to Tomcat if I ever get time to work on the documentation (and the revised instructor's solutions)

Any tips about where to look and for what, would be most welcome (I've already done quite a bit of forum searching on things like ActionServlet, MVC, Servlets-3a, Reverse2, etc. but this has, if anything, only
served to increase my confusion


There is also a Head First Servlets & JSP book written by Bryan Basham, Bert Bates and Kathy Sierra which many people find helpful, but probably contains more than you'll ever need to know (unless you decide to get the SCWCD certification).

You can also find a J2EE tutorial on Sun's web site


JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9044
    
  10
Regarding MVC: Bear published some good information about MVC in general -- history, illustrations, etc. It may help
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Originally posted by Dick Summerfield:

I found a SimpleMVC example servlet in CodeBarn from Ben Souther - but was I little bit disappointed (sorry, Ben ) not to find any source - only a .war (Web Application Archive). I tried briefly to get it running but it's based on the TomCat Server and us cowpokes use Orion .


The source is inside the war file.
If you don't want to set up Tomcat, you can unpack the war file with Winzip or the 'jar' program that ships with the JDK to look at the source files. War files are jar files which are really nothing more than zip files.

Once unpacked the Java source files are under /WEB-INF/src/com/javaranch...


Core Servlets is a great book but a bit out dated.
There is a new edition out that covers Servlet 2.4 and JSP 2.0.
If you're going to dig into it, you might as well start with one that is current. A lot has changed; especially on the JSP side of things.
[ February 20, 2008: Message edited by: Ben Souther ]

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Also, Tomcat and Orion can live on the same machine.
Just make sure one isn't running when you try to start the other.
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9044
    
  10
Actually they can both be running simultaneously ... tomcat defaults to port 8080 and orion defaults to port 80. No problem.
Dick Summerfield
Ranch Hand

Joined: Oct 04, 2007
Posts: 90
Thanks both very much for these interesting responses .
I'm retiring to my corner to think things over and try things out
Dick.
 
wood burning stoves
 
subject: Servlets-3a and MVC
 
Similar Threads
Any disadvantages of the struts framework.
Core Servlets and Java Server Pages VS.Java Servlet Programming by O'Reilly
Testing Servlets
Hello Ranchers Should I
Some help on e-shop