0

The xhtml pages contain

<script src="/javax.faces.resource/jsf.js.jsf?ln=javax.faces&amp;stage=Development" type="text/javascript"></script>

If I remove the scripts the javascript functions do not work as expected. The requirement is to support only .xhtml pages. So, I went ahead and removed servlet-mapping for .jsf in web.xml, which results in javascript functions being executed incorrectly.

So, can we change jsf.js.jsf to jsf.js.xhtml?

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
user679526
  • 845
  • 4
  • 16
  • 39

1 Answers1

2

That should be done automatically if you're properly using <h:head> instead of <head>. You should not manually include the jsf.js in a <script> at all. Fix the <head> in your master template to be <h:head> and remove all those <script> lines referring jsf.js from your Facelet templates.

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
  • The tag is added correctly. But if we remove the jsf.js script include, the JavaScript is not functioning correctly. – user679526 Feb 22 '12 at 19:10
  • Then your problem is caused elsewhere. Start debugging the HTTP traffic and JavaScript environment in the webbrowser. – BalusC Feb 22 '12 at 19:12