Re: Log4j2 logging with Tomcat 9 web app

2021-07-21 Thread Ravi Kumar
Hey Mark,
Thanks for the link. But this doesn't help me resolve the issue with my
Tomcaat9- log4j2 web-based application.
Request you to provide any more info from log4j2.x-tomcat 9 level logging.

Regards,
Ravi


On Wed, Jul 21, 2021 at 2:15 PM Mark Thomas  wrote:

> On 20/07/2021 21:05, Ravi Kumar wrote:
> > Hi,
> >
> > My web app is based on Tomcat 9.0.45 server. I have migrated from Tomcat
> > 7 to Tomcat 9 and from log4j 1.x to log4j 2.x.
> > I have updated the log4j2.properties as per log4j 2.x standard, still my
> > tomcat.log file is not getting generated and all the application log are
> > coming on console instead of redirecting this to tomcat.log file.
> >
> > so 1.tomcat.log is not geting  generated
> >   2. all the contents are logging and showing on the application
> > console instead of getting this logged inside the tomcat.log file.
> >
> > Tomcat 9.0.45 + log4j 2.14.1 is used.
> >
> > I am also attaching my log4j property file. Please find this attached
> here.
> >
> > Kindly suggest me the solution.
>
> https://logging.apache.org/log4j/2.x/log4j-jul/index.html
>
> Mark
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Log4j2 logging with Tomcat 9 web app

2021-07-20 Thread Ravi Kumar
Hi,

My web app is based on Tomcat 9.0.45 server. I have migrated from Tomcat 7
to Tomcat 9 and from log4j 1.x to log4j 2.x.
I have updated the log4j2.properties as per log4j 2.x standard, still my
tomcat.log file is not getting generated and all the application log are
coming on console instead of redirecting this to tomcat.log file.

so 1.tomcat.log is not geting  generated
 2. all the contents are logging and showing on the application console
instead of getting this logged inside the tomcat.log file.

Tomcat 9.0.45 + log4j 2.14.1 is used.

I am also attaching my log4j property file. Please find this attached here.

Kindly suggest me the solution.

Thank you.
Ravi
#log4j.rootLogger=error, R 
#log4j.appender.R=org.apache.log4j.RollingFileAppender 
#log4j.appender.R.File=${catalina.base}/logs/tomcat.log 
#log4j.appender.R.MaxFileSize=10MB 
#log4j.appender.R.MaxBackupIndex=10 
#log4j.appender.R.layout=org.apache.log4j.PatternLayout 
#log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n 
#log4j.logger.org.apache.catalina=error, R
#log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina].[localhost]=error,
 R
#log4j.logger.org.apache.catalina.core=error, R
#log4j.logger.org.apache.catalina.session=error, R

status = error
name = Log4j2PropertiesConfig

appender.rolling.type = RollingFile
appender.rolling.name = RollingFile
appender.rolling.fileName 
=D:/TH512-15/administrator/domain/RD1/tomcat/logs/tomcat.log
appender.rolling.layout.type = PatternLayout
appender.rolling.layout.pattern =%p %t %c - %m%n
appender.rolling.policies.type = Policies
appender.rolling.policies.size.type = SizeBasedTriggeringPolicy
appender.rolling.policies.size.size=10MB
appender.rolling.strategy.type = DefaultRolloverStrategy
appender.rolling.strategy.max = 10

logger.rolling.name = org.apache.catalina
logger.rolling.level = error
logger.rolling.additivity = false
logger.rolling.appenderRef.rolling.ref = RollingFile

logger.rolling.name = 
org.apache.catalina.core.ContainerBase.[Catalina].[localhost]
logger.rolling.level = error
logger.rolling.additivity = false
logger.rolling.appenderRef.rolling.ref = RollingFile
  
logger.rolling.name = org.apache.catalina.core
logger.rolling.level = error
logger.rolling.additivity = false
logger.rolling.appenderRef.rolling.ref = RollingFile
 
logger.rolling.name = org.apache.catalina.session
logger.rolling.level = error
logger.rolling.additivity = false
logger.rolling.appenderRef.rolling.ref = RollingFile
-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Re: TOMCAT 9 Upgrade :--java.lang.NoClassDefFoundError: org/apache/tomcat/util/net/ServerSocketFactory

2021-03-24 Thread Ravi Kumar
Thanks Remmy & Chris !

So ,We are trying to add our own custom SSLImplementation and for the
functioning of the same we need to use
org.apache.tomcat.util.net.SSLImplementation.getServerSocketFactory(AbstractEndpoint
abstractEP).
But with Tomcat 8.5.x and Tomcat 9, the api getServerSocketFactory is
removed from the SSLImplementation.java .
So, is there a way to get the callback from Tomcat api to our application
once the sslimplementation is set to our inhouse custom SSLImplementation ?

Please let me know.
Appreciate your help.

Many Thanks,
Ravi
Is there any other way of achieving this?

On Tue, Feb 23, 2021 at 9:55 PM Rémy Maucherat  wrote:

