wood burning stoves 2.0*
The moose likes Struts and the fly likes Advantage of struts-html tag library ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Advantage of struts-html tag library ?" Watch "Advantage of struts-html tag library ?" New topic
Author

Advantage of struts-html tag library ?

limaye satish
Greenhorn

Joined: Apr 28, 2003
Posts: 5
Hello ,
I am a beginner so pardon me if this question appears dumb .
I was wondering as to what is the advantage of using this library rather than using just plain old HTML code ?
I can understand the use of other libraries such as "struts-logic" where we do not intend to mix scriptlets in UI
However I do not seem to come up with any reasons why I should use the HTML library .
Could someone explain under what circumstances it would be useful ?
Thanks in advance ,
-satish limaye
Junilu Lacar
Bartender

Joined: Feb 26, 2001
Posts: 4419
    
    5

If you use plain old HTML tags, you'll have to resort to scriptlets to get the values out of the form bean and into the html fields. The html tags work with the Struts framework to automagically populate html fields from your form bean fields and this results in JSPs that are cleaner and easier to maintain.


Junilu - [How to Ask Questions] [How to Answer Questions]
limaye satish
Greenhorn

Joined: Apr 28, 2003
Posts: 5
Hello ,
Thanks for the reply .
Also as an afterthought ( and actually repeating the same question to my colleagues ) someone came up with the availability of the special tag
<html:errors> as one of the advantages of this tag library
Once again thanks for your answer
-satish limaye
Pat Wallwork
Ranch Hand

Joined: Sep 23, 2001
Posts: 72
One thing the html tags do that I like is automatically URL encode your links. I used to hate doing this manually!
-Pat
Jeremy Davis
Greenhorn

Joined: Feb 07, 2003
Posts: 17
Here are a couple more:
Using <html:link /> allows you to keep track of your links in the struts-config.xml file which means you can change directory structures and make your navigation changes in one place. Of course, this means you have to use <html:base /> as well.
<html:image /> allows you to use i18n images, which can be very usefull.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Advantage of struts-html tag library ?
 
Similar Threads
what HTML tag library to use
How to make struts application in Sun one webserver 6.1
Struts
Custom tld declaration and nested tiles...
jstl vs struts tag library