replace wicket 6.3 jquery

耗尽温柔 提交于 2019-12-23 04:47:35

问题


After migration to wicket 6.3, I encountered an error in console of developertools in chrome on pages that use jquery. it seems that the jquery that wicket 6.3 use built-in, contains some link to rvzr-a.akamaihd.net.

Failed to load resource: the server responded with a status of 403 (Forbidden) http://rvzr-a.akamaihd.net/amz/aeyJhZmZpZCI6MTAxOCwic3ViYWZmaWQiOjEwMjIsImh…2h0Ijo3NjgsImxvYWRlcl9jbGllbnRfdGltZXN0YW1wIjoxMzc2MzY2MTU0MTAxfQ%3D%3D.js

回答1:


You can provide Wicket with your own version of JQuery as described on http://wicket.apache.org/. In you application class, override the init method like so:

@Override 
protected void init() {
    getJavaScriptLibrarySettings().setJQueryReference(new UrlResourceReference(Url.parse("http://cdnjs.cloudflare.com/ajax/libs/jquery/1.8.3/jquery.min.js")));
}

(you can pick other versions of JQuery from http://cdnjs.com/)

That being said I'm skeptical Wicket would have references to rvzr-a.akamaihd.net.



来源:https://stackoverflow.com/questions/18200451/replace-wicket-6-3-jquery

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!