RE: [org.apache.jasper.JasperException: Unable to compile class for JSP] with root cause

2023-04-03 Thread Kesavan, Suresh Prabhu (Fed)
Hi Mark,

Thanks, can you tell me how to enable all security in tomcat Catalina.policy.

Thanks,

Suresh Kesavan
OISM/ASD
National Institute of Standards and Technology
Office:- 301-975-6973

-Original Message-
From: Mark Thomas  
Sent: Wednesday, March 29, 2023 8:37 PM
To: users@tomcat.apache.org
Subject: Re: [org.apache.jasper.JasperException: Unable to compile class for 
JSP] with root cause

Hi,

I am unable to reproduce this with a clean build of the current 9.0.x source.

I built the sample application without configuring the connection to Azure.

Once deployed, it failed with a security permissions error. This has fixed by 
adding the following to the web application permissions:

permission java.util.PropertyPermission 
"com.ctc.wstx.returnNullForDefaultNamespace", "read";

No other changes were made compared to the default.

The index page then showed correctly.

Mark



On 27/03/2023 16:47, Kesavan, Suresh Prabhu (Fed) wrote:
> Hi Mark,
> 
> Sure, below is the policy file
> 
> */_catalina.policy_/*
> 
> // Licensed to the Apache Software Foundation (ASF) under one or more 
> // contributor license agreements.  See the NOTICE file distributed 
> with // this work for additional information regarding copyright ownership.
> // The ASF licenses this file to You under the Apache License, Version 
> 2.0 // (the "License"); you may not use this file except in compliance 
> with // the License.  You may obtain a copy of the License at //
> // 
> https://gcc02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.apache.org%2Flicenses%2FLICENSE-2.0=05%7C01%7Csureshprabhu.kesavan%40nist.gov%7C0fae3558eb82448fe0f408db30b6dbe9%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C638157334161987625%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C=1MXkLyzwJ0d9CWADPfIAjbvaGHlX2whCFY7iPYR3sdM%3D=0
> //
> // Unless required by applicable law or agreed to in writing, software 
> // distributed under the License is distributed on an "AS IS" BASIS, 
> // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
> // See the License for the specific language governing permissions and 
> // limitations under the License.
> 
> // 
> ==
> == // catalina.policy - Security Policy Permissions for Tomcat // 
> // This file contains a default set of security policies to be 
> enforced (by the // JVM) when Catalina is executed with the 
> "-security" option.  In addition // to the permissions granted here, 
> the following additional permissions are // granted to each web application:
> //
> // * Read access to the web application's document root directory // * 
> Read, write and delete access to the web application's working 
> directory // 
> ==
> ==
> 
> 
> // == SYSTEM CODE PERMISSIONS 
> =
> 
> 
> // These permissions apply to javac
> grant codeBase "file:${java.home}/lib/-" {
>  permission java.security.AllPermission; };
> 
> // These permissions apply to all shared system extensions grant 
> codeBase "file:${java.home}/jre/lib/ext/-" {
>  permission java.security.AllPermission; };
> 
> // These permissions apply to javac when ${java.home} points at 
> $JAVA_HOME/jre grant codeBase "file:${java.home}/../lib/-" {
>  permission java.security.AllPermission; };
> 
> // These permissions apply to all shared system extensions when // 
> ${java.home} points at $JAVA_HOME/jre grant codeBase 
> "file:${java.home}/lib/ext/-" {
>  permission java.security.AllPermission; };
> 
> // This permission is required when using javac to compile JSPs on 
> Java 9 // onwards grant codeBase "jrt:/jdk.compiler" {
>  permission java.security.AllPermission; };
> 
> 
> // == CATALINA CODE PERMISSIONS 
> ===
> 
> // These permissions apply to the daemon code
> grant codeBase "file:${catalina.home}/bin/commons-daemon.jar" {
>  permission java.security.AllPermission;
> };
> 
> // These permissions apply to the logging API
> // Note: If tomcat-juli.jar is in ${catalina.base} and not in 
> ${catalina.home},
> // update this section accordingly.
> //  grant codeBase "file:${catalina.base}/bin/tomcat-juli.jar" {..}
> grant codeBase "file:${catalina.home}/bin/tomcat-juli.jar" {
>  permission java.io.FilePermission
>   
> "${java.home}${file.separator}lib${file.separator}logging.properties", "read"

RE: [org.apache.jasper.JasperException: Unable to compile class for JSP] with root cause

2023-03-27 Thread Kesavan, Suresh Prabhu (Fed)
- default CATALINA_HOME == CATALINA_BASE
// - CATALINA_HOME != CATALINA_BASE, per instance Manager in CATALINA_BASE
// - CATALINA_HOME != CATALINA_BASE, shared Manager in CATALINA_HOME
grant codeBase "file:${catalina.base}/webapps/manager/-" {
permission java.lang.RuntimePermission 
"accessClassInPackage.org.apache.catalina";
permission java.lang.RuntimePermission 
"accessClassInPackage.org.apache.catalina.ha.session";
permission java.lang.RuntimePermission 
"accessClassInPackage.org.apache.catalina.manager";
permission java.lang.RuntimePermission 
"accessClassInPackage.org.apache.catalina.manager.util";
permission java.lang.RuntimePermission 
"accessClassInPackage.org.apache.catalina.util";
permission org.apache.catalina.security.DeployXmlPermission "manager";
};
grant codeBase "file:${catalina.home}/webapps/manager/-" {
permission java.lang.RuntimePermission 
"accessClassInPackage.org.apache.catalina";
permission java.lang.RuntimePermission 
"accessClassInPackage.org.apache.catalina.ha.session";
permission java.lang.RuntimePermission 
"accessClassInPackage.org.apache.catalina.manager";
permission java.lang.RuntimePermission 
"accessClassInPackage.org.apache.catalina.manager.util";
permission java.lang.RuntimePermission 
"accessClassInPackage.org.apache.catalina.util";
permission org.apache.catalina.security.DeployXmlPermission "manager";
};

grant codeBase "file:${catalina.base}/webapps/msal4j-servlet-auth/-"{
permission java.security.AllPermission;
//  permission java.lang.RuntimePermission "getClassLoader";
//  permission java.lang.RuntimePermission 
"accessClassInPackage.sun.net.www.protocol.*";
 permission java.io.FilePermission "<>", "read, write, delete";
 permission java.util.PropertyPermission "java.io.tmpdir", "readi, write";
};




// The Host Manager application needs the custom Tomcat DeployXmlPermission to
// enable the use of META-INF/context.xml
// These settings support the following configurations:
// - default CATALINA_HOME == CATALINA_BASE
// - CATALINA_HOME != CATALINA_BASE, per instance Host Manager in CATALINA_BASE
// - CATALINA_HOME != CATALINA_BASE, shared Host Manager in CATALINA_HOME
grant codeBase "file:${catalina.base}/webapps/host-manager/-" {
permission org.apache.catalina.security.DeployXmlPermission "host-manager";
};
grant codeBase "file:${catalina.home}/webapps/host-manager/-" {
permission org.apache.catalina.security.DeployXmlPermission "host-manager";
};


// You can assign additional permissions to particular web applications by
// adding additional "grant" entries here, based on the code base for that
// application, /WEB-INF/classes/, or /WEB-INF/lib/ jar files.
//
// Different permissions can be granted to JSP pages, classes loaded from
// the /WEB-INF/classes/ directory, all jar files in the /WEB-INF/lib/
// directory, or even to individual jar files in the /WEB-INF/lib/ directory.
//
// For instance, assume that the standard "examples" application
// included a JDBC driver that needed to establish a network connection to the
// corresponding database and used the scrape taglib to get the weather from
// the NOAA web server.  You might create a "grant" entries like this:
//
// The permissions granted to the context root directory apply to JSP pages.
// grant codeBase "file:${catalina.base}/webapps/examples/-" {
//  permission java.net.SocketPermission "dbhost.mycompany.com:5432", 
"connect";
//  permission java.net.SocketPermission "*.noaa.gov:80", "connect";
// };
//
// The permissions granted to the context WEB-INF/classes directory
// grant codeBase "file:${catalina.base}/webapps/examples/WEB-INF/classes/-" {
// };
//
// The permission granted to your JDBC driver
// grant codeBase 
"jar:file:${catalina.base}/webapps/examples/WEB-INF/lib/driver.jar!/-" {
//  permission java.net.SocketPermission "dbhost.mycompany.com:5432", 
"connect";
// };
// The permission granted to the scrape taglib
// grant codeBase 
"jar:file:${catalina.base}/webapps/examples/WEB-INF/lib/scrape.jar!/-" {
//  permission java.net.SocketPermission "*.noaa.gov:80", "connect";
// };

// To grant permissions for web applications using packed WAR files, use the
// Tomcat specific WAR url scheme.
//
// The permissions granted to the entire web application
// grant codeBase "war:file:${catalina.base}/webapps/examples.war*/-" {
// };
//
// The permissions granted to a specific JAR
// grant codeBase 
"war:file:${catalina.base}/webapps/examples.war*/WEB-INF/lib/foo.jar" {
// };

Thanks,

Suresh Kesavan
OISM/ASD
National

[org.apache.jasper.JasperException: Unable to compile class for JSP] with root cause

2023-03-27 Thread Kesavan, Suresh Prabhu (Fed)
curity.SecurityUtil.lambda$execute$0(SecurityUtil.java:280)
at 
java.base/java.security.AccessController.doPrivileged(AccessController.java:712)
at 
java.base/javax.security.auth.Subject.doAsPrivileged(Subject.java:584)
at 
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:311)
at 
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:253)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:187)
at 
org.apache.catalina.core.ApplicationFilterChain.lambda$doFilter$0(ApplicationFilterChain.java:145)
at 
java.base/java.security.AccessController.doPrivileged(AccessController.java:569)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:143)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)
at 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
at 
org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:687)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)
at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:360)
at 
org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)
at 
org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63)
at 
org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:926)
at 
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1791)
at 
org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at 
org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
at 
org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
at 
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.base/java.lang.Thread.run(Thread.java:833)
[tomcat@c793762ed6ee logs]$


