File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes Servlets vs Struts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Servlets vs Struts" Watch "Servlets vs Struts" New topic
Author

Servlets vs Struts

Aaron John
Ranch Hand

Joined: May 30, 2005
Posts: 74
As far as I can tell, these two are different approaches to web application programming. However I would like to know the main differences between them and which is preferable? Hope someone can answer my trivial question.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60057
    
  65

No, they are not different approaches.

Struts is a framework built upon Servlet and JSP technologies.

Until you have a good understanding of Servlet technology under your belt, I recommend avoiding the use of frameworks.
[ July 12, 2005: Message edited by: Bear Bibeault ]

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Sharad Agarwal
Ranch Hand

Joined: Sep 11, 2002
Posts: 167
The bottomline is this. If you have a "small application" and speed of development is of the essence, perhaps you are better off just using plain Servlets and JSPs. The moment it starts becoming something "large" and/or it has a lot of incremental changes expected, a formal framework is best employed. Struts is the most popular framework for Java web applications. It has its shortcomings, but it also has a lot of industry adoption as well as a strong user community.

I suggest you look at some basic Struts tutorials to get an idea of what it would offer you. Then you can decide if the learning curve is worth your while (for the application you have in mind). Let us know if you have more specific questions.


Alco-Haul: We move spirits.
Demented Deliberations of a Dilettante
yingyong yang
Greenhorn

Joined: Jul 12, 2005
Posts: 1
I just suggest that if you develop a big web application , and your custom want to offer small lund , then you will use Eclipse + Jboss + mySql + Junit + Ant + Struts + Hibernate + String . and you will find them are very very strong and good
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60057
    
  65

"yingyong yang",

There aren't may rules that have been put into place here on the Ranch, but one that we take very seriously regards the use of proper names. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Thanks!
bear
Forum Bartender
Devender Thareja
Ranch Hand

Joined: Jul 14, 2005
Posts: 187
Struts is (M)odel-(V)iew-(C)ontroller frame work. The main components are:
Model :- form bean
View: jsp
Controller: Action

The action class here is actually a servlet. So every action class is a servlet but reverse is not true.

Hope it helps.


Devender Thareja
SCEA, SCBCD, SCJP
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17249
    
    6

"DKT"-
Welcome to the JavaRanch! Please adjust your displayed name to meet the

JavaRanch Naming Policy.

You can change it

here.

Thanks! and welcome to the JavaRanch!

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Servlets vs Struts
 
Similar Threads
Brain Teasers
Idle's mind is a devils workshop
Testing
No Banner for JSF book promo?
May 31, 2001 - test Job Offer $xxx,xxx Colorado Springs