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 285949
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T05:35:33+00:00 2026-05-12T05:35:33+00:00

I have a set of JSP tags that use dynamic-attributes to allow for arbitrary

  • 0

I have a set of JSP tags that use dynamic-attributes to allow for arbitrary HTML attributes to be passed in to them, like this:

<%-- tag named a:div --%>
<%@ tag dynamic-attributes="attrs" %>
<div <c:forEach var="attr" items="${attrs}"> ${attr.key}="${attr.value}"</c:foreach>>
</div>

I then have another tag that I want to be able to pass dynamic-attributes to & have it just pass them onto the above tag. Something like:

<%-- tag using a:div --%>
<%@ tag dynamic-attributes="attrs" %>
<a:div class='big' attrs="${attrs}"/>

But attrs=”${attrs}” doesn’t do what I want. Any ideas?

  • 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-12T05:35:33+00:00Added an answer on May 12, 2026 at 5:35 am

    I don’t think this is possible, sadly. The “attrs” object here is a java.util.Map, and there’s no way to explode that back.

    The alternative is to allow your <a:div> tag to take a Map attribute which represents those dynamic attributes. Perhaps <a:div> could support both dynamic attributes as well as having a Map passed in from somewhere else, and treat them the same using <c:choose> or the like?

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

Sidebar

Related Questions

I have a few HTML files that I'd like to include via tags in
i previously used <jsp:useBean> tags that have facility to decide the scope of bean
I have set a cookie in my jsp page say(A). and set its path
I have set the eclipse java formatter to wrap lines that exceed 120 characters
I have set a background on the data-role=page element like so <div data-role=page style=background:
I have set up an app that is registered for remote notifications. - (void)application:(UIApplication*)application
I have a two simple IceFaces buttons created this way. (I don't use xhtml
I have some old JSP files with tags such as <mytag:editbox name=SEL_1 param=onclick='clickit(); param=size='4'
I have a map in jsp <s:set name=answer value=#{0:'No', 1:'Yes', 2:'Maybe' }/> How to
Say I have some jsp var foo <c:set var=foo value=foo's bar/> And I have

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.