aspose file tools*
The moose likes JSF and the fly likes [JSF 2] Ajax : where is jsf.js ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "[JSF 2] Ajax : where is jsf.js ?" Watch "[JSF 2] Ajax : where is jsf.js ?" New topic
Author

[JSF 2] Ajax : where is jsf.js ?

Celinio Fernandes
Ranch Hand

Joined: Jun 28, 2003
Posts: 547

Hi,
one of the ways to do Ajax with JSF 2 is to use this tag :


But where is the JavaScript library jsf.js located ?

Thanks


SCJP 1.4, SCWCD 1.4, SCBCD 1.3, SCBCD 5
Visit my blog
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16145
    
  21

Your guess is as good as mine. Core JSF doesn't have any JavaScript support in it at all. The closest it comes is in propagating the javascript attributes of controls down into their corresponding generated HTML.

JavaScript-supporting JSF extensions such as Tomahawk and RichFaces often don't have an actual JavaScript file. Instead they dynamically generate the javascript that they want to match that ".js" URL. Which is one of the reasons I keep crying out that a Web server is not a File server. Just because you send something to the server that looks like a filepath doesn't mean that it will return a file. That's why they're called Uniform Resource locators and not File locators.

Usually the generated JavaScript is customized based on the application environment and/or what version/brand of web browser is making the request, so it's not a static item.


Customer surveys are for companies who didn't pay proper attention to begin with.
Celinio Fernandes
Ranch Hand

Joined: Jun 28, 2003
Posts: 547

Well, I got the answer :
it is located inside jsf-impl.jar, in the folder META-INF\resources\javax.faces
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16145
    
  21

Celinio Fernandes wrote:Well, I got the answer :
it is located inside jsf-impl.jar, in the folder META-INF\resources\javax.faces


... Proving once again that as long as I work with computers I need never worry about if I'll end up looking like an idiot. It's dangerous to "know" things in a field where everything's always changing.

jsf.js is new to JSF2, however. It doesn't exist in JSF1.2 and earlier.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: [JSF 2] Ajax : where is jsf.js ?