> On Tue, Feb 23, 2021 at 4:47 PM Christopher Schultz <
> ch...@christopherschultz.net> wrote:
>
> > Ravi,
> >
> > On 2/23/21 10:19, Ravi Kumar wrote:
> > > Using this Interface , trying to obtain the object of type
> > > ServerSocketFactory in my application.
> > > Could you please point towards any other viable alternative ?
> > >
> > > @Override
> > > <http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/lang/Override.html>
> > >  public ServerSocketFactory
> > > <
> >
> http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/net/ServerSocketFactory.html
> > >
> > > getServerSocketFactory(AbstractEndpoint abstractendpoint) {
> > >  return new JSSESocketFactory(abstractendpoint);
> > >  }
> >
> > No, that's "how you are doing it". Nobody just wants to get a reference
> > to a ServerSocketFactory object because it looks pretty. What are you
> > actually trying to accomplish?
> >
> > (e.g. log the TLS protocol, customize the cipher suites, etc.)
> >
>
> I know people who extended this to add features. The problem is that this
> had to go following the removal of java.io in Tomcat, and now the
> SSLEngine
> has to be used instead [compatible with NIO and NIO2]. But it's a huge
> change.
>
> Rémy
>
>
> >
> > -chris
> >
> > > On Tue, Feb 23, 2021 at 8:15 PM Christopher Schultz <
> > > ch...@christopherschultz.net> wrote:
> > >
> > >> Ravi,
> > >>
> > >> Please don't email list members directly. I'm happy to offer paid
> > >> support if you want to email me directly.
> > >>
> > >> On 2/23/21 05:11, Ravi Kumar wrote:
> > >>> We are upgrading the tomcat web server getting used in our web
> > >>> application. Currently we are using tomcat 7 and now migrating to
> > TOMCAT
> > >>> 9.0.43.
> > >>> We have an existing  HTTPS based application created using tomcat 7.
> > >>> Now after migration and upgrading to tomcat 9, while starting this
> same
> > >>> https application, we are receiving the error message as mentioned
> > below
> > >>> *SEVERE: Failed to initialize component [Connector[HTTP/1.1-8443]]
> > >>> java.lang.NoClassDefFoundError:
> > >>> org/apache/tomcat/util/net/ServerSocketFactory*
> > >>> *
> > >>> *
> > >>>It seems that org.apache.tomcat.util.net
> > >>> <http://org.apache.tomcat.util.net>.*ServerSocketFaactory *class has
> > >>> been removed since tomcat 8.5.53 and in Tomcat 9 also.
> > >>
> > >> Correct.
> > >>
> > >>> Requesting for the helpful suggestion to make our existing
> application
> > >>> working with Tomcat 9 and to resolve this error.
> > >>> Please let me know if more information is required.
> > >>
> > >> What do you need this class for? Tomcat's socket handling has been
> > >> refactored between 7.x and 8.x and that class was no longer necessary.
> > >>
> > >> If your code uses that class directly, you will have to find another
> way
> > >> to accomplish what you are doing.
> > >>
> > >> So... what are you trying to do?
> > >>
> > >> -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
> >
> >
>


Re: Realm issue with Tomcat 9

2021-03-23 Thread Ravi Kumar
Thanks Mark for this , applied the solution and it worked.

On Tue, Mar 23, 2021 at 3:58 PM Mark Thomas  wrote:

> On 23/03/2021 10:05, Ravi Kumar wrote:
> > Hello,
> > I am migrating my application which is using tomcat 7 currently to tomcat
> > 9. As there are a lot of changes in the API, with tomcat 7 we were
> setting
> > the Realm for this engine by // set the Realm for this engine
> >  //tomcatServer.setDefaultRealm(new TomcatRepoRealm());
> > Here tomcatServer is an object
> > of org.apache.catalina.startup.Tomcat.Tomcat() and we are invoking the
> > setDefaultRealm to set the realm for the engine for our application
> running
> > on Tomcat 7.Now as we are migrating our application from Tomcat 7 to
> Tomcat
> > 9, if we try to set the realm for the engine then what is the best way to
> > do that as org.apache.catalina.startup.Tomcat.Tomcat().setDefaultRealm()
> is
> > now deprecated.Appreciate your help!
>
> tomcatServer.getEngine().setRealm(new TomcatRepoRealm());
>
> Mark
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Realm issue with Tomcat 9

2021-03-23 Thread Ravi Kumar
Hello,
I am migrating my application which is using tomcat 7 currently to tomcat
9. As there are a lot of changes in the API, with tomcat 7 we were setting
the Realm for this engine by // set the Realm for this engine
//tomcatServer.setDefaultRealm(new TomcatRepoRealm());
Here tomcatServer is an object
of org.apache.catalina.startup.Tomcat.Tomcat() and we are invoking the
setDefaultRealm to set the realm for the engine for our application running
on Tomcat 7.Now as we are migrating our application from Tomcat 7 to Tomcat
9, if we try to set the realm for the engine then what is the best way to
do that as org.apache.catalina.startup.Tomcat.Tomcat().setDefaultRealm() is
now deprecated.Appreciate your help!

Thanks,
Ravi


Re: Replacement / alternatives of Tomcat-juli.jar and Tomcat-juli-adapters.jar in Tomcat 9

2021-02-25 Thread Ravi Kumar
Hi Luis,
Thank you for your suggestion and valuable information.
Appreciate the assistance.

Regards,
Ravi

On Wed, Feb 24, 2021 at 10:06 PM Luis Rodríguez Fernández 
wrote:

