Re: Language Settings Location
On 29.05.2019 11:58, Victor WILLART wrote: I see, first time trying to understand how a web app works … Quite easy. 1) see http://tomcat.apache.org/tomcat-8.5-doc/appdev/deployment.html 2) short guide ("webapps pour les nuls", copyright the Tomcat PMC) : Under a standard tomcat main installation directory (in your case apparently C:\Program Files\Apache Software Foundation\Tomcat 8.0), you will find a sub-directory named "webapps". Under that sub-directory, there may be - a sub-directory named "ROOT". If that one is present, then anything under it constitutes what tomcat sees as "the default application/webapp". If it is not there, then there is no "default webapp". - other sub-directories under /webapps/ are each one webapp. Under each of those "webapps/*" subdirectories, you will find the files that make up this webapp (html pages, jsp pages (html + embedded java code)) - inside each of "webapps/*" sub-directories, you will also find a special sub-directory named "/WEB-INF/", which contains files which are not accessible directly by the browser, but are accessible internally by tomcat itself, and by the application jsp pages e.g. One special such file is "web.xml", which describes, for this application, which URLs apply to it, and which executable module (*) should handle each URL and a number of other things besides (for example some initial parameters for the webapp, or security-related information). (*) (these executable modules are called "servlets", which is one reason why tomcat is known as a "servlet container". It may also help the comprehension, to know that .jsp pages are first compiled (by tomcat) into java servlets, and it is the resulting servlet which is run when you call the JSP page). All of the above matches a certain standard, known as "the Java Servlet Specification", which describes in detail the above architecture and how the various pieces should work together. (Each version of tomcat corresponds to a certain version of Java, and of that "Servlet Specification", see : https://tomcat.apache.org/whichversion.html) webapps also have to follow the same Specification, otherwise they may not necessarily work with tomcat. The standard tomcat distribution comes with one single "default webapp", which is thus installed under (tomcat-directory)/webapps/ROOT/. (That one thus, we know and can support). To install and run additional webapps (like yours), you create another subdirectory under /webapps/, and you copy (or unzip) the webapp files there (in your case, that is thus (tomcat dir)/webapps/paDowntimeUapp-0.2.2). You then restart tomcat. Upon restart, tomcat scans everything it finds under /webapps/*, and if everything is ok within your application, tomcat makes it available to be called and run. Note 1 : your application could also come in the form of a single .jar file, which is a kind of zip containing all the aplication files; in that case, tomcat itself will unzip it when it starts, and then look at it) Note 2 : except for the "default webapp" (in /webapps/ROOT) that comes with the tomcat package, all other webapps come from third-parties, and their code is not normally known by or available to the tomcat developers. That's why we cannot really help you here. Note 3 : the above is quite summarised and simplified. There are many more things to say about webapps and how to install and run them. The ultimate reference is http://tomcat.apache.org/ There is also a lot of practical information here : https://wiki.apache.org/tomcat/FAQ Additional note relative to the information in your previous post : the javascript code that you showed before, is probably a file that will be retrieved by the browser, and executed by the browser. To my knowledge, tomcat itself does not contain or run any javascript code on the server side. Thanks anyway and have a nice day ! Same to you. ____ De : André Warnier (tomcat) Envoyé : mercredi 29 mai 2019 11:50:20 À : users@tomcat.apache.org Objet : Re: Language Settings Location Hi. See at end. On 29.05.2019 11:04, Victor WILLART wrote: Apache Tomcat 8.0 - Windows 64x Hi, I just wanted to know if there is a way to figure out where is the settings file which define the language of a web application using Apache Tomcat 8.0> Here is a part of a code that makes me think there is a way to change language settings: (function () { var locale = (window.navigator.languages) ? window.navigator.languages[0] : (window.navigator.userLanguage || window.navigator.language); //gets user's preffered language as dictated in settings var supportedLocales = ['en-US', 'ko', 'zh-CN', 'it', 'fr', 'es', 'de',
RE: Language Settings Location
I see, first time trying to understand how a web app works … Thanks anyway and have a nice day ! De : André Warnier (tomcat) Envoyé : mercredi 29 mai 2019 11:50:20 À : users@tomcat.apache.org Objet : Re: Language Settings Location Hi. See at end. On 29.05.2019 11:04, Victor WILLART wrote: > Apache Tomcat 8.0 - Windows 64x > > Hi, I just wanted to know if there is a way to figure out where is the > settings file which define the language of a web application using Apache > Tomcat 8.0> > > Here is a part of a code that makes me think there is a way to change > language settings: > > > > (function () { > var locale = (window.navigator.languages) ? > window.navigator.languages[0] : > (window.navigator.userLanguage || window.navigator.language); > //gets user's preffered language as dictated in settings > var supportedLocales = ['en-US', 'ko', 'zh-CN', 'it', 'fr', 'es', 'de', > 'ja', 'nl', 'pl', 'pt-BR', 'ru', 'sv', 'ar', 'da', 'fi', 'he', 'sl', 'tr']; > var scriptName = > document.getElementById("locale").getAttribute("rel-path"); > var defaultScript = scriptName + 'default.properties'; > > And in the same folder I have access to properties files with the > translation of the app for these same languages. > Location of the folder: "C:\Program Files\Apache Software Foundation\Tomcat > 8.0\webapps\paDowntimeUapp-0.2.2\external-resources\i18n" > > So I was wondering where this settings file could be, is it a JSON file ? > > If you have any hints that could be pretty handy ! If you need more > information or think it is not clear enough please tell me. > I believe that this is a question for the supplier of that application (webapp) "paDowntimeUapp" (?) There is nothing in the Tomcat code or setup that influences the language in which an application (a webapp) responds to the browser; that is done inside the application itself. Said another way : the code which you show above is javascript code, probably found inside the directory where your webapp "paDowntimeUapp" is installed under tomcat/webapps. The same for those properties files. These code/properties files have nothing to do with tomcat itself, and there is not much that we can do to help, because we do not know this application and do not have its code. (It is not that we do not want to help, it is just that we can't). - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Language Settings Location
Hi. See at end. On 29.05.2019 11:04, Victor WILLART wrote: Apache Tomcat 8.0 - Windows 64x Hi, I just wanted to know if there is a way to figure out where is the settings file which define the language of a web application using Apache Tomcat 8.0> Here is a part of a code that makes me think there is a way to change language settings: (function () { var locale = (window.navigator.languages) ? window.navigator.languages[0] : (window.navigator.userLanguage || window.navigator.language); //gets user's preffered language as dictated in settings var supportedLocales = ['en-US', 'ko', 'zh-CN', 'it', 'fr', 'es', 'de', 'ja', 'nl', 'pl', 'pt-BR', 'ru', 'sv', 'ar', 'da', 'fi', 'he', 'sl', 'tr']; var scriptName = document.getElementById("locale").getAttribute("rel-path"); var defaultScript = scriptName + 'default.properties'; And in the same folder I have access to properties files with the translation of the app for these same languages. Location of the folder: "C:\Program Files\Apache Software Foundation\Tomcat 8.0\webapps\paDowntimeUapp-0.2.2\external-resources\i18n" So I was wondering where this settings file could be, is it a JSON file ? If you have any hints that could be pretty handy ! If you need more information or think it is not clear enough please tell me. I believe that this is a question for the supplier of that application (webapp) "paDowntimeUapp" (?) There is nothing in the Tomcat code or setup that influences the language in which an application (a webapp) responds to the browser; that is done inside the application itself. Said another way : the code which you show above is javascript code, probably found inside the directory where your webapp "paDowntimeUapp" is installed under tomcat/webapps. The same for those properties files. These code/properties files have nothing to do with tomcat itself, and there is not much that we can do to help, because we do not know this application and do not have its code. (It is not that we do not want to help, it is just that we can't). - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Language Settings Location
Apache Tomcat 8.0 - Windows 64x Hi, I just wanted to know if there is a way to figure out where is the settings file which define the language of a web application using Apache Tomcat 8.0> Here is a part of a code that makes me think there is a way to change language settings: (function () { var locale = (window.navigator.languages) ? window.navigator.languages[0] : (window.navigator.userLanguage || window.navigator.language); //gets user's preffered language as dictated in settings var supportedLocales = ['en-US', 'ko', 'zh-CN', 'it', 'fr', 'es', 'de', 'ja', 'nl', 'pl', 'pt-BR', 'ru', 'sv', 'ar', 'da', 'fi', 'he', 'sl', 'tr']; var scriptName = document.getElementById("locale").getAttribute("rel-path"); var defaultScript = scriptName + 'default.properties'; And in the same folder I have access to properties files with the translation of the app for these same languages. Location of the folder: "C:\Program Files\Apache Software Foundation\Tomcat 8.0\webapps\paDowntimeUapp-0.2.2\external-resources\i18n" So I was wondering where this settings file could be, is it a JSON file ? If you have any hints that could be pretty handy ! If you need more information or think it is not clear enough please tell me. Regards Victor - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org