• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Servlets-3a and MVC

 
Dick Summerfield
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 9061
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
... 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
 
Marilyn de Queiroz
Sheriff
Posts: 9061
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Regarding MVC: Bear published some good information about MVC in general -- history, illustrations, etc. It may help
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 9061
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually they can both be running simultaneously ... tomcat defaults to port 8080 and orion defaults to port 80. No problem.
 
Dick Summerfield
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks both very much for these interesting responses .
I'm retiring to my corner to think things over and try things out
Dick.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic