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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T01:25:14+00:00 2026-06-01T01:25:14+00:00

I am trying to put versioning around the resources in an application. If I

  • 0

I am trying to put versioning around the resources in an application.

If I do like this resources/js/1_0_0/mainscript.js

It does not work. It says RESOURCE_NOT_FOUND

but when I do like this

resources/js/mainscript.js/1_0_0.js

It works. I do not like the way it is organized in the second way. First one looks cool. Any Idea?

I am using Tomcat 7.0, JSF 2.0.9

Update: I was checking primefaces-2-2.1.jar. Since when I checked the page source, I saw this
/javax.faces.resource/jquery/jquery.js.xhtml?ln=primefaces&v=2.2.1″>

Then I looked at META-INF/resources/primefaces/jquery/jquery.js

They did not have any versioning in there but how did it append v=2.2.1 in the head

  • 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-01T01:25:16+00:00Added an answer on June 1, 2026 at 1:25 am

    If I do like this resources/js/1_0_0/mainscript.js

    It does not work. It says RESOURCE_NOT_FOUND

    This will work if you specify js as library name.

    <h:outputScript library="js" name="mainscript.js" />
    

    However, this is not the proper usage of a resource library. Rather introduce one.

    resources/default/1_0_0/js/mainscript.js
    

    Then you can specify it as follows:

    <h:outputScript library="default" name="js/mainscript.js" />
    

    They did not have any versioning in there but how did it append v=2.2.1 in the head

    It’s done by PrimeResource which kicks in on resource requests with ln=primefaces parameter. Its getRequestPath() has the following implementation:

    @Override
    public String getRequestPath() {
        return super.getRequestPath() + "&amp;v=" + Constants.VERSION;
    }
    

    Where Constants is the PrimeFaces specific constants file which is updated with every PF version.

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

Sidebar

Related Questions

I am trying to put a cool little image like this For my split
I am trying to put some distributed caching into play, I'm using this indeXus.Net
I'm trying to put together this layout... ... but I'm having issues with the
I am trying to put an offline Openstreetmap map into my Java Application. I
I'm trying to put together a plugins system with .NET, and I'm not sure
trying to put up a nontrivial MEF application. I wonder - is there a
I am trying to put log4j in a web application in Tomcat 7. I
I am trying to put a Contract on a method call. My web application
Trying to put my head around how to model the notion of default values
I'm currently trying to put 5 videos back to back using AVMutableComposition like so:

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.