Thanks,

Suresh Kesavan
OISM/ASD
National Institute of Standards and Technology
Office:- 301-975-6973

From: Kesavan, Suresh Prabhu (Fed)
Sent: Friday, March 24, 2023 9:50 AM
To: users-i...@tomcat.apache.org; users-...@tomcat.apache.org
Subject: [org.apache.jasper.JasperException: Unable to compile class for JSP] 
with root cause


Thanks,

Suresh Kesavan
OISM/ASD
National Institute of Standards and Technology
Office:- 301-975-6973


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

Re: java.lang.OutOfMemoryError: PermGen space when we redeploy same application multiple times

2020-10-12 Thread Prabhu Gurunathan
Thanks Manuel Dominguez

On Mon, Oct 12, 2020 at 5:51 PM Manuel Dominguez Sarmiento
 wrote:
>
> The articles in this page will be helpful:
> https://java.jiderhamn.se/category/classloader-leaks/
>
> On 12/10/2020 04:19, Mark Thomas wrote:
> > On 11/10/2020 02:39, Prabhu Gurunathan wrote:
> >> Hi All,
> >>
> >> We have an setup where we are using OpenJDK 1.7 and Tomcat 7.0.100 ,
> >> in CentOs 7 Env . and we have many application deployed in
> >> Tomcat/webapps and the common lib's needed for those apps are kept in
> >> Tomcat/lib directory like log4j , commons-fileupload  ,xerces , Xalan
> >> .. etc
> >>
> >> The problem here is When we try to undeploy and deploy same
> >> applications multiple time we are  getting into
> >> java.lang.OutOfMemoryError: PermGen space very quickly . Want to know
> >> is it very generic problem on this deployment model or is this can be
> >> fixed anyway ?
> > The memory leak could be in any of:
> > - the application code
> > - a library the application depends on
> > - the JVM
> > - Tomcat
> >
> > In all cases, it should be possible to fix it. There might even be a
> > short-term workaround available.
> >
> > First of all, make sure that the JreMemoryLeakPreventionListener is
> > enabled in your configuration.
> >
> > Secondly, make sure that you don't get any warnings about possible
> > memory leaks in the logs when you reload an application. If you do, fix
> > the leaks identified.
> >
> > If you still see issues, the short version is:
> > - user a profiler
> > - reload each app in turn until you see more strong references to
> >org.apache.catalina.loader.[Parallel]WebappClassLoader instances in
> >memory than you have web applications
> > - find the one where started = false
> > - trace its GC roots
> > - that will tell you where the memory leak is
> > - how it was created might be harder to track down
> >
> > The long version is in a presentation linked from the Tomcat web site:
> > https://home.apache.org/~markt/presentations/2010-08-05-Memory-Leaks-JavaOne-60mins.pdf
> >
> > If you have any questions, you can ask here.
> >
> > Mark
> >
> > -
> > 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: java.lang.OutOfMemoryError: PermGen space when we redeploy same application multiple times

2020-10-12 Thread Prabhu Gurunathan
Thanks Mark , for your thoughts , will explore more and get back .

On Mon, Oct 12, 2020 at 12:49 PM Mark Thomas  wrote:
>
> On 11/10/2020 02:39, Prabhu Gurunathan wrote:
> > Hi All,
> >
> > We have an setup where we are using OpenJDK 1.7 and Tomcat 7.0.100 ,
> > in CentOs 7 Env . and we have many application deployed in
> > Tomcat/webapps and the common lib's needed for those apps are kept in
> > Tomcat/lib directory like log4j , commons-fileupload  ,xerces , Xalan
> > .. etc
> >
> > The problem here is When we try to undeploy and deploy same
> > applications multiple time we are  getting into
> > java.lang.OutOfMemoryError: PermGen space very quickly . Want to know
> > is it very generic problem on this deployment model or is this can be
> > fixed anyway ?
>
> The memory leak could be in any of:
> - the application code
> - a library the application depends on
> - the JVM
> - Tomcat
>
> In all cases, it should be possible to fix it. There might even be a
> short-term workaround available.
>
> First of all, make sure that the JreMemoryLeakPreventionListener is
> enabled in your configuration.
>
> Secondly, make sure that you don't get any warnings about possible
> memory leaks in the logs when you reload an application. If you do, fix
> the leaks identified.
>
> If you still see issues, the short version is:
> - user a profiler
> - reload each app in turn until you see more strong references to
>   org.apache.catalina.loader.[Parallel]WebappClassLoader instances in
>   memory than you have web applications
> - find the one where started = false
> - trace its GC roots
> - that will tell you where the memory leak is
> - how it was created might be harder to track down
>
> The long version is in a presentation linked from the Tomcat web site:
> https://home.apache.org/~markt/presentations/2010-08-05-Memory-Leaks-JavaOne-60mins.pdf
>
> If you have any questions, you can ask here.
>
> Mark
>
> -
> 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



