File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSP:tags and Struts.

 
Henrik Krievs
Ranch Hand
Posts: 60
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Howdy!

Just bought the Jakarta Struts Cookbook.

In several of the examples, the Jsp:usebean tag is used - combined with the Struts tags.

Now I new to Stuts but; Isn't possible to use "pure" Struts tags? - what's the advantage of using the Jsp:usebean tag over Struts tags?

Best Regards, Henrik
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Struts has a <bean:define> tag which is very similar to jsp:useBean. Either will work just fine.

You will also find that a number of JSTL tags are similar to struts logic:xxx tags and bean:xxx tags. There are differing opionions on which tags to use, but I find the overwhelming majority of developers tend toward using standard JSP and JSTL tags whenever possible, and only using Struts tags when there is no equivalent, as with the struts html:xxx tags.

The reason for this is mainly that any J2EE web programmer worth their salt knows the standard JSP and JSTL tags, and they may not know the Struts tags. So, it seems only natural to favor the most standard of the two tag libraries.

The other reason is that JSTL tags are a bit more powerful and flexible than the logic:xxx tags.
[ January 22, 2006: Message edited by: Merrill Higginson ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic