Mark, I was thinking more about Parallel deployment section of Tomcat Docs https://tomcat.apache.org/tomcat-9.0-doc/config/context.html
Just a simple mention like " If you want to get the current webapp version number in a servlet you should use org.apache.catalina.webappVersion attribute, like this: String webappVersion = (String)request.gteServletContext().getAttribute("org.apache.catalina.webappVersion"); " ________________________________ От: Mark Thomas <ma...@apache.org> Отправлено: 18 марта 2025 г. 9:35 Кому: users@tomcat.apache.org <users@tomcat.apache.org> Тема: Re: context path version number with parallel deployment On 17/03/2025 18:43, Усманов Азат Анварович wrote: > thanks a lot! I got it working. > A quick follow up > What's step do I need to take to include this info in documentation ? I > think it might be useful to others The list is in the Javadoc: https://tomcat.apache.org/tomcat-11.0-doc/api/org/apache/catalina/Globals.html Where else would you like to see it? The where may change which steps are required to update the docs. Mark > ________________________________ > От: Christopher Schultz <ch...@christopherschultz.net> > Отправлено: 17 марта 2025 г. 17:40 > Кому: users@tomcat.apache.org <users@tomcat.apache.org> > Тема: Re: context path version number with parallel deployment > > Азат, > > On 3/17/25 8:53 AM, Усманов Азат Анварович wrote: >> Hi everyone! is it possible to display current version number in a jsp page >> or servlet when using parallel deployment . using some property. >> Currently when building an app war we use git to calculate last revision >> number, store it in a file, use it to name a war accordingly.ex >> Education##15229, Education##15230 etc. >> I know tomcat already using something to show version because when >> checking catalina.out for errors it already shows something like >> 17-Mar-2025 11:15:49.732 SEVERE [https-openssl-apr-8443-exec-73] >> org.apache.catalina.core.StandardWrapperValve.invoke Servlet.service() for >> servlet [IndexServlet] with context path [/Education##23459] threw >> exception [org.opensaml.common.SAMLException: Assertion is not conformed >> with notOnOrAfter condition] with root cause >> >> I know if such property exists its probably a tomcat one, not java, since >> parallel deployment is not a java but a tomcat feature >> and request. getContextPath() shows only the main part (before ##) - >> /Education >> Ability to display such information in a webpage, would help greatly in >> troubleshooting various app users requests when dealing with multiple >> version s >> Any help is appreciated! >> Tomcat version 9.0.64 >> OS RHEL Linux 6.5 >> Java version 1.8.202 > > String webappVersion = > (String)request.gteServletContext().getAttribute("org.apache.catalina.webappVersion"); > > -chris > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org