Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 335005
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T10:06:30+00:00 2026-05-12T10:06:30+00:00

hi all i just want to create a simple jsp tag such as :

  • 0

hi all i just want to create a simple jsp tag

such as :

abc.tag

<div>
    <table>
        ....
    </table>

    body content goes here

</div>


so when in the other pages i can use my tag like this
<tag:abc>
     acutally body content
</tag:abc>

how can i do it without java code??? coz the functionality for my tag is siimple,
i don`t want to write a bunch of stuff for it

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T10:06:30+00:00Added an answer on May 12, 2026 at 10:06 am

    sigh

    This is why JSP gets a bad wrap.

    JSP 2.0 has a feature called “Tag Files”. They let you create JSP tags using JSP.

    What you want to do is trivial.

    You will need to create a file named “abc.tag”, and put it in, for example, WEB-INF/tags within your WAR.

    The contents are simple for this case.

    <div>
        <table>
            <jsp:doBody/>
        </table>
    </div>
    

    To use the file in your JSP:

    sample.jsp:

    <%@ taglib tagdir="/WEB-INF/tags" prefix="tag" %>
    <tag:abc>
        actual body content
    </tag:abc>
    

    That’s it! Shazam. The only caveat about tag files is that you can not use JSP scriptlets within you tag file tags. But, then, you shouldn’t be do that anyway — it’s not a big deal.

    Look up tag files for more details (like passing parameters and such).

    Tag files, JSTL and EL make JSP 2.0 one of the best markup languages around.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I just started with Ruby On Rails, and want to create a simple web
Hello This is a general question.I want to create a simple report just some
I'm using Eclipse Helios on MacOSX. I'm PHP guy so i just want all
I just want to fetch all tweets of an specific twitter account. I want
I just want to know a easy way to extract all data with same
I just want what my title says.I have already read all the previous similar
I just want to intercept raw data (hex)--headers and all--sent to a port, and
I'm lazy! And I just want to store one single string value. That's all!
I'm using this function: preg_match_all('/((\d{9})\.html)/s', $content, $results); It works fine but i just want
I have a HTML string and want to replace all links to just a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.