java.lang.OutOfMemoryError: PermGen space when we redeploy same application multiple times

2020-10-10 Thread Prabhu Gurunathan
Hi All,



We have an setup where we are using OpenJDK 1.7 and Tomcat 7.0.100 ,
in CentOs 7 Env . and we have many application deployed in
Tomcat/webapps and the common lib's needed for those apps are kept in
Tomcat/lib directory like log4j , commons-fileupload  ,xerces , Xalan
.. etc



The problem here is When we try to undeploy and deploy same
applications multiple time we are  getting into
java.lang.OutOfMemoryError: PermGen space very quickly . Want to know
is it very generic problem on this deployment model or is this can be
fixed anyway ?





Thanks ,

Prabhu G

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



RE: Too Many Connections exceptions after moving to Tomcat 8

2015-07-29 Thread Prabhu Mannu
Hi jerry ,

It's probably issue with the application itself,
You might want to check your application for connections leaks.
I usually use this https://github.com/javamelody/javamelody/wiki 
To monitor the application in both production and test environment.
It's easy to use and very efficient tool.
Hope it helps.

With regards
Prabhu 


-Original Message-
From: Jerry Malcolm [mailto:techst...@malcolms.com] 
Sent: Wednesday, 29 July, 2015 1:39 PM
To: Tomcat Users List users@tomcat.apache.org
Subject: Too Many Connections exceptions after moving to Tomcat 8

I am trying to move my client to Tomcat 8 from 7.  We've been on 7 for a year 
or two and have not had any major issues.  I read through the 7--8 migration 
instructions.  As far as I can tell, I have renamed all of the resource config 
parameters that changed (maxTotal, maxWaitMillis, removedAbandonedOnBorrow).  
But after running for a couple of hours, I start getting Too Many Connections 
exceptions when connecting to the db.  Granted, there's a chance I have some 
connection leaks in the code, and I'll look into those.  But this hasn't been 
an issue on 7 for the past year or two.  And shouldn't removeAbandoned clean 
those up?  I've got logAbandoned set to 'true', and nothing is showing up in 
the logs. 
Is this exception referring to running out of available connections in the pool?

Is there something else I need to change in the configuration to move to Tomcat 
8 that I've overlooked?

Thanks.

Jerry

-
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: Re: how to block the duplicated requests?

2015-05-20 Thread Prabhu Mannu
Hi

What you explaining now and what you explained before are completely
different story. 

Simple and main cause for your issue is inefficiency and poor design. 

why don't you simply count number of users registering on particular ip and
stop at threshold for certain amount of time.
A simple request filter servlet would do the job. 
And maybe you might want to change the CAPTCHA, to a
not_so_obvious_to_figure_out kind

With regards
Prabhu



-Original Message-
From: javalishixml [mailto:javalishi...@163.com] 
Sent: Wednesday, 20 May, 2015 4:22 PM
To: Tomcat Users List
Subject: Re:Re: how to block the duplicated requests?

More detail information as below:


presudo-code step:


1. a register page named http://mywebsite.com/register1.jsp; is set up, and
this page contains a CAPTCHA image 2. the robot(crackers) could successfully
register the thousands different users for this web site during only several
minutes.
3. if it is a human beings, these thousands different users should have
different IPs. But we find  these thousands different users are from same
IPs.
By the way, we get the IP from HttpServletRequest header.
4. later, we setup a new register page. We change its url from
http://mywebsite.com/register1.jsp; to http://mywebsite.com/register2.jsp;
For the first several days, we find everthing is good.
But after several days, we find the robot(crackers) find this new URL and
could successfully register the thousands different users for this web site
during only several minutes.


It's just reproduced steps for our issue.


Our requirements are that:
1. we have a URL for register page. we don't want the thousands different
users with same IP could successfully registered during a very short time
window.
2. We can have a policy to set an interval time window. Based on this
interval time window, the same IP should NOT register users again and again.
3. This policy should manage a group of URLs. We can always add the
different URLs for this policy.  Because based on our maintaining
activities, we may set up many different register page again and again.


Is it a DDOS attack? Is there a good way to resolve it at httpd level?




At 2015-05-19 21:16:29, Christopher Schultz ch...@christopherschultz.net
wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

To whom it may concern,

On 5/19/15 8:09 AM, javalishixml wrote:
 Just understood you. Really appreciate for your feedback.
 
 
 How do we judge it's a robot? item1: we find the request IP is
 always the same one. item2: our page may contains several
 keep-alive connections. But the attack connection only focus on
 connection.

Based upon the first request, how can you tell that the robot is going
to make later keep-alive requests?

 Based on these 2 items, we think the client is a robot.

Can you write some pseudo-code that shows the algorithm in its
simplest form?

 I think maybe putting these 2 items together to consider it as a 
 robot is a bit complex. Let's do it from the simple point.
 
 If we always find there is a same IP request our website the same
 url for many times, can I block this request at httpd level?

This sounds like a job for mod_qos, mod_evasive, or mod_security.

- -chris

 At 2015-05-19 20:01:00, David kerber dcker...@verizon.net
 wrote:
 On 5/19/2015 7:53 AM, javalishixml wrote:
 
 
 
 I doubt you're going to be able to do this in httpd, unless
 you have a very simple, straight forward way of identifying
 the robots.
 Yes. I just want to have a way to block the duplicated requests
 at httpd level. After all, my website has to face the the big
 concurrency issue.
 
 I understand that's what you want.  What we're telling you is
 that you probably won't be able to do that.
 
 Let me ask the question again, that Chris asked before:  how do
 you tell that a given request is from a robot?
 
 The answer to that question will determine if you can block it
 with httpd.
 
 
 
 
 
 
 At 2015-05-19 19:35:26, David kerber dcker...@verizon.net
 wrote:
 On 5/19/2015 1:03 AM, javalishixml wrote:
 Thanks a lot for your information.
 
 
 This solution is based on tomcat level.  If I always handle
 this issue at java level, I'm afraid it has performance
 issue. Because this web site afford a very big concurrency
 access.
 
 
 Taking a consideration on its basic architect
 tomcat+apache, I think the best way to move this solution
 from tomcat to apache. So do you have some good solution at
 apache's configuration?  I understand this is a mail list
 for tomcat.. but just want to get any information
 
 I doubt you're going to be able to do this in httpd, unless
 you have a very simple, straight forward way of identifying
 the robots.
 
 
 
 
 
 Thanks,
 
 
 At 2015-05-19 04:00:28, Christopher Schultz
 ch...@christopherschultz.net wrote:
 To whom it may concern,
 
 On 5/18/15 11:44 AM, javalishixml wrote:
 I have a website. It is built by apache + tomcat.
 
 Now we make a lottery activity at this website. But
 we find that some robots always

Re:Re: how to block the duplicated requests?

2015-05-19 Thread prabhu
LT6MUHOpgmBhsiCUxjJ5odA4Q6mYhMfQxOB+6Ej8jRfKMT2uDTlwvU8gZ+/7TcUX
JXngjQLQyjj+gAO+7jS7sWpaakV1ojy8/nFBVWH/3tWoo0YD89DJCRWxA8x8slfx
oI9BGA0T7EwuX1CnqM90OLw7dymMQvwsTlkPAZnIvnWw3Xz29hIRazxQ7NR3AdCk
vNXsseUzO18IJ4n+By1G
=Q/ki
-END PGP SIGNATURE-

-
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






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






Look into Mod_evasive for httpd
IMHO as suggested earlier you are better off experimenting with 
servlet level


With regards
prabhu



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



RE: Tomcat 7.0.57 - Deployment Issue

2015-05-11 Thread Prabhu Mannu


-Original Message-
From: Kiran Badi [mailto:ki...@poonam.org] 
Sent: Tuesday, 12 May, 2015 10:54 AM
To: Tomcat Users List
Subject: Re: Tomcat 7.0.57 - Deployment Issue

for some reasons it's not going well. Its getting deployed as single app

www.mywebapp1.com\mywebapp2\ rather than 2 seperate sites.

mywebapp1 is deployed as root.war

and I uploaded the webapp2.war in webapps folder and edited server.xml with 
below details,

 Host name=www.webapps2.com appBase=/home/myhostid/tomcat/webapps
  Aliaswww.webapps2.com/Alias
  Aliasmyhostid.myhost.myhostserver.com/Alias
  Context path=/manager debug=0 privileged=true
docBase=/home/myhostid/tomcat/webapps/webapps2
   Valve className=org.apache.catalina.valves.AccessLogValve
directory=logs
   prefix=webapps2_access_log. suffix=.txt
   pattern=%h %l %u %t quot;%rquot; %s %b /
   /Context
   /Host

I did not touch webapp1 app since its deployed as root.war and its working 
fine..

One more thing, do need have one more connector tag as I see these error on 
catalina logs

May 11, 2015 7:11:51 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler [http-bio-17701] May 11, 2015 7:11:51 PM 
org.apache.coyote.AbstractProtocol init
SEVERE: Failed to initialize end point associated with ProtocolHandler 
[http-bio-17701]
java.net.BindException: Address already in use null:17701


-
Below is my reply


Hi

It maybe because of the existing default configuration, that is folder 
%TOMCAT_HOME%/webapp may be the default config for www.webapps1.com.
And if you are deploying mywebapp2 under the folder  %TOMCAT_HOME%/webapp/ like 
 %TOMCAT_HOME%/webapp/mywebapp2
it will be accessible from www.mywebapp1.com context

I suggest you rewrite the server.xml by hand from scratch with one vhost config 
for each domain and different root context.

*it help you get better solution if you actually post the server.xml with 
unnecessary contents stripped out

With regards
Prabhu 




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



Re: Tomcat 7.0.57 - Deployment Issue

2015-05-08 Thread prabhu





On Friday 08/05/2015 at 16:26, Mark Thomas  wrote:

Wearing my list moderator, Tomcat PMC member and ASF member hats.

Let me make something perfectly clear. There is no place *at all* at 
the

ASF for views like those expressed by orn amental.

I would draw people's attention to the ASF code of conduct [1] that 
I'd

encourage you to read if you have not already done so.

Hassan, I'm sorry that you were the target of this message and I hope
that it does not discourage you from continuing your valued
participation here.

Wearing my infrastructure hat I'll see what can be done about removing
orn amental from our communities but the reality is that the open
nature of our communities makes it pretty much impossible to enforce
such a ban on anything like a permanent basis.

Mark


[1] http://www.apache.org/foundation/policies/conduct.html

On 08/05/2015 08:10, orn amental wrote:


to
Hassan Schroeder


snip contents=offensive material /




On 5/8/15, Hassan Schroeder hassan.schroe...@gmail.com wrote:


On Thu, May 7, 2015 at 7:24 PM, Kiran Badi ki...@poonam.org wrote:



http://www.webapp1.com

Now I have another webapp2. which I need to deploy it to same tomcat 
and

access it as

http://www.webapp2.com

How do I do this ? Appreciate some direction on this please


The docs are probably a good place to start:

http://tomcat.apache.org/tomcat-7.0-doc/virtual-hosting-howto.html

HTH,
--
Hassan Schroeder  hassan.schroe...@gmail.com
http://about.me/hassanschroeder
twitter: @hassan
Consulting Availability : Silicon Valley or remote

-
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




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



maybe ban words filter may help a little. ?




RE: Help required to calculate Apache Tomcat resource

2015-02-12 Thread Prabhu Mannu
Answers below

-Original Message-
From: David kerber [mailto:dcker...@verizon.net] 
Sent: Thursday, 12 February, 2015 9:42 PM
To: Tomcat Users List
Subject: Re: Help required to calculate Apache Tomcat resource


...



 Hi Mark,

 Thanks for your reply. By miss I sent the first e-mail in HTML format
which could be rejected as described in Apache Tomcat mailing list help so I
send the second e-mail in plain text format. I will keep your advice in
mind.

 Yes. I completely agree with you that we need to do some testing to
identify the required resources to support and fulfill user expectation and
also this vary from application to application but is there any default
calculation present with tomcat? Like, to process output of 1 'X' KB(total
response page size)request 1 thread require 'Y' MB of RAM with 'A' core
'Z.ZZ' Ghz processor. Practically this may differ but if we get theoretical
help on this, then before going any testing we may justify some resource
requirement to client.

I'm not Mark, but the answer is, as he said, totally dependent on your
application.

I maintain two different TC applications.  One of them returns a single
~1kB page to the user, but uses many megabytes of memory to process the data
it needs to make the page, plus heavy database access.  It has a few dozen
users connecting once per day.

The other one has ~3000 simultaneous users performing a total of ~15M
transactions per day around the clock.  But the transactions are extremely
simple, needing only a few dozen lines of code to process.

The first app above needs much more memory to do its thing, but only a
couple of cores and a handful of threads.  The 2nd app needs hardly any
memory, but lots of threads and cores.

Put a profiler on your app and see what resource it is running out of
first, and correct that before you start experimenting.  TC's default
settings have been vetted over many years to be reasonable choices for many
applications, so don't go changing them unless you have a reason to.


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

--

Hi Paul,

