• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

Use of Struts and tag lib

 
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Everybody,
Well my question is this when we have servlet and we have jsp then why then we use complicated tag-library and struts concept have been desigend ,when we can achieve the same thing from our jsp and servlets , why we are making the things so compicated when we can achieve the things simply.
Thanks
 
Ranch Hand
Posts: 724
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think that tag libraries can do things simply. It also make the code more readable.
 
Ranch Hand
Posts: 1312
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you use Taglib/Custom Tag in JSP,

1. Readability
2. Rapid development if you have completed taglib.
3. Easy to debug code/maintain code
 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
To respond to the original question (why use the Apache "Struts" framework), when you have tag libraries allowing you to build pages integrated with Java beans, sql (and less javascript!): you shouldn't necessarily use Struts. The overhead may not be worthwhile if you are only building a small app (small is relative, but if you have only a half-dozen classes or so to deal with that may be a measure of 'small', and only a few pages). If you have MANY pages, Struts can help organize control flow, which is a big issue. If you don't want to write a large controller yourself, Struts provides that framework
 
reply
    Bookmark Topic Watch Topic
  • New Topic