Re: Application name in log record

2022-01-10 Thread Makarov Alexey
g format(LogRecord record) { String webappName = LogManager.getLogManager()    .getProperty(OneLineFormatter.class.getName() + ".webappName"); // ".hostName", ".serviceName", ".catalinaBase" return String.format("%s/n",

Re: Application name in log record

2022-01-10 Thread Mark Thomas
   .getProperty(OneLineFormatter.class.getName() + ".webappName"); // ".hostName", ".serviceName", ".catalinaBase"     return String.format("%s/n", webappName); // only application name for testing } } in $CATALINA_BASE/co

Re: Application name in log record

2022-01-10 Thread Makarov Alexey
r.class.getName() + ".webappName"); // ".hostName", ".serviceName", ".catalinaBase"     return String.format("%s/n", webappName); // only application name for testing } } in $CATALINA_BASE/conf/logging.properties: my.log.formatter.MyCust

Re: Application name in log record

2022-01-10 Thread Rémy Maucherat
atalina.base}/conf/logging.properties > > file: > > > > ... > > org.apache.tomee.jul.formatter.AsyncConsoleHandler.level = FINE > > org.apache.tomee.jul.formatter.AsyncConsoleHandler.formatter = > > my.log.formatter.OneLineFormatter > > org.apache.tomee.jul.formatter.Asy

Re: Application name in log record

2022-01-10 Thread Mark Thomas
y... Maybe there any other way, to get servlet context from InitialContext or application name from LogManager property: java.util.logging.LogManager.getLogManager().getProperty(...) Do you know desired property or how to list LogManager properties? 10.01.2022 12:53, Mark Thomas пишет: U

Re: Application name in log record

2022-01-10 Thread Makarov Alexey
mee.jul.formatter.AsyncConsoleHandler.level = FINE org.apache.tomee.jul.formatter.AsyncConsoleHandler.formatter = my.log.formatter.OneLineFormatter org.apache.tomee.jul.formatter.AsyncConsoleHandler.encoding = UTF-8 ... Looks like, I cannot access to ServletContext directly... Maybe there any other way, to get servlet con

Re: Application name in log record

2022-01-09 Thread Mark Thomas
Use ServletContext.getContextPath()? If you have a more complex deployment you might want to preface it with ServletContext.getVirtualServerName() Mark On 10/01/2022 05:00, Makarov Alexey wrote: Hello! I want to print application name in my log files. As I know, I must implemet custom log

Application name in log record

2022-01-09 Thread Makarov Alexey
Hello! I want to print application name in my log files. As I know, I must implemet custom log formatter. How I can get application name? import java.util.logging.Formatter; import java.util.logging.LogRecord; public class MyCustomLogFormatter extends Formatter {     @Override     public String

RE: session not working when dash or underscore in application name

2013-01-20 Thread Martin Gainty
Subject: Re: session not working when dash or underscore in application name > > Thanks, maybe the problem has been solved in 7.0.34, I'll try that > version later > in the meantime I simply removed all dashes and underscores, and > everything works fine > > L

Re: session not working when dash or underscore in application name

2013-01-20 Thread Benin Technologies
Thanks, maybe the problem has been solved in 7.0.34, I'll try that version later in the meantime I simply removed all dashes and underscores, and everything works fine Le 19/01/2013 20:52, Christopher Schultz a écrit : -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 To whom it may concern, O

Re: session not working when dash or underscore in application name

2013-01-19 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 To whom it may concern, On 1/19/13 7:15 AM, Benin Technologies wrote: > I just installed Tomcat 7.0.32 on Debian Linux 6 (Squeeze). Client > is Mozilla Firefox 12.0, also on Debian Linux 6. > > To test session behavior, I did a simple JSP page that

session not working when dash or underscore in application name

2013-01-19 Thread Benin Technologies
Hi, I just installed Tomcat 7.0.32 on Debian Linux 6 (Squeeze). Client is Mozilla Firefox 12.0, also on Debian Linux 6. To test session behavior, I did a simple JSP page that simulates a coin launch (heads or tales), and displays the total of heads and total of tails. If my war file is call

Re: Application name

2012-08-06 Thread Marco de Booij
then I get an error message: javax.naming.NameNotFoundException: Name [app/AppName] is not bound in this Context. Unable to find [app]. In the manager application of Tomcat I see both names in the application list. I was able to use this in Glassfish. There I could define a application name i

Re: Application name

2012-08-05 Thread Mark Eggers
ame] is not bound in this Context. Unable to find [app]./ In the manager application of Tomcat I see both names in the application list. I was able to use this in Glassfish. There I could define a application name in the console when I deployed the application. Is it also possible with Tomcat or do

Re: Application name

2012-08-05 Thread Konstantin Kolinko
t; /javax.naming.NameNotFoundException: Name [app/AppName] is not bound in this > Context. Unable to find [app]./ > > In the manager application of Tomcat I see both names in the application > list. > > I was able to use this in Glassfish. There I could define a application name

Application name

2012-08-05 Thread Marco de Booij
n I get an error message: /javax.naming.NameNotFoundException: Name [app/AppName] is not bound in this Context. Unable to find [app]./ In the manager application of Tomcat I see both names in the application list. I was able to use this in Glassfish. There I could define a application name in t

Re: web application name

2006-07-05 Thread Mark Thomas
asaf.lahav wrote: > How can I obtain the name of the web application name my listener servlet is > running under in Java? There is no such thing as a listener servlet but there are a bunch of different Listener classes. Which one are you trying to use?

Re: web app application name

2006-07-05 Thread Avi Deitcher
ving the display name element >(MyAppName) defined in the web.xml file. > > > >I would like to know if anyone has a better idea. > >Potentially the display name may be changed and not reflect the actual web >application name. > > > >-Original Message- >Fro

RE: web app application name

2006-07-05 Thread asaf.lahav
display name may be changed and not reflect the actual web application name. -Original Message- From: David Delbecq [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 05, 2006 2:19 PM To: Tomcat Users List Subject: Re: web app application name asaf.lahav wrote: > > > How can

Re: web app application name

2006-07-05 Thread Avi Deitcher
when configured semi-programmatically. I gave up in the end. David Delbecq wrote: > asaf.lahav wrote: > >> >> >> How can I obtain the name of the web application name my listener >> servlet is >> running under in Java? >> >&

Re: web app application name

2006-07-05 Thread David Delbecq
asaf.lahav wrote: How can I obtain the name of the web application name my listener servlet is running under in Java? request.getContextPath(); Greetings. - To start a new topic, e-mail: users@tomcat.apache.org To

Re: web app application name

2006-07-05 Thread David Smith
AFAIK, it depends on the listener. Listeners implementing ServletRequestListener can retrieve it from the request; for others I don't see a clear way. --David asaf.lahav wrote: How can I obtain the name of the web application name my listener servlet is running under in

web app application name

2006-07-05 Thread asaf.lahav
How can I obtain the name of the web application name my listener servlet is running under in Java?

web application name

2006-07-05 Thread asaf.lahav
How can I obtain the name of the web application name my listener servlet is running under in Java?