Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Attributes

 
Angelina Gracy
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hai friends.

Kindly help me with answering these doubts:

1. When to use attributes and when to use parameters?
2. Why we should learn custom tag models when we can develop the same with JSTL and EL ?

Thanks to all
Angelina
 
singh santosh
Ranch Hand
Posts: 136
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi angelina,


1. When to use attributes and when to use parameters?
2. Why we should learn custom tag models when we can develop the same with JSTL and EL ?



Ans1)whenever u want to set any kind of object into [request,session ] u have to use attributes(setAttribute(String,Object)) .I guess There is no other way to do this.Parameters are passed from the jsp pages for the controls (like input tag,textarea,text,button etc..).There is no method to set it explicitely.

Ans2 Yeh ,u can very well use Jstl and EL in ur jsp .But there funtionality is somewhat limited to wat has been provided.What if u want to use ur own logic into jsp page without using scripting ?? In this case u hav to write ur custom tag/custom tag file.

regards

-santosh
[ April 21, 2006: Message edited by: singh santosh ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic