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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T17:43:05+00:00 2026-06-16T17:43:05+00:00

I’m trying to create a dynamic menu bar using struts2 url tag. I got

  • 0

I’m trying to create a dynamic menu bar using struts2 url tag. I got the list of menus from webservice and try to generate corresponding URL to each menu.
I tried this code

<s:iterator value="roleMenus" id="child">
<s:if test="parentCode == #parent.childCode">
    <s:if test="childCode != #parent.childCode">
        <c:set var="link"><s:property value='menuLink'/></c:set>
        <% menulink = (String)pageContext.getAttribute("link"); 
            System.out.println(menulink);%>
        <li><a id='<s:property value="menuLink"/>' name="menulink" href="<s:url action='xxxxx'/>"><s:property value="menuName"/></a></li>
    </s:if>
</s:if>

with Action attribute value passed in scriptlet

<%=menuLink%>

or JSTL variable

${link}

but it throws an exception

According to TLD or attribute directive in tag file, attribute "[action]" does not accept any expressions.

so I guess this cannot be done using any kind of dynamic expressions in Action attribute.

I’m thinking of overriding the method that generates URL when s:url tag get called but I don’t have a clue how to do that. It generates urls like this in IBM Portal:

/wps/myportal/!ut/p/b1/jZDbToNAFEW_pR9gzhmG6-OEyMVhUGCowAsh2BiQS6yI0q-X9qkm1va87WSt7J0DBeTE1C2dWhrVIYNiqObmtZqacai6Yy70MmSpw9mTio9oOujHWkKpESnoHoX8HEBCcAU8LVWEUNZ4m2-7zFONANEMXA195qWxFVGKjF7zn6H4jfyx4AT8V3EC8MIxhNAb-x3kK2Zc3GIiZHOz-4LtMO779XUSMlTLpF3GT56ME3_J94ttvi_p24T1HEoctu1yCKRNs28tFtI2Hg6ilC2JCLO7KKxbkWA_obgj3Knvmctn7n9soC86x_JbNffZ5gdG203G/dl4/d5/L0lDU0NtbUEhL3dPb0JKaVVNcHJDSy80RzNhRFVRZy9aN19OQVVGS0FQNDBPMDhGMElSNVMzMzdRMjA4MC8lMHZpZXclMEFwcExvZw!!/

Does anyone have any ideas for this? Any help will be very much appreciated.

  • 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-06-16T17:43:06+00:00Added an answer on June 16, 2026 at 5:43 pm

    This is sample example to generate dynamic url. I hope this helps you.

    <s:set name="days" value="{'monday', 'tuesday', 'wednesday','thrusday','friday' }" />
    
    <s:iterator var="day" value="#days">
        <s:url action="%{#day}" var="urlTag"></s:url>
        <s:property value="%{urlTag}"/><br/>
    </s:iterator>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to find ID3V2 tags from MP3 file using jid3lib in Java.
Basically, what I'm trying to create is a page of div tags, each has
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I'm trying to create an if statement in PHP that prevents a single post
I am using jsonparser to parse data and images obtained from json response. When
I am trying to understand how to use SyndicationItem to display feed which is
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has

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.