• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Servlets vs Struts

 
Aaron John
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64720
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Sharad Agarwal
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
yingyong yang
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64720
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"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
Posts: 187
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic