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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T11:31:37+00:00 2026-05-19T11:31:37+00:00

Using Tapestry 5, I’m looking at a (if possible) elegant way to customize the

  • 0

Using Tapestry 5, I’m looking at a (if possible) elegant way to customize the @IncludeStylesheet annotation in order to automatically add a version number to the style sheet file name.

For instance

  @IncludeStylesheet("context:/css/decoration.css")

would generate automatically the CSS inclusion with a version number

  <link href="/css/decoration.css?v=12345" rel="stylesheet" type="text/css">

Adding a new annotation, like @IncludeStylesheetVersion was my initial idea.
Looking at the Tapestry code, it looks like I’m ahead of some code copy / refactoring, with new implementations of RenderSupport and DocumentLinker (among others).

Would there be a simpler way to proceed?

  • 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-19T11:31:38+00:00Added an answer on May 19, 2026 at 11:31 am

    You may not have to do that at all: Asset versioning is built into Tapestry. The default behaviour, according to the docs:

    Tapestry creates a new URL for assets
    (whether context or classpath). The
    URL is of the form /assets/application
    version number/folder/path
    .

    • application version number: Defined by symbol tapestry.application-version, the default value is a random hex number.

    If you just need to make sure clients will see changed stylesheets after an update and you don’t restart your app all the time, the default behavior (random hex number) should do just fine.

    Edit based on comment: This is also available in 5.1:

    • app/app-version (for assets obtained at or beneath the
      application package)
    • classpath/app-version (for assets obtained from any otherwise
      unmapped package)

    Where version is the Tapestry framework version, and app-version is the application version (which will be a random string if not explicitly configured).

    Just check the URLs Tapestry generates for your CSS files, they should look like this: http://myserver.com/assets/ctx/942f15f778dca26c/css/styles.css

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

Sidebar

Related Questions

No related questions found

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.