Go to geoserver\lib in the lib directory of geoserve to find jetty-servlets-XX.jar and jetty-util-xx.jar (xx means different versions) two jar packages
Copy the all jars packagesfrom geoserver\lib to
the geoserver\webapps\geoserver\WEB-INF\lib\ directory
<context-param>
<param-name>ENABLE_JSONP</param-name>
<param-value>true</param-value>
</context-param>
<filter>
<filter-name>cross-origin</filter-name>
<filter-class>org.eclipse.jetty.servlets.CrossOriginFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>cross-origin</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
add the following line at the beginning of startup file of geoserver
"C:\Program
Files\GeoServer\bin\startup.bat" edit it by notepad++
set
geoserver.xframe.shouldSetPolicy=false
or using the service
open the wrapper folder C:\Program Files\GeoServer\wrapper
and edit the cmd command which placed at the end of the jsl64 file
-Dgeoserver.xframe.shouldSetPolicy=false
stop the service and run the startup.bat as administrator
Everything will be OK