> Hello Ravi,
>
> Here [1] upi can find an example of tomcat 9 + log4j2.
>
> Hope it helps,
>
> Luis
>
> [1] https://github.com/lurodrig/log4j2-in-tomcat
>
> El mié, 24 feb 2021 a las 17:09, Ravi Kumar ()
> escribió:
>
> > Hi Mark,
> >
> > Thanks for the suggestion and help. We will review and revert .
> >
> > Thanks again.
> > Regards,
> > Ravi
> >
> > On Wed, Feb 24, 2021 at 9:30 PM Mark Thomas  wrote:
> >
> > > On 24/02/2021 15:57, Ravi Kumar wrote:
> > > > Hi Tomcat Team,
> > > >
> > > > We used to have *Tomcat-juli.jar and Tomcat-juli-adapters.jar*
> > available
> > > on
> > > > Tomcat7 download pages under the EXTRAS directory.
> > > >
> > > > But with Tomcat 9, we don't have these 2 jars or in fact extras
> folder
> > > > available. We use these jars for logging purposes of the
> > web-application
> > > > console.
> > > >
> > > > Could you please suggest any alternative jars or any other way for
> > > > accommodating this replacements in Tomcat 9 ?
> > >
> > > Those were for log4j 1.x which is no longer supported.
> > >
> > > If you want to use log4j 2.x that can intercept java.util.logging
> > > (Tomcat's default logging system) without additional Tomcat JARs.
> > > Details on how to intercept j.u.l should be in the log4j 2.x docs.
> > >
> > > Mark
> > >
> > > -
> > > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> > > For additional commands, e-mail: users-h...@tomcat.apache.org
> > >
> > >
> >
>
>
> --
>
> "Ever tried. Ever failed. No matter. Try Again. Fail again. Fail better."
>
> - Samuel Beckett
>


Re: Replacement / alternatives of Tomcat-juli.jar and Tomcat-juli-adapters.jar in Tomcat 9

2021-02-24 Thread Ravi Kumar
Hi Mark,

Thanks for the suggestion and help. We will review and revert .

Thanks again.
Regards,
Ravi

On Wed, Feb 24, 2021 at 9:30 PM Mark Thomas  wrote:

> On 24/02/2021 15:57, Ravi Kumar wrote:
> > Hi Tomcat Team,
> >
> > We used to have *Tomcat-juli.jar and Tomcat-juli-adapters.jar* available
> on
> > Tomcat7 download pages under the EXTRAS directory.
> >
> > But with Tomcat 9, we don't have these 2 jars or in fact extras folder
> > available. We use these jars for logging purposes of the web-application
> > console.
> >
> > Could you please suggest any alternative jars or any other way for
> > accommodating this replacements in Tomcat 9 ?
>
> Those were for log4j 1.x which is no longer supported.
>
> If you want to use log4j 2.x that can intercept java.util.logging
> (Tomcat's default logging system) without additional Tomcat JARs.
> Details on how to intercept j.u.l should be in the log4j 2.x docs.
>
> Mark
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Replacement / alternatives of Tomcat-juli.jar and Tomcat-juli-adapters.jar in Tomcat 9

2021-02-24 Thread Ravi Kumar
Hi Tomcat Team,

We used to have *Tomcat-juli.jar and Tomcat-juli-adapters.jar* available on
Tomcat7 download pages under the EXTRAS directory.

But with Tomcat 9, we don't have these 2 jars or in fact extras folder
available. We use these jars for logging purposes of the web-application
console.

Could you please suggest any alternative jars or any other way for
accommodating this replacements in Tomcat 9 ?

Thanks in advance,

Regards,
Ravi


Re: TOMCAT 9 Upgrade :--java.lang.NoClassDefFoundError: org/apache/tomcat/util/net/ServerSocketFactory

2021-02-23 Thread Ravi Kumar
Using this Interface , trying to obtain the object of type
ServerSocketFactory in my application.
Could you please point towards any other viable alternative ?

@Override
<http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/lang/Override.html>
public ServerSocketFactory
<http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/net/ServerSocketFactory.html>
getServerSocketFactory(AbstractEndpoint abstractendpoint) {
return new JSSESocketFactory(abstractendpoint);
}

Thanks in Advance,
Regards,
Ravi

On Tue, Feb 23, 2021 at 8:15 PM Christopher Schultz <
ch...@christopherschultz.net> wrote:

> Ravi,
>
> Please don't email list members directly. I'm happy to offer paid
> support if you want to email me directly.
>
> On 2/23/21 05:11, Ravi Kumar wrote:
> > We are upgrading the tomcat web server getting used in our web
> > application. Currently we are using tomcat 7 and now migrating to TOMCAT
> > 9.0.43.
> > We have an existing  HTTPS based application created using tomcat 7.
> > Now after migration and upgrading to tomcat 9, while starting this same
> > https application, we are receiving the error message as mentioned below
> > *SEVERE: Failed to initialize component [Connector[HTTP/1.1-8443]]
> > java.lang.NoClassDefFoundError:
> > org/apache/tomcat/util/net/ServerSocketFactory*
> > *
> > *
> >   It seems that org.apache.tomcat.util.net
> > <http://org.apache.tomcat.util.net>.*ServerSocketFaactory *class has
> > been removed since tomcat 8.5.53 and in Tomcat 9 also.
>
> Correct.
>
> > Requesting for the helpful suggestion to make our existing application
> > working with Tomcat 9 and to resolve this error.
> > Please let me know if more information is required.
>
> What do you need this class for? Tomcat's socket handling has been
> refactored between 7.x and 8.x and that class was no longer necessary.
>
> If your code uses that class directly, you will have to find another way
> to accomplish what you are doing.
>
> So... what are you trying to do?
>
> -chris
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


TOMCAT 9 Upgrade :--java.lang.NoClassDefFoundError: org/apache/tomcat/util/net/ServerSocketFactory

2021-02-23 Thread Ravi Kumar
Dear Tomcat Team,

We are upgrading the tomcat web server getting used in our web application.
Currently we are using tomcat 7 and now migrating to TOMCAT 9.0.43.
We have an existing  HTTPS based application created using tomcat 7.
Now after migration and upgrading to tomcat 9, while starting this same
https application, we are receiving the error message as mentioned below

*SEVERE: Failed to initialize component
[Connector[HTTP/1.1-8443]]java.lang.NoClassDefFoundError:
org/apache/tomcat/util/net/ServerSocketFactory*

 It seems that org.apache.tomcat.util.net.*ServerSocketFaactory *class has
been removed since tomcat 8.5.53 and in Tomcat 9 also.

Requesting for the helpful suggestion to make our existing application
working with Tomcat 9 and to resolve this error.
Please let me know if more information is required.

Regards,
Ravi


Can we get Digest Authentication with TOMCAT 7

2021-01-13 Thread Ravi Kumar
Hi Tomcat Team,

I am using a Tomcat based webserver container for our web application. All
the deplyoment and other task taken care using TOMCAT 7.10.105.

Currently we are using the BASIC Authentication for the Manager and tomcat
web application.
Can we migrate and use DIGEST Authentication for the same ?  What are the
suggested and recommended way to implement and using DIGEST Authentication
with TOMCAT 7 web applications?

Your valuable assistance is much appreciated.

Regards,
Ravi


Re: How to Disable / turn off the ETag header of Tomcat 7.0.92

2019-01-16 Thread Ravi Kumar
Hi Chris  & Mark,

This is what I am doing in my web.xml file:-


 NoEtagFilter
 com.tibco.administrator.TestETagFilter
 


 NoEtagFilter
 default>
 REQUEST
 FORWARD
 

I don't have any code snippet in place in my Servlet Filter .
Could you please suggest me further to disable this ETag header ?

Query no. 2:-  Is there any way to set

*Header unset EtagFileETag none*

in which of the Tomcat configuration file ? I am using Tomcat 7.0.92.

Please suggest .

Thanks,
Ravi


On Wed, Jan 16, 2019 at 2:18 AM Christopher Schultz <
ch...@christopherschultz.net> wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA256
>
> Ravi,
>
> On 1/15/19 09:41, Ravi Kumar wrote:
> > Please find my web.xml configuration file attached.
>
> I don't see anything configured that looks like it might be an
> "ignoreETagFilter". Did you configure it somewhere else?
>
> - -chris
>
> > On Tue, Jan 15, 2019 at 7:44 PM Christopher Schultz
> >  > <mailto:ch...@christopherschultz.net>> wrote:
> >
> > Mark,
> >
> > On 1/15/19 06:12, Mark Thomas wrote:
> >> On 15/01/2019 10:43, Ravi Kumar wrote:
> >>> Hi All,
> >>>
> >>> I am facing an issue. It is kind of Security issue as Tomcat's
> >>> ETag header in Response header can reveal vital info.
> >
> >> What vital info? The ETag is constructed from the content length
> >> and the last modified date.
> >
> >>> We want to disable / turnoff this ETag header of Tomcat
> >>> webserver. Referred this link :-
> >>> https://serverfault.com/questions/232763/how-to-disable-etag-headers
> - -
> >
> >>>
> in-tomcat
> > <https://serverfault.com/questions/232763/how-to-disable-etag-headers-
> in-tomcat
> <https://serverfault.com/questions/232763/how-to-disable-etag-headers-in-tomcat>
> >
> >>>
> >>>
> >
> >
> but couldn't get success to disable this ETag.
> >>>
> >>> Appreciate your help !
> >
> >> The approached described in that link won't work if the response
> >> is sufficiently large that the response has already been
> >> committed. You'd need to wrap the response, override
> >> setHeader(String, String) and NO-OP and calls that try to set the
> >> "ETag" header.
> >
> > That's what Tim's SO answer suggests.
> >
> > Ravi, I suspect that you haven't mapped the filter to your servlet
> > correctly. Can you post your configuration for your ,
> > , and the URL you are trying to request?
> >
> > -chris
> >
> > -
> >
> >
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> > <mailto:users-unsubscr...@tomcat.apache.org> For additional
> > commands, e-mail: users-h...@tomcat.apache.org
> > <mailto:users-h...@tomcat.apache.org>
> >
> >
> >
> > -
> >
> >
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> > For additional commands, e-mail: users-h...@tomcat.apache.org
> >
> -BEGIN PGP SIGNATURE-
> Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/
>
> iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlw+RyYACgkQHPApP6U8
> pFjJrw//Sb1Y/Y6HXu5UQJLxtcacZgHI9jbXHcJFLVJmd//WmqQlmiGpWQ69NlgI
> /d8R2DU934DDWAihRhKAl054VNILvYG52yhyUHBYmAdB6z1Y/xAmSdIgM3YCS5e+
> NAaZXexrZKllWe9KUII00iaMfp+fP/kEH3v0nY7qrdKg3LELaM/wjgLtdrXcvjFP
> 4VQOeSRt6AnXOfUiyOTRXOwhe9S28vM3lZwv98da4+iwor8X2HJgIXwIScnu/Nxc
> 6EMrNMwgR2htsR92a31vDf2R111BaajrLgIBN7jzdEQlcFxwU4/SrS50Ha4NWEYB
> C39t8Bvymrdmqn9+WXm4ht9JX8872BqXH8G0zhMxqufRYZ+zWru7FKSxWI0d2QJ/
> QdUUH11GgEfueYM+sGUQRbQ6hlWAILPCTqAz7ClrNRzdJAbxpTmwOzuyGyTzQ4Ew
> cvSQCNxWkF9Cu1R+lPyEf3A7SIJmrEBeoD6RNKrn+kxOcgDuHCYqL3/7CjHiV6UX
> upI3D7bqYAhR5hpa+7G6YoaFx2MeotYoUVwKy2L7B+kiUVN/8vJwVNEOhHziDDw/
> JOg07wifi31GnJ1L+i/4aCNCx9uCxT+IHz+5ZfHE7rheaJY/Q2BAYtzpzf36J/QS
> nOiM7Mz6CH7FdXOjSVlWHcLwBR2dJISh9O7esYHW5h5FaFKtdHo=
> =4WKz
> -END PGP SIGNATURE-
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: How to Disable / turn off the ETag header of Tomcat 7.0.92

2019-01-15 Thread Ravi Kumar
Hi Chris,

Please find my web.xml configuration file attached.

Thank you !

On Tue, Jan 15, 2019 at 7:44 PM Christopher Schultz <
ch...@christopherschultz.net> wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA256
>
> Mark,
>
> On 1/15/19 06:12, Mark Thomas wrote:
> > On 15/01/2019 10:43, Ravi Kumar wrote:
> >> Hi All,
> >>
> >> I am facing an issue. It is kind of Security issue as Tomcat's
> >> ETag header in Response header can reveal vital info.
> >
> > What vital info? The ETag is constructed from the content length
> > and the last modified date.
> >
> >> We want to disable / turnoff this ETag header of Tomcat
> >> webserver. Referred this link :-
> >> https://serverfault.com/questions/232763/how-to-disable-etag-headers-
> in-tomcat
> <https://serverfault.com/questions/232763/how-to-disable-etag-headers-in-tomcat>
> >>
> >>
> but couldn't get success to disable this ETag.
> >>
> >> Appreciate your help !
> >
> > The approached described in that link won't work if the response
> > is sufficiently large that the response has already been committed.
> > You'd need to wrap the response, override setHeader(String, String)
> > and NO-OP and calls that try to set the "ETag" header.
>
> That's what Tim's SO answer suggests.
>
> Ravi, I suspect that you haven't mapped the filter to your servlet
> correctly. Can you post your configuration for your ,
> , and the URL you are trying to request?
>
> - -chris
> -BEGIN PGP SIGNATURE-
> Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/
>
> iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlw96tUACgkQHPApP6U8
> pFjnOBAAqvLfdCnYJn5UAmJtLEZ0JQTXOdcgTPulG+uckfxTSpHGggisc1HttA2M
> a8zhpVkTlhdXOFX3DcVJYa/YnM2ZwgF49S/PPQL+8kPfAK/HbSFSS1PGIgdO+W/9
> mnr46JrCUQETnRZksS6YStOrK7ST0pUhCr0n6DAfpDBc9Or6kRjX2RUrIfsDbV2o
> vJbXXzdacEUFNY4NpfkexWJPfXA7tnC4y7uJXT5ypwMd50oXrg+6sMZZt+ZUxO8L
> vDlEB3woIGpHSdL95UdSXUrvcSdL+XXDV+iDwj+G5Xj05DoEiVJG2p+rJHDeKtXY
> qRsz4fd4Hybyu7XrBrbufce/vXSndglSvRWbwjz41mFyNZYqV5PoRzqr6jssS7T3
> jDxOt84NuovsYQ3POBiSzLLHNeijAidoM/+hvmYhoogLryP8Tr7eBG2uvoesjMpq
> xYPAdUJPXAcw/CETtE+2q99ybuMyAnhhUNUgRn4W9CmUFFGwThCer+YlRAGng98L
> 80l10l7gytBxCRHZiuKg7ah0rek17svlskZNKYR3AFnP6oUqJoaWJab18oGifL7S
> uHhxsz3oAHN2THzPYSgWXIx30MN4X8GccdzZrCBw5DynxrAUyvxNDTEvj9rvrWjh
> MK8hqcfIKvE8Orx3S+YK0pZC1wv7Egx+gfYL3juM8L3JT9kieZM=
> =549e
> -END PGP SIGNATURE-
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>
http://java.sun.com/dtd/web-app_2_3.dtd;>





com.sales.administrator.AdministratorServlet
com.sales.uac.ui.PLEASE_USE_sales_administrator  



repo
com.sales.repo.RemoteRepoServlet
1



salesadmin_filter
com.sales.administrator.AdministratorServletFilter



salesadmin_XSSfilter
com.sales.administrator.AdministratorServletXSSFilter



  salesadmin_filter
  /servlet/*



  salesadmin_XSSfilter
  /servlet/*



sales_administrator
com.sales.administrator.AdministratorServlet
2



repo
/repo/*

   

sales_administrator
/servlet/sales_administrator



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Re: How to Disable / turn off the ETag header of Tomcat 7.0.92

2019-01-15 Thread Ravi Kumar
Hi Mark,

Thank you for response. Could you please point me to any specific resource
/ link that would help achieve this?
Appreciate your help !

On Tue, Jan 15, 2019 at 4:42 PM Mark Thomas  wrote:

> On 15/01/2019 10:43, Ravi Kumar wrote:
> > Hi All,
> >
> > I am facing an issue. It is kind of Security issue as Tomcat's ETag
> header
> > in Response header can reveal vital info.
>
> What vital info? The ETag is constructed from the content length and the
> last modified date.
>
> > We want to disable / turnoff this ETag header of Tomcat webserver.
> > Referred this link :-
> >
> https://serverfault.com/questions/232763/how-to-disable-etag-headers-in-tomcat
> > but couldn't get success to disable this ETag.
> >
> > Appreciate your help !
>
> The approached described in that link won't work if the response is
> sufficiently large that the response has already been committed. You'd
> need to wrap the response, override setHeader(String, String) and NO-OP
> and calls that try to set the "ETag" header.
>
> Mark
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


How to Disable / turn off the ETag header of Tomcat 7.0.92

2019-01-15 Thread Ravi Kumar
Hi All,

I am facing an issue. It is kind of Security issue as Tomcat's ETag header
in Response header can reveal vital info.

We want to disable / turnoff this ETag header of Tomcat webserver.
Referred this link :-
https://serverfault.com/questions/232763/how-to-disable-etag-headers-in-tomcat
but couldn't get success to disable this ETag.

Appreciate your help !

Thanks,
Ravi


Re: TOMCAT 7.0.92 with JDK 11 :- ERROR localhost-startStop-1 org.apache.catalina.startup.ContextConfig - Unable to process Jar tools.jar for annotations

2019-01-09 Thread Ravi Kumar
Hi Mark,

Thanks for the suggestion. It worked at my end.
We are verifying further and keep you posted.

Thank you again !

Thanks,
Ravi


On Wed, Jan 9, 2019 at 3:56 PM Mark Thomas  wrote:

> On 09/01/2019 09:19, Ravi Kumar wrote:
> >  Dear Team,
> >
> > We have a web application running on Tomcat server container. Web
> > application is compiled and using JDK 11 as runtime JRE for execution
> > purpose.
> >
> > Tomcat Version : - 7.0.92
> > JDK Version :-  11
>
> The stack trace below is not consistent with the version information
> above. It looks like you are using 7.0.91.
>
>
> >
> > Problem Description :-
> > 1.We are seeing the errors in tomcat log regarding jar scanning at time
> of
> > Tomcat server startup.
> > 2. Once Tomcat server is getting launched through our web application, it
> > searches the Tools.jar for annotations purpose.
> > 3. As we all know, JDK 11 has stopped shipping / bundling JRE which
> > contains the tools.jar,
> >  Tomcat server reports an error which is following :--
> >
> > *ERROR localhost-startStop-1 org.apache.catalina.startup.ContextConfig -
> > Unable to process Jar [jar:file:/ C:/JDK11/lib/tools.jar!/] for
> annotations*
> >  java.nio.file.NoSuchFileException: C:\JDK11\lib\tools.jar
> > at
> >
> java.base/sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:85)
> > at
> >
> java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103)
> > at
> >
> java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:108)
> > at
> >
> java.base/sun.nio.fs.WindowsFileAttributeViews$Basic.readAttributes(WindowsFileAttributeViews.java:53)
> > at
> >
> java.base/sun.nio.fs.WindowsFileAttributeViews$Basic.readAttributes(WindowsFileAttributeViews.java:38)
> > at
> >
> java.base/sun.nio.fs.WindowsFileSystemProvider.readAttributes(WindowsFileSystemProvider.java:194)
> > at java.base/java.nio.file.Files.readAttributes(Files.java:1763)
> > at java.base/java.util.zip.ZipFile$Source.get(ZipFile.java:1222)
> > at
> >
> java.base/java.util.zip.ZipFile$CleanableResource.(ZipFile.java:824)
> > at
> >
> java.base/java.util.zip.ZipFile$CleanableResource$FinalizableResource.(ZipFile.java:850)
> > at
> > java.base/java.util.zip.ZipFile$CleanableResource.get(ZipFile.java:839)
> > at java.base/java.util.zip.ZipFile.(ZipFile.java:246)
> > at java.base/java.util.zip.ZipFile.(ZipFile.java:176)
> > at java.base/java.util.jar.JarFile.(JarFile.java:346)
> > at
> > java.base/sun.net.www.protocol.jar.URLJarFile.(URLJarFile.java:103)
> > at
> >
> java.base/sun.net.www.protocol.jar.URLJarFile.getJarFile(URLJarFile.java:72)
> > at
> >
> java.base/sun.net.www.protocol.jar.JarFileFactory.get(JarFileFactory.java:109)
> > at
> >
> java.base/sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:125)
> > at
> >
> java.base/sun.net.www.protocol.jar.JarURLConnection.getJarFile(JarURLConnection.java:92)
> > at org.apache.tomcat.util.scan.FileUrlJar.(FileUrlJar.java:48)
> > at
> > org.apache.tomcat.util.scan.JarFactory.newInstance(JarFactory.java:34)
> > at
> >
> org.apache.catalina.startup.ContextConfig.processAnnotationsJar(ContextConfig.java:1957)
> > at
> >
> org.apache.catalina.startup.ContextConfig.processAnnotationsUrl(ContextConfig.java:1932)
> > at
> >
> org.apache.catalina.startup.ContextConfig.processAnnotations(ContextConfig.java:1917)
> > at
> >
> org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1322)
> > at
> >
> org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:878)
> > at
> >
> org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:388)
> > at
> >
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
> > at
> >
> org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
> > at
> >
> org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5566)
> > at
> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
> > at
> >
> org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1707)
> > at
> >
> org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1697)
> > at java.base/java.util.concurrent.FutureTask.run(FutureTask.

TOMCAT 7.0.92 with JDK 11 :- ERROR localhost-startStop-1 org.apache.catalina.startup.ContextConfig - Unable to process Jar tools.jar for annotations

2019-01-09 Thread Ravi Kumar
 Dear Team,

We have a web application running on Tomcat server container. Web
application is compiled and using JDK 11 as runtime JRE for execution
purpose.

Tomcat Version : - 7.0.92
JDK Version :-  11

Problem Description :-
1.We are seeing the errors in tomcat log regarding jar scanning at time of
Tomcat server startup.
2. Once Tomcat server is getting launched through our web application, it
searches the Tools.jar for annotations purpose.
3. As we all know, JDK 11 has stopped shipping / bundling JRE which
contains the tools.jar,
 Tomcat server reports an error which is following :--

*ERROR localhost-startStop-1 org.apache.catalina.startup.ContextConfig -
Unable to process Jar [jar:file:/ C:/JDK11/lib/tools.jar!/] for annotations*
 java.nio.file.NoSuchFileException: C:\JDK11\lib\tools.jar
at
java.base/sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:85)
at
java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103)
at
java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:108)
at
java.base/sun.nio.fs.WindowsFileAttributeViews$Basic.readAttributes(WindowsFileAttributeViews.java:53)
at
java.base/sun.nio.fs.WindowsFileAttributeViews$Basic.readAttributes(WindowsFileAttributeViews.java:38)
at
java.base/sun.nio.fs.WindowsFileSystemProvider.readAttributes(WindowsFileSystemProvider.java:194)
at java.base/java.nio.file.Files.readAttributes(Files.java:1763)
at java.base/java.util.zip.ZipFile$Source.get(ZipFile.java:1222)
at
java.base/java.util.zip.ZipFile$CleanableResource.(ZipFile.java:824)
at
java.base/java.util.zip.ZipFile$CleanableResource$FinalizableResource.(ZipFile.java:850)
at
java.base/java.util.zip.ZipFile$CleanableResource.get(ZipFile.java:839)
at java.base/java.util.zip.ZipFile.(ZipFile.java:246)
at java.base/java.util.zip.ZipFile.(ZipFile.java:176)
at java.base/java.util.jar.JarFile.(JarFile.java:346)
at
java.base/sun.net.www.protocol.jar.URLJarFile.(URLJarFile.java:103)
at
java.base/sun.net.www.protocol.jar.URLJarFile.getJarFile(URLJarFile.java:72)
at
java.base/sun.net.www.protocol.jar.JarFileFactory.get(JarFileFactory.java:109)
at
java.base/sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:125)
at
java.base/sun.net.www.protocol.jar.JarURLConnection.getJarFile(JarURLConnection.java:92)
at org.apache.tomcat.util.scan.FileUrlJar.(FileUrlJar.java:48)
at
org.apache.tomcat.util.scan.JarFactory.newInstance(JarFactory.java:34)
at
org.apache.catalina.startup.ContextConfig.processAnnotationsJar(ContextConfig.java:1957)
at
org.apache.catalina.startup.ContextConfig.processAnnotationsUrl(ContextConfig.java:1932)
at
org.apache.catalina.startup.ContextConfig.processAnnotations(ContextConfig.java:1917)
at
org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1322)
at
org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:878)
at
org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:388)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5566)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1707)
at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1697)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)


 Resolution / workaround applied :-  Post extensive search on Google and
other community like STACKExchange,
 We found
that a property is suggested to be applied in the catalina.properties file
which would
help
avoiding the scanning of all the jars.

*org.apache.catalina.startup.**ContextConfig.jarsToSkip=*.jar*
   We have this
property already in place and even this has not helped resolving this issue.


Therefore, we request you to kindly provide some insight / working
resolution of this issue. Please revert in case any more info is required.

Appreciate your co-operation !

Thanks,
Ravi


Re: [OT] AW: Re: AW: RE: Re: AW: RE: Error instantiating servlet class

2007-02-15 Thread ravi kumar

thankyou
Even i have these problem in my project..
These conservation help me to troubleshot the 
problem...
Thanks a lot once again

[EMAIL PROTECTED] wrote:
 
 Thanks. It is working now.
 
 Ursprüngliche Nachricht
 Von: [EMAIL PROTECTED]
 Datum: 12.02.2007 11:33
 An: Tomcat Users Listusers@tomcat.apache.org
 Betreff: Re: AW: RE: Re: AW: RE: Error instantiating servlet class
 
 This is same error as before, only the class is different, as long 
 as
 you get those errors, just put the libraries you require inside 
 your
 WEB-INF/lib folder.
 
 En l'instant précis du 02/12/07 11:28, [EMAIL PROTECTED]
 s'exprimait en ces termes:
 Thanks.

 It seems that things have moved on, but I get another error now:

 exception 

 javax.servlet.ServletException: Error instantiating servlet 
 class 
 servlet.CallService
  org.apache.catalina.valves.ErrorReportValve.invoke
 (ErrorReportValve.java:105)
  org.apache.catalina.connector.CoyoteAdapter.service
 (CoyoteAdapter.
 java:148)
  org.apache.coyote.http11.Http11Processor.process
 (Http11Processor.
 java:869)
  org.apache.coyote.http11.
 Http11BaseProtocol$Http11ConnectionHandler.processConnection
 (Http11BaseProtocol.java:664)
  org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket
 (PoolTcpEndpoint.java:527)
  org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt
 (LeaderFollowerWorkerThread.java:80)
  org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run
 (ThreadPool.java:684)
  java.lang.Thread.run(Thread.java:595)


 root cause 

 java.lang.NoClassDefFoundError: org/apache/axis/client/Service
  java.lang.ClassLoader.defineClass1(Native Method)
  java.lang.ClassLoader.defineClass(ClassLoader.java:620)
  java.security.SecureClassLoader.defineClass(SecureClassLoader.
 java:
 124)
  org.apache.catalina.loader.WebappClassLoader.findClassInternal
 (WebappClassLoader.java:1815)
  org.apache.catalina.loader.WebappClassLoader.findClass
 (WebappClassLoader.java:869)
  org.apache.catalina.loader.WebappClassLoader.loadClass
 (WebappClassLoader.java:1322)
  org.apache.catalina.loader.WebappClassLoader.loadClass
 (WebappClassLoader.java:1201)
  java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
  java.lang.Class.getDeclaredConstructors0(Native Method)
  java.lang.Class.privateGetDeclaredConstructors(Class.java:2357)
  java.lang.Class.getConstructor0(Class.java:2671)
  java.lang.Class.newInstance0(Class.java:321)
  java.lang.Class.newInstance(Class.java:303)
  org.apache.catalina.valves.ErrorReportValve.invoke
 (ErrorReportValve.java:105)
  org.apache.catalina.connector.CoyoteAdapter.service
 (CoyoteAdapter.
 java:148)
  org.apache.coyote.http11.Http11Processor.process
 (Http11Processor.
 java:869)
  org.apache.coyote.http11.
 Http11BaseProtocol$Http11ConnectionHandler.processConnection
 (Http11BaseProtocol.java:664)
  org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket
 (PoolTcpEndpoint.java:527)
  org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt
 (LeaderFollowerWorkerThread.java:80)
  org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run
 (ThreadPool.java:684)
  java.lang.Thread.run(Thread.java:595)


 My servlet is using a web service. The client classes of the 
 web 
 service are put in 
 C:\tomcat\webapps\StandardCategoryModule\WEB-INF\classes\org 
 and 
 the web service itself is put in C:\Axis\webapps\axis\WEB-
 INF\classes\org.

 I have built a web service and web service client in eclipse and 
 I 
 have managed to invoke the web service with that command line 
 cleint. 
 Now I am trying to crate a form that  invokes a servlet that uses 
 the 
 client classes to invoke the web service.

 Thanks

 Regards,
 Magdalena

 Ursprüngliche Nachricht
 Von: [EMAIL PROTECTED]
 Datum: 12.02.2007 11:11
 An: Tomcat Users Listusers@tomcat.apache.org, 
 [EMAIL PROTECTED]
 Betreff: RE: Re: AW: RE: Error instantiating servlet class

 in your distribution, put the jar here 

 C:\tomcat\webapps\StandardCategoryModule\WEB-INF\lib\jaxrpc.jar 

 -Message d'origine-
 De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Envoyé : lundi 12 février 2007 11:00
 À : users@tomcat.apache.org
 Objet : AW: Re: AW: RE: Error instantiating servlet class


 I have set up the classpath environmantal variable to include 
 the 
 path to jaxrpc.jar

 Thanks

 Magdalena
 Ursprüngliche Nachricht
 Von: [EMAIL PROTECTED]
 Datum: 12.02.2007 10:51
 An: Tomcat Users Listusers@tomcat.apache.org
 Betreff: Re: AW: RE: Error instantiating servlet class

 Where did you put it?
 En l'instant précis du 02/12/07 10:27, [EMAIL PROTECTED]
 s'exprimait en ces termes:
   
 Thanks. I have already put in the classpath the path to jaxrpc.
 
 jar. I 
   
 presume this is the one, but it still doesn't work.

 Regards,
 Magdalena
 Ursprüngliche Nachricht
 Von: [EMAIL PROTECTED]
 Datum: 12.02.2007 10:20
 An: Tomcat Users