In the Servoy documentation https://wiki.servoy.com/display/DOCS/Customizing+the+NG+Client it says to put them in a templates folder. I assume to put there the non customised versions. Where to put the customised versions? In ROOT. How are they accessed? For example for the template sessionExpiredView.html?
reading the documentation page you mentioned, I assume these example templates are the build-in templates used by the NG-client.
If you want to customise one or more, you need to create a ‘templates’ folder in the application_server/server/webapps/ROOT folder.
Then create a html file(s) with the exact name(s) like the ones mentioned in the documentation.
You can start using the content from the documentation, make a minor change (for example: add a word) and see if this works.
Thanks for your suggestion. That’s exactly what I did. I created the templates folder in ROOT, duplicated some of the examples, made a minor text change in it and checked. With no success. Also restarted the server etc. Although I have to say a template is for me the blue print, not the real thing used, so it sounds a bit strange to me to put the real code into a folder called templates. I would expect the templates to be in this folder and the real thing in ROOT or another appropriate location.
Also tried the servoy.webclient.pageexpired.page: property pointing to a html file but with no success either.
My goal is to inform users if for example the max number of licences are exceeded or the session is expired etc. That would be helpful to users.
For now the templates are overwritten only in a war export (I will update the docs). You need Servoy 8.2.2 in order for this to work.
When setting the servoy.webclient.pageexpired.page property, did you put that file in the templates folder?
I currently work with Servoy version 8.1.4. I am not completely sure anymore at what locations I did put and test the file(s). Do I understand you correctly they should be put in the templates folder under ROOT?
Using Tomcat, this location (path) is not the mentioned one, but at /webapps/ROOR/templates. Is this correct?
Do you mean the whole mechanism only works with Servoy 8.2.2 or do you mean the templates are only overwritten in a war export starting with version 8.2.2?
Thanks for your clarification.
Best regards,
emera:
Hi,
For now the templates are overwritten only in a war export (I will update the docs). You need Servoy 8.2.2 in order for this to work.
When setting the servoy.webclient.pageexpired.page property, did you put that file in the templates folder?
Overwriting templates in a war export only works starting with version 8.2.2. When doing the war export the templates folder is copied from the <Servoy8.2.2 installation path>/application_server/server/webapps/ROOT to the war file.
In Servoy 8.1.4 the templates cannot be overwritten at war export.
You should either upgrade, or try to put them directly in your unpacked war file, in the webapps folder of your tomcat installation.
e.g. your war file is called crm.war and tomcat home is C:\tomcat8, you will have to put your templates into C:\tomcat8\webapps\crm\templates.
I hope it helps.
Thanks for the details. Having for example the file maintenanceView.html in the location … /webapps//templates/, I assume it’s called when I set the Servoy application server in maintenance mode. Is this correct? Are the files in the templates folder referenced the application server by their given names, i. e. maintenanceView.html, sessionExpiredView.html, …?
Now, I expect if I put the Servoy application server into maintenance mode, that I get the content of the maintenanceView.html file (The server is in maintenance mode …) displayed when starting my NG Client application. But I only get an empty white page (with no message)!?