You can use some monitoring tools like java melody, which I use in all my
applications and works wonderfully, needs Very little configuration [
https://code.google.com/p/javamelody/]
it will help find out what is the bottle neck in your application [memory
leaks, slow queries, etc ], based on it you can adjust the parameters or do
whatever it is necessary. I hope it helps.







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



RE: Tomcat 8 encoding issues: unable to change the default encoding iso-8859-1 to utf-8 in http header

2015-01-23 Thread Prabhu Mannu
Hi all/ Dear André Warnier,

I understand that I cannot ask questions or help without actually telling
what I did so resolve the issue in the first place.

Initially I followed this
http://wiki.apache.org/tomcat/FAQ/CharacterEncoding

I wanted to get the minimal setting which would help, some of the things I
found is that few of the jsp pages itself was encoded differently and not
utf-8 and once I fixed that it do not completely worked. 

After lots of trial and error,  Two  settings which worked for me are by
adding contenttype tag in  jsp page
%@ page contentType=text/html; charset=UTF-8 %
And in server.xml
Connector connectionTimeout=2 port=8089 protocol=HTTP/1.1
redirectPort=8443 URIEncoding=UTF-8 /

Before changes to config
prabhu@dev01 ~
$ curl -I http://localhost:8088//user/index.action
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Set-Cookie: JSESSIONID=5CB483D8DC5F2C574DBDDE1E102763EC; Path=/x/;
HttpOnly
Content-Type: text/html;charset=ISO-8859-1
Content-Length: 3863
Date: Fri, 23 Jan 2015 09:14:43 GMT

After changes to config
prabhu@dev01 ~
$ curl -I http://localhost:8088/  /user/index.action
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Set-Cookie: JSESSIONID=7CBEAE0ACCEB65FAF92CF6D94BF0FEDD; Path=/  /;
HttpOnly
Content-Type: text/html;charset=UTF-8
Content-Length: 3868
Date: Fri, 23 Jan 2015 09:15:12 GMT


With regards
Prabhu 

-Original Message-
From: André Warnier [mailto:a...@ice-sa.com] 
Sent: Friday, 23 January, 2015 4:10 PM
To: Tomcat Users List
Subject: Re: Tomcat 8 encoding issues: unable to change the default encoding
iso-8859-1 to utf-8 in http header

Prabhu Mannu wrote:
 Hi all,
 
 Found the issue it's the jsp page itself that was encoded in 
 iso-8859-1 format.
 Sighs .. I became such a noob.
 Sorry all for the trouble.
 
 With regards
 Prabhu

No problem.
That is one reason why this Tomcat Users list is great and unique on the www
: just the fact of writing to it, describing your issue clearly and
concisely, automatically gives you the solution, without anyone even having
to lift a finger.


 -Original Message-
 From: Prabhu Mannu [mailto:pra...@fernridge.com]
 Sent: Friday, 23 January, 2015 3:21 PM
 To: users@tomcat.apache.org
 Subject: Tomcat 8 encoding issues: unable to change the default 
 encoding
 iso-8859-1 to utf-8 in http header
 
 Hi all,
 
 Firs off Sorry if this question appears too noob.
 
 Currently in my application I get this warning.
 HTML1114: Codepage iso-8859-1 from (HTTP header) overrides conflicting 
 codepage utf-8 from (META tag)
 File: index.action
 
 Application uses struts 2, spring, hibernate, jpa + tiles 3 framework.
 
 The application does have this meta tag in all the jsp files meta 
 charset=utf-8
 
 Tomcat version 8 is used
 Server version:Apache Tomcat/8.0.15
 JVM Version:   1.7.0_51-b13
 JVM Vendor:Oracle Corporation
 
 Also have as java parameters
 -Dfile.encoding=UTF-8 and
 -Djavax.servlet.request.encoding=UTF-8
 
 
 In server.xml
 Connector connectionTimeout=2 port=8089 protocol=HTTP/1.1
 redirectPort=8443 URIEncoding=UTF-8 useBodyEncodingForURI=true 
 /
 
 In web.xml in conf folder
 filter
 filter-namesetCharacterEncodingFilter/filter-name
  
 filter-classorg.apache.catalina.filters.SetCharacterEncodingFilter/
 filter
 -class
 init-param
 param-nameencoding/param-name
 param-valueUTF-8/param-value
 /init-param
 async-supportedtrue/async-supported
 /filter
 filter-mapping
 filter-namesetCharacterEncodingFilter/filter-name
 url-pattern/*/url-pattern
 /filter-mapping
 
 In web.xml of the application
 jsp-config
 jsp-property-group
 url-pattern*.jsp/url-pattern
 page-encodingUTF-8/page-encoding
 trim-directive-whitespacestrue/trim-directive-whitespaces
 /jsp-property-group
 /jsp-config
 
 filter
   filter-namesetCharacterEncodingFilter/filter-name
  
 filter-classorg.apache.catalina.filters.SetCharacterEncodingFilter/
 filter
 -class
   init-param
param-nameencoding/param-name
param-valueUTF-8/param-value
   /init-param
  /filter
 filter-mapping
   filter-namesetCharacterEncodingFilter/filter-name
   url-pattern/*/url-pattern
  /filter-mapping
 
 But I still get this warning
 Codepage iso-8859-1 from (HTTP header) overrides conflicting codepage 
 utf-8 from (META tag)
 
 
 I tried to move/change the order of the filters for setting encoding 
 but doesn't seem to make any difference.
 
 I cannot figure out what is wrong and why the http header is saying
 iso-8859-1 encoding instead of utf-8. I need utf-8 cause this 
 application need to support Japanese language.
 
 I welcome anyone to give me any suggestion/comments/or pointers on 
 what I am doing wrong.
 
 With regards
 Prabhu
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional

RE: Tomcat 8 encoding issues: unable to change the default encoding iso-8859-1 to utf-8 in http header

2015-01-22 Thread Prabhu Mannu
Hi all,

Found the issue it's the jsp page itself that was encoded in iso-8859-1
format.
Sighs .. I became such a noob.
Sorry all for the trouble.

With regards
Prabhu 
-Original Message-
From: Prabhu Mannu [mailto:pra...@fernridge.com] 
Sent: Friday, 23 January, 2015 3:21 PM
To: users@tomcat.apache.org
Subject: Tomcat 8 encoding issues: unable to change the default encoding
iso-8859-1 to utf-8 in http header 

Hi all,

Firs off Sorry if this question appears too noob.

Currently in my application I get this warning.
HTML1114: Codepage iso-8859-1 from (HTTP header) overrides conflicting
codepage utf-8 from (META tag)
File: index.action

Application uses struts 2, spring, hibernate, jpa + tiles 3 framework.

The application does have this meta tag in all the jsp files meta
charset=utf-8

Tomcat version 8 is used
Server version:Apache Tomcat/8.0.15
JVM Version:   1.7.0_51-b13
JVM Vendor:Oracle Corporation

Also have as java parameters
-Dfile.encoding=UTF-8 and
-Djavax.servlet.request.encoding=UTF-8


In server.xml
Connector connectionTimeout=2 port=8089 protocol=HTTP/1.1
redirectPort=8443 URIEncoding=UTF-8 useBodyEncodingForURI=true /

In web.xml in conf folder
filter
filter-namesetCharacterEncodingFilter/filter-name
 
filter-classorg.apache.catalina.filters.SetCharacterEncodingFilter/filter
-class
init-param
param-nameencoding/param-name
param-valueUTF-8/param-value
/init-param
async-supportedtrue/async-supported
/filter
filter-mapping
filter-namesetCharacterEncodingFilter/filter-name
url-pattern/*/url-pattern
/filter-mapping

In web.xml of the application
jsp-config
jsp-property-group
url-pattern*.jsp/url-pattern
page-encodingUTF-8/page-encoding
trim-directive-whitespacestrue/trim-directive-whitespaces
/jsp-property-group
/jsp-config

filter
  filter-namesetCharacterEncodingFilter/filter-name
 
filter-classorg.apache.catalina.filters.SetCharacterEncodingFilter/filter
-class
  init-param
   param-nameencoding/param-name
   param-valueUTF-8/param-value
  /init-param
 /filter
filter-mapping
  filter-namesetCharacterEncodingFilter/filter-name
  url-pattern/*/url-pattern
 /filter-mapping

But I still get this warning
Codepage iso-8859-1 from (HTTP header) overrides conflicting codepage utf-8
from (META tag)


I tried to move/change the order of the filters for setting encoding but
doesn't seem to make any difference.

I cannot figure out what is wrong and why the http header is saying
iso-8859-1 encoding instead of utf-8. I need utf-8 cause this application
need to support Japanese language.

I welcome anyone to give me any suggestion/comments/or pointers on what I am
doing wrong.

With regards
Prabhu 



-
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



Tomcat 8 encoding issues: unable to change the default encoding iso-8859-1 to utf-8 in http header

2015-01-22 Thread Prabhu Mannu
Hi all,

Firs off Sorry if this question appears too noob.

Currently in my application I get this warning.
HTML1114: Codepage iso-8859-1 from (HTTP header) overrides conflicting
codepage utf-8 from (META tag)
File: index.action

Application uses struts 2, spring, hibernate, jpa + tiles 3 framework.

The application does have this meta tag in all the jsp files
meta charset=utf-8

Tomcat version 8 is used
Server version:Apache Tomcat/8.0.15
JVM Version:   1.7.0_51-b13
JVM Vendor:Oracle Corporation

Also have as java parameters
-Dfile.encoding=UTF-8 and
-Djavax.servlet.request.encoding=UTF-8


In server.xml
Connector connectionTimeout=2 port=8089 protocol=HTTP/1.1
redirectPort=8443 URIEncoding=UTF-8 useBodyEncodingForURI=true /

In web.xml in conf folder
filter
filter-namesetCharacterEncodingFilter/filter-name
 
filter-classorg.apache.catalina.filters.SetCharacterEncodingFilter/filter
-class
init-param
param-nameencoding/param-name
param-valueUTF-8/param-value
/init-param
async-supportedtrue/async-supported
/filter
filter-mapping
filter-namesetCharacterEncodingFilter/filter-name
url-pattern/*/url-pattern
/filter-mapping

In web.xml of the application 
jsp-config
jsp-property-group
url-pattern*.jsp/url-pattern
page-encodingUTF-8/page-encoding
trim-directive-whitespacestrue/trim-directive-whitespaces
/jsp-property-group
/jsp-config

filter
  filter-namesetCharacterEncodingFilter/filter-name
 
filter-classorg.apache.catalina.filters.SetCharacterEncodingFilter/filter
-class
  init-param
   param-nameencoding/param-name
   param-valueUTF-8/param-value
  /init-param
 /filter
filter-mapping
  filter-namesetCharacterEncodingFilter/filter-name
  url-pattern/*/url-pattern
 /filter-mapping

But I still get this warning
Codepage iso-8859-1 from (HTTP header) overrides conflicting codepage utf-8
from (META tag)


I tried to move/change the order of the filters for setting encoding but
doesn't seem to make any difference.

I cannot figure out what is wrong and why the http header is saying
iso-8859-1 encoding instead of utf-8. I need utf-8 cause this application
need to support Japanese language.

I welcome anyone to give me any suggestion/comments/or pointers on what I am
doing wrong.

With regards
Prabhu 



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



Using Tomcat manager to deploy application in clustered Tomcat 7.0.42

2014-10-16 Thread Prabhu, Ganesh
Hi,

I have a question about using tomcat manager to deploy applications when tomcat 
nodes are in a clustered environment.

Setup Description

Tomcat Node 1 : Tomcat version 7.0.42; JDK 1.6 update 27 (clustered)
Tomcat Node 2 ; Tomcat version 7.0.42; JDK 6 update 27 (clustered)

I have verified the cluster to be working fine. When I drop a war file into the 
watch directory of one of these nodes, the war is deployed and replicated to 
the other node.

But I want to deploy applications using Tomcat manager programmatically using 
catalina-ant.jar. So I tried deploying war deployment using tomcat manager. 
When I use Tomcat manager to deploy the war file into one of the nodes, the war 
file is successfully deployed to the selected node, but is not replicated to 
the other node. I also don't see any errors in the logs

Is this a bug in Tomcat?
Can't we use tomcat manager when the Tomcat nodes are clustered?
Is there some other way in which I can achieve remote deployment of war files 
programmatically?

Attachment description

1.   Server_node1.xml - sever.xml of Tomcat node 1

2.   Server_node2.xml - sever.xml of Tomcat Node 2

3.   Catalina_node1.log - log from  Tomcat node 1

4.   Catalina_node2.log - log from Tomcat Node 2

5.   Context_node 1.xml - Context.xml from node1

6.   Context_node 2.xml - Context.xml from node 2


Please let me know if any additional information is needed

Thanks  Regards,
Ganesh





?xml version='1.0' encoding='utf-8'?
!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the License); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an AS IS BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
--
!-- The contents of this file will be loaded for each web application --
Context antiJARLocking=true antiResourceLocking=true distributable=true

!-- Default set of monitored resources --
WatchedResourceWEB-INF/web.xml/WatchedResource

!-- Uncomment this to disable session persistence across Tomcat restarts --
!--
Manager pathname= /
--

!-- Uncomment this to enable Comet connection tacking (provides events
 on session expiration as well as webapp lifecycle) --
!--
Valve className=org.apache.catalina.valves.CometConnectionManagerValve /
--

/Context?xml version='1.0' encoding='utf-8'?
!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the License); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an AS IS BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
--
!-- The contents of this file will be loaded for each web application --
Context antiJARLocking=true antiResourceLocking=true distributable=true

!-- Default set of monitored resources --
WatchedResourceWEB-INF/web.xml/WatchedResource

!-- Uncomment this to disable session persistence across Tomcat restarts --
!--
Manager pathname= /
--

!-- Uncomment this to enable Comet connection tacking (provides events
 on session expiration as well as webapp lifecycle) --
!--
Valve className=org.apache.catalina.valves.CometConnectionManagerValve /
--

/Context?xml version='1.0' encoding='utf-8'?
!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the License); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an AS IS BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 

deploy a war file

2008-05-19 Thread ashok prabhu - Sun Microsystems - Bangalore India

Hi folks,

I downloaded a war file. I need to deploy the war file in tomcat. Please 
let me know how do i do it?


Thanks,
~Ashok.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[Fwd: deploy a war file]

