• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

scenarios for custom tags

 
C Vivek
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
Could you guys please give me a couple of scenarios where I could use a custom tag, or think of using a custom tag.

Many Thanks
Vivek
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64994
87
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anyplace where the JSTL or EL does not meet the needs for your display markup, or that you want to package some re-usable code or components.

For example, I recently set up a number of custom actions for the buttons we use in our web ap. The buttons have differening styles depending on how and where they are used, and are instrumented via JavaScript with five possible states. All of these details are hidden from the page authors who simply employ the reusable button tags.
[ June 26, 2007: Message edited by: Bear Bibeault ]
 
C Vivek
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks!
 
C Vivek
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Bear,
Just another quick question. What are the scenarios I would need a filter or a set of filters? Is it just to get the user info or can I do something else.
When my Web page is opened in some x country. I would like to post adds specific to that local. Can this be achieved using filters?

Many Thanks,
Vivek
 
Ramu Pamidimarri
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,
we can do using filters, when the particular is hitting by the user, then we can use the filters(in filters we will get the local and we will prepare the dynamic popup's in the opening page or requested page,here we will use context params or some properties file to prepare the dynamci hyper links...

Thanks,
Ram
SCJP
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by C Vivek:
Hi Bear,
Just another quick question. What are the scenarios I would need a filter or a set of filters? Is it just to get the user info or can I do something else.
When my Web page is opened in some x country. I would like to post adds specific to that local. Can this be achieved using filters?

Many Thanks,
Vivek


Filters are ideal for situations where you want to apply behavior across multiple pages.
A common example is a compression filter that gzips the response of your pages to improve performance for users with slow connections.

Another would a validation filter that removes any HTML markup from input fields before the request actually reaches the servlet.

In both cases, this behavior can be applied without having to touch the original pages.
 
C Vivek
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That helps! thank you
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic