0

My question consists of a few points, as I just read the GeoServer GetFeatureInfo template tutorials and it is very effective and useful for my project.

My questions are:

  • Where is the data directory of GeoServer where the templates resides?
  • How to call layers and apply styling?
  • 1
    please try to limit yourself to one question per question, taking the tour may help you to understand how this site works. – Ian Turton Feb 1 '17 at 17:45
2

GeoServer looks in a list of places for templates:

  • Look into GEOSERVER_DATA_DIR/workspaces/<workspace>/<datastore>/<featuretype>/content.ftl to see if there is a feature type specific template
  • Look into GEOSERVER_DATA_DIR/workspaces/<workspace>/<datastore>/content.ftl to see if there is a store specific template
  • Look into GEOSERVER_DATA_DIR/workspaces/<workspace>/content.ftl to see if there is a workspace specific template
  • Look into GEOSERVER_DATA_DIR/workspaces/content.ftl looking for a global override
  • Look into GEOSERVER_DATA_DIR/templates/content.ftl looking for a global override
  • Look into the GeoServer classpath and load the default template
  • And how can those by accessed from my localchost? – Shahid Nawaz Khan Feb 2 '17 at 5:04
  • go to your geoserver data directory (GEOSERVER_DATA_DIR) and look in the directories above – Ian Turton Feb 2 '17 at 8:40
  • Thank you so much. I was searching it in the program files etc but found it in the Program data/Geoserver etc Folder. – Shahid Nawaz Khan Feb 6 '17 at 7:56
  • Hello, could you please tell me where I can find the default content.ftl(if that is the name) to take a look at the code, in GeoServer 2.8. I have looked in C:\ProgramData\Boundless\OpenGeo\geoserver\workspaces\<ws_name> and there is nothing close to content.ftl. I have not set a GEOSERVER_DATA_DIR var myself and I read that C:\ProgramData\Boundless\OpenGeo\geoserver\data_dir would be the default but inside all I found was filter.properties, GeoLiteCity.dat and monitor.properties. every manual or forum tells me what you answered but there is nothing there, please help – Scaramouche Feb 6 '18 at 15:31
  • 1
    so what I said - Look into the GeoServer classpath and load the default template – Ian Turton Feb 6 '18 at 16:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.