问题
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