URL Issues while migrating primefaces 3.5 to 6.2

UI Components for JSF
Post Reply
sanketjadhav
Posts: 2
Joined: 15 Nov 2018, 07:31

15 Nov 2018, 07:45

Hi,
we are migrating prime faces from 3.5 to 6.2. As per guide we have done the below changes
  • If manually included, the primefaces.js include must be changed to include core.js and components.js
  • The same also applies for the MenuRenderers of all PrimeFaces Layouts (before new layout versions will be released). Please change
    @ResourceDependency(library="primefaces", name="primefaces.js")
    to
    @ResourceDependency(library="primefaces", name="core.js"), @ResourceDependency(library="primefaces", name="components.js")
After these changes we are getting 404 for url related to core.js, jquery.js and others because the new url we see is with query params with v=6.2 appended
like this https://localhost:8181/applicationName/ ... e.js&v=6.2
as this url is not available we get a 404
for 3.5 we
used to get url like this without any version appended and it used to work
https://localhost:8181/applicationName/ ... mefaces.js

we use a viewHandler to extend ViewHandlerWrapper and override getResourceURL(FacesContext context, String path) method.
in this method we search for javax.faces.resource and remove the String pattern = "?ln=primefaces";
how ever after url modification some how even the version number is appended in 6.2
we are not sure which component appends version number &v=6.2 ...this breaks all our urls
we have included the 6.2 primefaces jar and also the core js and jquery js are there in the jar.
our question is are we missing any configuration to make this 6.2 url with version number appended to it work.
please help us out on the same.

tandraschko
PrimeFaces Core Developer
Posts: 3979
Joined: 03 Dec 2010, 14:11
Location: Bavaria, DE
Contact:

15 Nov 2018, 10:29

try to remove your ViewHandlerWrapper and see what happens.

We append to version to all PF resources.
Thomas Andraschko

PrimeFaces | PrimeFaces Extensions

Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE

Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko

sanketjadhav
Posts: 2
Joined: 15 Nov 2018, 07:31

15 Nov 2018, 13:11

Thanks Thomas,
Commenting the getresourceurl worked,
still i need to ask is there provision in 6.2 where in we can turn of versioning

tandraschko
PrimeFaces Core Developer
Posts: 3979
Joined: 03 Dec 2010, 14:11
Location: Bavaria, DE
Contact:

15 Nov 2018, 13:15

Nope, there isnt.
However we could make it configurable -> feel free to open a issue and a PR.
Thomas Andraschko

PrimeFaces | PrimeFaces Extensions

Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE

Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: Google [Bot] and 61 guests