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

Tag library

 
Dorothy Taylor
Ranch Hand
Posts: 104
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello everyone

I am developing STruts 1.1 based JSR portlets in RAD 6.
For writing the jsp's what should be used : the c tags(JSTL) or teh Struts logic tags.

We can do same things in both. So what is the difference

Thanks
 
Nhat Nguyen
Greenhorn
Posts: 9
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I haven't written any portlet using RAD but I know that you can use both JSTL and Struts tags in your JSPs. JSTL tags are used to control the flow of the page like: <c:if>, <c:choose>, ... and Struts tags are used to display information like: <logic:iterator>, ...
 
Dorothy Taylor
Ranch Hand
Posts: 104
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, but we can do the same thing using either of the two. So does this mean that if we are using struts, then using struts taglib is preferable.

When should we choose to use c tags if application is struts based?
 
Nhat Nguyen
Greenhorn
Posts: 9
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Some time, using JSTL is more convenient than using Struts taglib (like: <c:if> and <logic resent>, ...)
Some time, you want to perform an action but JSTL doesn't support (like loop, message resource, ...)
...
So, using JSTL or Struts taglib must be very flexible.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64196
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Nhat Nguyen:
... but JSTL doesn't support (like loop, message resource,
I think you'd better bone up on what JSTL supports. Looping? Of course. Messaging? Yes.
 
Nhat Nguyen
Greenhorn
Posts: 9
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oh, I'm sorry! I got mistakes. JSTL has loop, message and many features ... Thank Bear Bibeault!
 
Dorothy Taylor
Ranch Hand
Posts: 104
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So which one should be preferred?
Or we can just go with anything of our choice. I think that if we are developing struts based portlets, then we should use struts taglib only. Please let me know if this is wrong
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic