File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes differnce between jstl and struts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "differnce between jstl and struts" Watch "differnce between jstl and struts" New topic
Author

differnce between jstl and struts

Vasanthan Ramakrishnan
Greenhorn

Joined: Dec 16, 2007
Posts: 13
hi friends

Can anyone one tell me the difference between struts and jstl.

Let me know which one is most suitable to use.

thanks in advance
Madhu Sudhana
Ranch Hand

Joined: Apr 16, 2006
Posts: 127
hi

jstl and Struts are diffrent kind of things they cannot be compared

Struts is a framework which implements MVC design pattern

while jstl is a tag library which assists us in bulding jsp pages.


"And the trouble is, if you don't risk anything, you risk even more." -- Erica Jong.
Raghavan Muthu
Ranch Hand

Joined: Apr 20, 2006
Posts: 3344

Howdy Vasanthan Ramakrishnan,

Welcome to JavaRanch

JSTL - Java Standard Tag Library. As the name suggests, it has been in existence to assist the developers to have their own custom tags as the plain old HTML tags were of limited features. The term 'custom' means purely custom, you can customize the tag of your own with your set of attribtues and meaning which is specific to your application needs.

For example, you could write your own tag something as follows.


<Vasanthan:checkBox name="Vasanth" id="vcbx01" size="20" color="blue"
... /">


The set of attributes and meaning is also customized to yoru own application. You can read about JSTL and its usages to get to know further.

Struts is a web application framework which is believed to completely implement the MVC pattern. For your information, Struts as a framework has its own set of custom tags. To name a few, html taglib, bean taglib, logic taglib etc.,


Everything has got its own deadline including one's EGO!
[CodeBarn] [Java Concepts-easily] [Corey's articles] [SCJP-SUN] [Servlet Examples] [Java Beginners FAQ] [Sun-Java Tutorials] [Java Coding Guidelines]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60049
    
  65

Originally posted by Raghavan Muthu:
JSTL - Java Standard Tag Library. As the name suggests, it has been in existence to assist the developers to have their own custom tags as the plain old HTML tags were of limited features.

Sorry, but this is way off the mark.

The JSTL has nothing to do with writing custom tags, and it is not in any way, shape, or form a replacement for HTML.

JSTL is a set of standardized actions (tags) that are intended to replace the use of scriptlets on a JSP page. The core set has actions for conditional processing, iteration, file inclusion, URL construction and more.
[ December 17, 2007: Message edited by: Bear Bibeault ]

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Raghavan Muthu
Ranch Hand

Joined: Apr 20, 2006
Posts: 3344

Thank you Bear for correcting me.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: differnce between jstl and struts
 
Similar Threads
List-Backed
what is the difference between struts tag and jstl?
Struts logic:xxx tags vs JSTL
Struts and JSTL
Integration with JSTL and Struts