2008-05-19 Thread ashok prabhu - Sun Microsystems - Bangalore India

Hi folks,

I downloaded a war file. I need to deploy the war file in tomcat. Please 
let me know how do i do it? I am running Solaris 10.


Thanks,
~Ashok.



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: deploy a war file

2008-05-19 Thread ashok prabhu - Sun Microsystems - Bangalore India

Hi,

I am running solaris 10. Where do I find the webapps directory. Let me 
know the command to restart tomcat.


Thanks,
~Ashok.

Dilip Diascore Kolandairaj wrote:

Just place the war file in tomcat/webapps directory and restart your tomcat.

Note : Please make sure that you are not having the any other application in 
the same name as that of WAR file.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 20, 2008 9:56 AM
To: users@tomcat.apache.org
Subject: deploy a war file

Hi folks,

I downloaded a war file. I need to deploy the war file in tomcat. Please
let me know how do i do it?

Thanks,
~Ashok.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


 CAUTION - Disclaimer *
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely 
for the use of the addressee(s). If you are not the intended recipient, please 
notify the sender by e-mail and delete the original message. Further, you are not 
to copy, disclose, or distribute this e-mail or its contents to any other person and 
any such actions are unlawful. This e-mail may contain viruses. Infosys has taken 
every reasonable precaution to minimize this risk, but is not liable for any damage 
you may sustain as a result of any virus in this e-mail. You should carry out your 
own virus checks before opening the e-mail or attachment. Infosys reserves the 
right to monitor and review the content of all messages sent to or from this e-mail 
address. Messages sent to or from this e-mail address may be stored on the 
Infosys e-mail system.

***INFOSYS End of Disclaimer INFOSYS***
  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Tomcat skips certain exceptions without logging

2007-10-14 Thread Prabhu
I am noticing this weird problem, in which tomcat randomly skips logging 
few exceptions. I am using tomcat 6.0.13.


Can someone help me to resolve this.

Regards,
Prabhu

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



swallowOutput option in tomcat 6

2007-06-14 Thread Prabhu
How to get swallowOutput option working in tomcat 6. I am not able to get  
this from the context documentation.


--
Regards,
Prabhu

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



swallowOutput attribute in tomcat 6

2007-06-12 Thread Prabhu
Do we have this attribute in tomcat 6. I was using tomcat 5 earlier and  
had this entry.


DefaultContext allowLinking=true swallowOutput=true /

Now after upgrading to tomcat 6, this option doesn't seem to work. Also  
the url http://tomcat.apache.org/tomcat-6.0-doc/config/defaultcontext.html  
is non-existent!


Kindly send your reply to [EMAIL PROTECTED]

--
Regards,
Prabhu

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Tomcat 6 clustering question

2007-06-08 Thread Prabhu

We have enabled tomcat 6 clustering with two machines. After doing that we
noticed two things.

1. Tomcat is taking atleast 5 minutes to start. There are only 5 webapps
in total.
2. useDirtyFlag=false in Cluster tag, doesn't seem to work.

I am posting our cluster entry here.

Cluster className=org.apache.catalina.ha.tcp.SimpleTcpCluster
  useDirtyFlag=false
  channelSendOptions=6

   Manager className=org.apache.catalina.ha.session.DeltaManager
expireSessionsOnShutdown=false
notifyListenersOnReplication=true/

   Channel
className=org.apache.catalina.tribes.group.GroupChannel
 Membership
className=org.apache.catalina.tribes.membership.McastService
 address=228.0.0.4
 port=45564
 frequency=500
 ttl=15
 dropTime=3000/
  Sender
className=org.apache.catalina.tribes.transport.ReplicationTransmitter
   Transport
className=org.apache.catalina.tribes.transport.nio.PooledParallelSender/
 /Sender
 Interceptor
className=org.apache.catalina.tribes.group.interceptors.TcpFailureDetector/
 Interceptor
className=org.apache.catalina.tribes.group.interceptors.MessageDispatch15Interceptor/
/Channel

Valve className=org.apache.catalina.ha.session.JvmRouteBinderValve/
   Valve className=org.apache.catalina.ha.tcp.ReplicationValve
  
filter=.*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.html;.*\.css;.*\.txt;/

   Deployer
className=org.apache.catalina.ha.deploy.FarmWarDeployer
 tempDir=/tmp/war-temp/
 deployDir=/tmp/war-deploy/
 watchDir=/tmp/war-listen/
 watchEnabled=false/

   ClusterListener
className=org.apache.catalina.ha.session.JvmRouteSessionIDBinderListener/
   ClusterListener
className=org.apache.catalina.ha.session.ClusterSessionListener/

/Cluster

Any thoughts on this?



--
Regards,
Prabhu

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



SSL fails to work in tomcat 5.5.17

2007-03-01 Thread Sudarshan Prabhu
Hi,

 

I have migrated tomcat from 5.0.28 to 5.5.17 with native dll support, after
the migration SSL certificate in PKCS2 format does not work.  

I observe it is getting redirected to secure port (i can see https in the

URL) but application fails to load. 

 

Tomcat5.5.17 is running with java version 1.5.0_04 on Windows-2003 server 

 

Can somebody help me with this? 

 

Below is server.xml config

 



 

Connector port=443 maxHttpHeaderSize=8192

 

   maxThreads=150 minSpareThreads=25 maxSpareThreads=75

 

   enableLookups=false disableUploadTimeout=true

 

   acceptCount=100 scheme=https secure=true

 

   clientAuth=false sslProtocol=TLS

 

  keystoreType=PKCS12

 

  keystoreFile=E:\Tomcat5.5.17\conf\KEYSTORE.p12 

 

  keystorePass=** /

-

 

Thanks in advance

 

 

 

Regards

Sudarshan

 



apache+ssl with tomcat ..

2006-10-05 Thread Siddesh Prabhu
Hi Gurus...
   
  Can any one tell me how to integrate apache+ssl, with tomcat.
   
  I have apache Apache/2.0.59 (Win32) mod_ssl/2.0.59 OpenSSL/0.9.8b 
mod_jk/1.2.19 .  
   
  http://server_name/jsp-examples is working fine, now i configured apache for 
ssl, https://server_name is working fine. How do i configure apache/ tomcat so 
that i https://server_name/jsp-examples starts working. 
   
  Thanks
  -Sid




-
Do you Yahoo!?
 Everyone is raving about the  all-new Yahoo! Mail.

How to redirect HTTP request to HTTPS on Tomcat

2006-06-09 Thread Siddesh Prabhu

Hi Gurus,
   
  I am using Tomcat 5.0.28, I have configured SSL. Now i want to know whether 
it is possible to redirect http request to https using server.xml file, meaning 
if  i give http://localhost:8080 it should go to https://localhost:8443, I 
googled a lot but did not get a firm solution on this topic.
   
  Any ideas.
  TIA
  -Siddesh



 __
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

settingheap sizes for JVM in tomcat

2006-05-19 Thread Siddesh Prabhu
hi ppl,
   
  Is there any criteria/way  to determine the  suitable heap sizes ( -Xms nad 
-Xmx ) for JVM in tomcat ??
   
  Thanks in advance
Siddesh




