Question

I already have a simple application, to experiment I am implementing the same in Struts 2. In an old app I've used jQuery, now can I use directly the same jquery.js here or shall I opt for Struts 2 jQuery Plugin?

I tried with jquery.js, I am getting null pointer exception. So I am confused now. Some one tell the difference between two. Both are jQuery only wright?

Was it helpful?

Solution

Try setting loadAtOnce in <sj:header> tag to true to disable on demand script loading. So the jQuery script will be loaded at page load. You should be able to use your own library scripts without manually loading your own copy of jquery.js.

Ref. Here

OTHER TIPS

If you have got NullPointerException, it doesn't mean that JQuery or plugin has bugs. You are getting errors because you are doing something wrong in the code, misunderstanding or something.

Struts 2 JQuery is a tag library that you can use with Struts 2 framework. It contains the JQuery inside it. JQuery is only a JavaScript library. Using the plugin you have Ajax support with Struts 2 framework.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top