• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

what is javax.faces.resource/jquery/jquery.js.jsf?ln=primefaces ?

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
my java application is built using JSF and and i am using jquery js and css versions v1.10.2 and deployed on websphere application server v8.5.5.9

however on hitting the URL https://localhost:9444/Myapplication/javax.faces.resource/jquery/jquery.js.jsf?ln=primefaces it shows v1.8.2 as below..

/*
* jQuery JavaScript Library v1.8.2
* http://jquery.com/
*
* Includes Sizzle.js
* http://sizzlejs.com/
*
* Copyright 2012 jQuery Foundation and other contributors
* Released under the MIT license
* http://jquery.org/license
*
* Date: Thu Sep 20 2012 21:13:05 GMT-0400 (Eastern Daylight Time)
*/
(function(a2,aB){var w,af,o=a2.document,aI=a2.location,d=a2.navigator,bg=a2.jQuery,I

I want to understand, what does this URL do https://localhost:9444/Myapplication/javax.faces.resource/jquery/jquery.js.jsf?ln=primefaces and what kind of information does it return?
From where is the output being returned ?
why is it showing v1.8.2 when i am using 1.10.2 jquery files in my workspace ?
I want to understand the use/meaning of this URL ?
 
Saloon Keeper
Posts: 27752
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Instead of re-inventing a lot of complex functionality, advanced JSF extensions such as PrimeFaces and RichFaces use jQuery internally. The actual JavaScript (and related) resources are constructed from resources internal to the framework.

But the implementations of jQuery bundled with the extention are often quite out of date.

You can usually persuade the extension to ignore its old obsolete copy of jQuery and use a newer version. Check the PrimeFaces help resources for more information on that.
 
Mic Nel
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Tim Holloway wrote:Instead of re-inventing a lot of complex functionality, advanced JSF extensions such as PrimeFaces and RichFaces use jQuery internally. The actual JavaScript (and related) resources are constructed from resources internal to the framework.

But the implementations of jQuery bundled with the extention are often quite out of date.

You can usually persuade the extension to ignore its old obsolete copy of jQuery and use a newer version. Check the PrimeFaces help resources for more information on that.



I am not using PrimeFaces or RichFaces kind of APIs in my workspace, below is the list of css and js that I am using...

bootstrap.css
bootstrap.min.css
custom.css
IE10.css
IE7.css
jquery-ui-timepicker-addon.css
jquery-ui.css
jquery.multiselect.css
jquery.timepicker.css
myapp.css
styles.css

functions.js
ie10-viewport-bug-workaround.js
jquery-ui-timepicker-addon.js
jquery-ui.min.js
jquery.multiselect.js
jquery.popupoverlay.js
jquery.timepicker.js
jsfunction.js
respond.js

Can somebody help me to understand from where id the URL  https://localhost:9444/Myapplication/javax.faces.resource/jquery/jquery.js.jsf?ln=primefaces pulling its results and what exactly does the URL link do ?
 
Mic Nel
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
would like to add that I am using primefaces-3.4.2.jar in my workspace

 
Tim Holloway
Saloon Keeper
Posts: 27752
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Mic Nel wrote:
would like to add that I am using primefaces-3.4.2.jar in my workspace


And that is why you have a primefaces jquery URL in your page content. PrimeFaces generated it as part of its View Rendering functionality.

A URL doesn't "link to" anything. It's a resource Locator, and while static resources might appear as "files" within a WAR, that's the default behavior if something smarter doesn't handle it. It's entirely valid for a URL to return data that it synthesizes on the spot.

In this particular case, I think that the jquery.js.jsf is actually coming from a static resource template  found within the PrimeFaces jar, but I'm not 100% certain. PrimeFaces could have created and cached a custom resource based on the client's characteristics (browser brand and version, for example).

As to the "something smarter", note that the URL ends in .jsf. So the FacesServlet is responsible for dispatching the URL to the appropriate rendering service. Definitely NOT a purely static resource reference ("link").
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic