Custom tags are user defined tags. They eliminate the possibility of scriptlet tag and separates the business logic from JSP page and makes it reusable.Some examples of tasks that can be performed by custom tags include operating on implicit objects, processing forms, accessing databases and other enterprise services such as email and directories, and implementing flow control. Custom tags increase productivity because they can be reused in more than one application.
Questions tagged [custom-tag]
126 questions
49
votes
2 answers
What are and used for?
I was working on custom tag libraries and I was confused how the and tags are used in the TLD file to define a custom tag attribute.
What are these tags?
What should we write in-between them?
What behavior do we get after…

bali208
- 2,257
- 7
- 40
- 43
43
votes
6 answers
How to programmatically resolve property placeholder in Spring
I currently work on a web application based on Spring 3.1.0.M1, annotations based, and I have a problem with resolving property placeholders in one specific place of my application.
Here is the story.
1) In my web application context (loaded by…

Max Alexejev
- 603
- 1
- 6
- 10
28
votes
5 answers
Custom tags... why not?
I found a site with an guide to add custom tags to html, the same way people make ie work with the new HTML5 tags. I must admit I think it would be great to add my own tags, would make it easier to "scan" the the code, and find what you are looking…

martindilling
- 2,839
- 3
- 16
- 13
28
votes
3 answers
Is there a way with rails form helper to produce a button tag for submit
I am trying to create buttons ala Wufoo (Rediscovering the button element)
I would like to write the following code like the following:
<%form_tag search_path, :method => :get, :class => 'search' do %>
<%=text_field_tag :search, params[:search]…

Jonathan
- 16,077
- 12
- 67
- 106
10
votes
2 answers
Passing expressions to custom tags in JSP
Hi I just created custom tag being used in my JSP
The .tld of the tag is something like this

MistyD
- 16,373
- 40
- 138
- 240
8
votes
1 answer
How can I create a clean tag library (.jar) containing custom tags and composite components in JSF 2.2?
I've read the various blog posts and stackoverflow posts on how to create a composite components and custom tags within a web app and have gotten things to work just fine. I'm now trying to move everything into a reusable JAR file.
mylib.jar…

wsaxton
- 1,030
- 15
- 34
8
votes
2 answers
How to add custom HTML Tags to Visual Studio and Avoid Squiggly Lines
I'm using Visual Studio 2013 to create raw HTML pages (i.e. index.html).
In my HTML I am implementing custom HTML tags. As such, Visual Studio underlines my custom tags with squiggly lines (due to the warning of "Unknown element ...").
In hopes to…

Jed
- 10,649
- 19
- 81
- 125
7
votes
5 answers
[X]HTML custom tags: pros & cons
I'd like to use some semantic [X]HTML tags instead of
s: , ,

kolypto
- 31,774
- 17
- 105
- 99
7
votes
2 answers
What are the reasons NOT to use custom HTML tags?
Given current HTML5 specs that allows creating custom HTML elements (as long as their name contains a dash), and the fact that Web Components seem to be a feature that's here to stay, I'd like to know why is creating your own custom HTML elements…

Maciej Gurban
- 5,615
- 4
- 40
- 55
6
votes
1 answer
JSP/JSTL: Passing a Collection to a Custom Tag
I'm trying to implement a custom JSP tag that accepts as an attribute a Collection of objects and outputs them as a JSON-formatted array (each object in the Collection provides a getJsonString() method that returns a JSON-formatted representation of…

aroth
- 54,026
- 20
- 135
- 176
5
votes
2 answers
Expand inline tags in custom Javadoc taglet
I wrote a custom Javadoc taglet that adds a new note tag:
...
public boolean isInlineTag() { return false; }
public String toString(Tag tag) {
return "
" + tag.text() + ""; } It works so far, but inline tags are…

Mark
- 1,447
- 2
- 14
- 26
5
votes
4 answers
Can I create a custom HTML tag in HTML5?
I was wondering if I can create a custom HTML tag with the same functionality of Facebook's Open Graph meta tags for my site.
I was thinking of something like this:

Cainã
- 955
- 3
- 13
- 20
4
votes
4 answers
How to implement dynamic GUI in JSP
i have a requirement where i need to display some fields on the JSP. These fields are dynamic in nature, meaning, for ex:, if i changed some value in the dropdown, some fields will be hidden and some other fields might come. I dont want to write…

Ashish
- 421
- 9
- 22
auto closing create child not sibling
I really like to use "short closing" for tags using ordinary format but unfortunately using such method in Browser (i.e. chrome) cause quite unexpected behavior.
When in document I have:
it's interpreted as
…

Xamael
- 257
- 1
- 9
3
votes
1 answer
How to access the page front-matter data in 11ty from the code of a custom tag (shortcode)?
In Eleventy (11ty) the page source can define custom data in it's front-matter. E.g.:
---
title: this is front-matter data
---
Page content
{% myCustomTag valueOfArg1 %}
where the custom tag (also known as shortcode in Eleventy) is generating extra…

Gabriel Petrovay
- 20,476
- 22
- 97
- 168