my dog learned polymorphism
The moose likes Tomcat and the fly likes Use of Struts and tag lib Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Use of Struts and tag lib" Watch "Use of Struts and tag lib" New topic

Use of Struts and tag lib

Jasmine kaur
Ranch Hand

Joined: Nov 25, 2003
Posts: 160
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.

jasmine kaur
David Ulicny
Ranch Hand

Joined: Aug 04, 2004
Posts: 724
I think that tag libraries can do things simply. It also make the code more readable.

SCJP<br />SCWCD <br />ICSD(286)<br />MCP 70-216
somkiat puisungnoen
Ranch Hand

Joined: Jul 04, 2003
Posts: 1312
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

Java Developer, Thailand
lesley evensen

Joined: Nov 02, 2001
Posts: 14
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

<A HREF="" rel="nofollow"></A>
I agree. Here's the link:
subject: Use of Struts and tag lib
It's not a secret anymore!