I’m trying to get OpenLayers deployed in my JSF 2.0 App on tomcat.
So far, What I did was to copy openLayers.js to the resources directory of the web app (I have other JS working from there successfully) and the theme and img directories in to the same resources directory.
Next, I included openLayers.js from my xhtml file as follows:
<h:outputScript library="js" name="openLayers.js" />
When I try to use OpenLayers I get these errors on the Javascript console:
BaseTypes.jsGET https://ben.serveraddress.com:8443/MDPortal/lib/OpenLayers/BaseTypes.js 404 (Not Found)
Class.jsGET https://ben.serveraddress.com:8443/MDPortal/lib/OpenLayers/BaseTypes/Class.js 404 (Not Found)
Util.jsGET https://ben.serveraddress.com:8443/MDPortal/lib/OpenLayers/Util.js 404 (Not Found)
Element.jsGET https://ben.serveraddress.com:8443/MDPortal/lib/OpenLayers/BaseTypes/Element.js 404 (Not Found)
Bounds.jsGET https://ben.serveraddress.com:8443/MDPortal/lib/OpenLayers/BaseTypes/Bounds.js 404 (Not Found)
LonLat.jsGET https://ben.serveraddress.com:8443/MDPortal/lib/OpenLayers/BaseTypes/LonLat.js 404 (Not Found)
Pixel.jsGET https://ben.serveraddress.com:8443/MDPortal/lib/OpenLayers/BaseTypes/Pixel.js 404 (Not Found)
Size.jsGET https://ben.serveraddress.com:8443/MDPortal/lib/OpenLayers/BaseTypes/Size.js 404 (Not Found)
Try
Or else make sure you copy
/build/OpenLayers.jsto your/lib.Oh, and don’t forget to copy
/themeand/imgdirectories as well.