-
Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ 
countries) for 2¢/min or less.

RE: Java Question

2006-02-22 Thread Sethuraman, Prabhu \(Cognizant\)

Andrew,

You will be surprised but here is what it is:

JBoss is actually sending the calls made to your production server to
the test server. This is because of the failover mechanism that is
available within JBoss. Your testserver must be in multicast mode. Try
dropping the test server off multicase mode and you might not get to see
the CEOs picture itself :)

No kidding.

We did have the same issue, where a critical transaction in a Production
system was trying to get data from an EJB which was running in a test
system.

Prabhu S

-Original Message-
From: Andrew English [mailto:[EMAIL PROTECTED]
Sent: Wednesday, February 22, 2006 9:12 AM
To: Tomcat Users List
Subject: Java Question


Does anyone know of a mailing list were I can ask some java related
questions?

The number one question I have is if it's possible to write code within
Java that changes all your HTML files back to their original default?

A client of mine runs, dare I say it here JBoss 2.4 and I found two
copies of JBoss running, one on their production server, the other on a
Test server. Anyhow I had to go and make changes to the HTML files
within the JBoss, removed the previous CTO's name, fixed spelling
errors, removed some dates, etc.

Anyhow initially without taking the Test server into account when I made
changes to the HTML files, at around 12:38AM the files are modified back
to their original state. So I searched all the servers HIGH and LOW for
these files and only came across the Test server having them too.. So I
put the modified copies on the Test server and the production server
yesterday, now they are back to the original copies again.. BIGH SIGH

I have looked through all the scheduled tasks and not found anything, my
thought is it could be embedded somewhere in the Jave??

Andrew

This e-mail and any files transmitted with it are for the sole use of the 
intended recipient(s) and may contain confidential and privileged information.
If you are not the intended recipient, please contact the sender by reply 
e-mail and destroy all copies of the original message.
Any unauthorized review, use, disclosure, dissemination, forwarding, printing 
or copying of this email or any action taken in reliance on this e-mail is 
strictly
prohibited and may be unlawful.

  Visit us at http://www.cognizant.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: A simple question about creating a thread in Tomcat app

2006-02-22 Thread Sethuraman, Prabhu \(Cognizant\)

Using Servlet Context listener would be the best and simple solution.
THere are articles which describe step by step implementation of the
solution. Let us know if you are not able to locate this.

Prabhu S

-Original Message-
From: Artur Rataj [mailto:[EMAIL PROTECTED]
Sent: Wednesday, February 22, 2006 9:16 AM
To: Tomcat Users List
Subject: A simple question about creating a thread in Tomcat app

Hello!

I would like, just after tomcat starts, to create a new thread. Where
can I put the code that starts it? I do not want to wait with starting
the thread until some servlet is needed.

Best regards,
Artur

This e-mail and any files transmitted with it are for the sole use of the 
intended recipient(s) and may contain confidential and privileged information.
If you are not the intended recipient, please contact the sender by reply 
e-mail and destroy all copies of the original message.
Any unauthorized review, use, disclosure, dissemination, forwarding, printing 
or copying of this email or any action taken in reliance on this e-mail is 
strictly
prohibited and may be unlawful.

  Visit us at http://www.cognizant.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Strange behaviour by Tomcat

2006-01-28 Thread Prabhu
Hi all,

In my Tomcat's server.xml, i have used swallowOutput, like mentioned below.

DefaultContext reloadable=true allowLinking=true swallowOutput=true /

So, all my code's System.out would go to a different file and not
catalina.out. But, if I start a new thread and give System.out, in
that thread, then these messages alone are going to catalina.out.

But i want these ones also in my log file. Kindly suggest some
solution for this.
--
Prabhu
Mobile: (0) 98414 05819

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Catalina.policy to add new file permissions

2005-12-22 Thread Sethuraman, Prabhu \(Cognizant\)

George,

Not sure how complicated your environment is, but why not you try something 
like this (if feasible):

Make a RMI call (or any other J2EE mechanism) to a class sitting in Server B 
which will take care of writing information to a file on Server B.

Let me know if I have assumed something wrong here so that I/else someone can 
help you out.

Thanks,
Prabhu S

-Original Message-
From: George Azzopardi [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 22, 2005 5:18 PM
To: users@tomcat.apache.org
Subject: Catalina.policy to add new file permissions



Hi people,

I have a web application running on Tomcat on Server A. This application
needs to write new files on Server B. However I am getting Access is Denied
exception. Do I need to modify the catalina.policy file to grant new
filepermissions? If yes how can do it? Do you have a small example?

Thanks for your help

Regards,

George Azzopardi


This e-mail and any files transmitted with it are for the sole use of the 
intended recipient(s) and may contain confidential and privileged information.
If you are not the intended recipient, please contact the sender by reply 
e-mail and destroy all copies of the original message.
Any unauthorized review, use, disclosure, dissemination, forwarding, printing 
or copying of this email or any action taken in reliance on this e-mail is 
strictly
prohibited and may be unlawful.

  Visit us at http://www.cognizant.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: How to load a class when tomcat starts

2005-12-11 Thread Sethuraman, Prabhu \(Cognizant\)

Hi Vineesh,

Thats simple. Just check the link below for information on 
ServletContextListener. This is just according to the Servlet spec with tomcat 
its just as easy:

http://java.sun.com/products/servlet/2.3/javadoc/javax/servlet/ServletContextListener.html

Sample code:

ApplicationListener.java

package xxx;

import javax.servlet.ServletContextListener;
import javax.servlet.ServletContextEvent;

public class ApplicationListener implements ServletContextListener {
  public void contextInitialized(ServletContextEvent cse) {
System.out.println(Application initialized);
//call any other class here
  }
  public void contextDestroyed(ServletContextEvent cse) {
System.out.println(Application shut down);
//do any clean up here
  }
}

Add this class to web.xml:

?xml version=1.0 encoding=ISO-8859-1?
!DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 
2.3//EN
http://java.sun.com/dtd/web-app_2_3.dtd;
 web-app
  listener
   listener-classxxx.ApplicationListener/listener-class
  /listener
/web-app

Add the relevant classes to web-inf/classes, start your app and its all done.

Thanks,
Prabhu S

-Original Message-
From: vineesh kumar [mailto:[EMAIL PROTECTED]
Sent: Friday, December 09, 2005 11:07 AM
To: Tomcat Users List; [EMAIL PROTECTED]
Subject: How to load a class when tomcat starts


Hi all,

  I need to load a java class when tomcat starts, which will
initializes some configuration files and so i can use the fields in
the class throught the environment.How can i do this.?
Actually I am working on a distributed application, so the
configuration files may change frequently but once the system is
initialized it will not change until shut down.
regards
 vineesh

This e-mail and any files transmitted with it are for the sole use of the 
intended recipient(s) and may contain confidential and privileged information.
If you are not the intended recipient, please contact the sender by reply 
e-mail and destroy all copies of the original message.
Any unauthorized review, use, disclosure, dissemination, forwarding, printing 
or copying of this email or any action taken in reliance on this e-mail is 
strictly
prohibited and may be unlawful.

  Visit us at http://www.cognizant.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]