Re:Re: how to block the duplicated requests?

2015-05-18 Thread javalishixml
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 be

RE: Tomcat valve JAAS : form error page displayed first before response reaches back to Tomcat valve

2015-05-18 Thread Kim Ming Yap
I think Tomcat should provide interfaces for different scenarios .. that's my opinion. So coming back to my web form-based authentication problem, is there a solution to it? I still want to solve my problem 😏 Please advice.Thanks. > Date: Mon, 18 May 2015 18:01:31 -0400 > From: ch...@christophe

Re: Tomcat valve JAAS : form error page displayed first before response reaches back to Tomcat valve

2015-05-18 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Ming Yap, On 5/18/15 4:56 PM, Kim Ming Yap wrote: > Now here's comes to crucial point and question when comes to JAAS. > > I know the benefit of JAAS - a pluggable authentication and > authorization module. > > Why and in JavaEE's name have a JAA

RE: Tomcat valve JAAS : form error page displayed first before response reaches back to Tomcat valve

2015-05-18 Thread Kim Ming Yap
ok. cool :) i understand better. Now here's comes to crucial point and question when comes to JAAS. I know the benefit of JAAS - a pluggable authentication and authorization module. Why and in JavaEE's name have a JAAS realm (eg in Tomcat) where the loginmodule has no access to those most importa

RE: Problem with APR library - Tomcat 7

2015-05-18 Thread Dejan Stamenov
Chris, I am sure I need the APR connector as I need to specify my server certificate, my private key and also a chain of other certificates that signed my server certificate. I haven't found any other connecter that can do this except APR, or I have missed something? -Original Message-

Re: Problem with APR library - Tomcat 7

2015-05-18 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Dejan, On 5/18/15 3:53 PM, Dejan Stamenov wrote: > The error below the warning message is saying that the APR library > is missing from my server. Okay. > That's why I am sure I need the APR library for Tomcat 7. Well, you can use a different ty

Re: Tomcat valve JAAS : form error page displayed first before response reaches back to Tomcat valve

2015-05-18 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Ming Yap, On 5/18/15 11:43 AM, Kim Ming Yap wrote: > so who control the data flow? The data is really just a data stream. Anyone dumping data into that stream "controls the flow". Any component with access to the OutputStream to the client can inje

Re: how to block the duplicated requests?

2015-05-18 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 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 raise the duplicated requests to hit this

RE: Problem with APR library - Tomcat 7

2015-05-18 Thread Dejan Stamenov
Hello Chris, The error below the warning message is saying that the APR library is missing from my server. That's why I am sure I need the APR library for Tomcat 7. I have seen Mark message, but had some work and didn't tried it today. Till tomorrow, I will give you answer if that was the case

Re: Tomcat connector: mod_jk 1.2.40 in 32 bit for OS - Linux 2.6.39-400.21.1.el6uek.x86_64

2015-05-18 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Prarthana, On 5/18/15 6:18 AM, Prarthana Agwania wrote: > Thanks for the response. I tried the solution you suggested, but I > am getting the below error: > > /usr/bin/ld: unrecognised emulation mode: 32 Supported emulations: > elf_x86_64 elf_i386

Re: Problem with APR library - Tomcat 7

2015-05-18 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Dejan, On 5/17/15 3:22 PM, Dejan Stamenov wrote: > I am working on a project where I need to install SSL certificates > on Tomcat 7 server for my Java application. I have been > experimenting around, I have set up the connector in the server.xml > f

RE: Tomcat valve JAAS : form error page displayed first before response reaches back to Tomcat valve

2015-05-18 Thread Kim Ming Yap
You said "The error page will be handled by the webapp or the ErrorReportingValve - both of whichh may get called before your Valve depending on how the Valve is configured." How do i ensure that my custom valve is called before the the ErrorReportingValve?Is there some settings i can set? Th

Re:Re: how to block the duplicated requests?

2015-05-18 Thread javalishixml
We find some client are always automatically fresh our lottery activity At 2015-05-18 23:56:51, "David kerber" wrote: >How would you tell that a request is from a robot? > > >On 5/18/2015 11:44 AM, javalishixml wrote: >> Hi, >> >> I have a website. It is built by apache + tomcat. >> >> Now

Re: how to block the duplicated requests?

2015-05-18 Thread David kerber
How would you tell that a request is from a robot? On 5/18/2015 11:44 AM, javalishixml wrote: Hi, 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 raise the duplicated requests to hit this lottery activity.

how to block the duplicated requests?

2015-05-18 Thread javalishixml
Hi, 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 raise the duplicated requests to hit this lottery activity. It causes that robots almost get all the awards. So we just want to block these kind of duplicat

RE: Tomcat valve JAAS : form error page displayed first before response reaches back to Tomcat valve

2015-05-18 Thread Kim Ming Yap
so who control the data flow? Does the data flow has stages just like control flow? Or is it just the http web server? As long as there are output stream going out .. the http web server will server those output stream to the client's browser? Basically no control stages when comes to data flow?

Re: Tomcat valve JAAS : form error page displayed first before response reaches back to Tomcat valve

2015-05-18 Thread Mark Thomas
On 18/05/2015 13:57, Kim Ming Yap wrote: > Wow .. that really confuses me. > > I've studied the Java EE component and the basic understanding of flow is as > follows (if i do not flush the data) > > client request --> web container (encapsulate request/response) --> filter > (contain request/re

Re: Tomcat occasionally duplicating responses

2015-05-18 Thread Stephen Dawkins
On Mon, May 18, 2015 at 2:24 PM, Mark Thomas wrote: > On 18/05/2015 13:40, Stephen Dawkins wrote: >> On Mon, May 18, 2015 at 12:30 PM, Mark Thomas wrote: > > Bingo. > > I think I have found the problem (well, a problem anyway). It looks like > there is a bug in javamelody. > > Once a request/resp

Re: Tomcat occasionally duplicating responses

2015-05-18 Thread Mark Thomas
On 18/05/2015 13:40, Stephen Dawkins wrote: > On Mon, May 18, 2015 at 12:30 PM, Mark Thomas wrote: >> Thanks. That rules out some possibilities for application error. >> >> When you get two threads writing to the response, if would be useful to >> know which of the following those threads are: >>

RE: Tomcat valve JAAS : form error page displayed first before response reaches back to Tomcat valve

2015-05-18 Thread Kim Ming Yap
Wow .. that really confuses me. I've studied the Java EE component and the basic understanding of flow is as follows (if i do not flush the data) client request --> web container (encapsulate request/response) --> filter (contain request/response object) --> Servlet (JSP) --> filter (request /

Re: Tomcat valve JAAS : form error page displayed first before response reaches back to Tomcat valve

2015-05-18 Thread Mark Thomas
On 18/05/2015 13:31, Kim Ming Yap wrote: > > Thanks Mark for your suggestion. > I'm still confused over the last part where you mentioned that 'i am > confusing myself between control and data'. > The response object contains output stream (data) to be displayed. Always the > case. No. The res

Re: Tomcat occasionally duplicating responses

2015-05-18 Thread Stephen Dawkins
On Mon, May 18, 2015 at 12:30 PM, Mark Thomas wrote: > Thanks. That rules out some possibilities for application error. > > When you get two threads writing to the response, if would be useful to > know which of the following those threads are: > - the Tomcat thread that handled the original reque

RE: Tomcat valve JAAS : form error page displayed first before response reaches back to Tomcat valve

2015-05-18 Thread Kim Ming Yap
Thanks Mark for your suggestion. I'm still confused over the last part where you mentioned that 'i am confusing myself between control and data'. The response object contains output stream (data) to be displayed. Always the case. If i enter valid credential .. you'll noticed the flow exactly as

Re: Officially released Apache tomcat version with CVE-2014-0230

2015-05-18 Thread Raghavendra Nilekani
I see latest version of apache tomcat v 6.0.44 released. This is great news. Thanks and Regards --- Raghavendra Neelekani On 6 May 2015 at 18:16, Christopher Schultz wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA256 > > Raghavendra, > > On 5/6/15 2:19 AM,

Re: Tomcat occasionally duplicating responses

2015-05-18 Thread Mark Thomas
On 18/05/2015 12:07, Stephen Dawkins wrote: > On Mon, May 18, 2015 at 12:00 PM, Mark Thomas wrote: >> OK. Is Javamelody async aware? In particular I am wondering if it >> correctly handles the case where Servlet.service() returns after >> startAsync() but the app hasn't written any of / all of th

Re: Tomcat occasionally duplicating responses

2015-05-18 Thread Stephen Dawkins
On Mon, May 18, 2015 at 12:00 PM, Mark Thomas wrote: > On 18/05/2015 11:50, Stephen Dawkins wrote: >> On Mon, May 18, 2015 at 11:22 AM, Mark Thomas wrote: >>> On 18/05/2015 10:31, Stephen Dawkins wrote: Does anyone have any suggestions as to where the issue could be? >>> >>> Are you using an

Re: Tomcat occasionally duplicating responses

2015-05-18 Thread Mark Thomas
On 18/05/2015 11:50, Stephen Dawkins wrote: > On Mon, May 18, 2015 at 11:22 AM, Mark Thomas wrote: >> On 18/05/2015 10:31, Stephen Dawkins wrote: >> >> Tomcat will call flushBuffer() internally. >> >> Tomcat does re-use Request/Response objects so if a reference is >> accidentally retained to one

Re: Tomcat occasionally duplicating responses

2015-05-18 Thread Stephen Dawkins
On Mon, May 18, 2015 at 11:22 AM, Mark Thomas wrote: > On 18/05/2015 10:31, Stephen Dawkins wrote: > > Tomcat will call flushBuffer() internally. > > Tomcat does re-use Request/Response objects so if a reference is > accidentally retained to one of them you can see this issue. > > Try using: > org

Re: Tomcat occasionally duplicating responses

2015-05-18 Thread Mark Thomas
On 18/05/2015 10:31, Stephen Dawkins wrote: > Hi > > I have an application that uses embedded Tomcat (8.0.22) to serve SOAP > services. I've recently attempted to add javamelody[1] to the app to gather > some stats, however I've run into an issue where occasionally the response > is incorrect, mos

Re: Tomcat connector: mod_jk 1.2.40 in 32 bit for OS - Linux 2.6.39-400.21.1.el6uek.x86_64

2015-05-18 Thread Prarthana Agwania
Christopher, Thanks for the response. I tried the solution you suggested, but I am getting the below error: /usr/bin/ld: unrecognised emulation mode: 32 Supported emulations: elf_x86_64 elf_i386 i386linux elf_l1om collect2: ld returned 1 exit status make[1]: *** [mod_jk.la] Error 1 Can you pleas

Re: Tomcat valve JAAS : form error page displayed first before response reaches back to Tomcat valve

2015-05-18 Thread Mark Thomas
On 17/05/2015 23:44, Kim Ming Yap wrote: > Hi,I'm building a website using form based authentication integrating with > JAAS for user based authentication. I don't have issue when a successful > credential is authenticated. Rather I'm having difficulty understanding the > flow of JAAS back to th

Re: Problem with APR library - Tomcat 7

2015-05-18 Thread Mark Thomas
On 17/05/2015 20:22, Dejan Stamenov wrote: > Hello, > > > > I am working on a project where I need to install SSL certificates on Tomcat > 7 server for my Java application. I have been experimenting around, I have > set up the connector in the server.xml file, but when I look into the logs I >

Re: Supported Tomcat version for Java 1.8.25

2015-05-18 Thread Mark Thomas
On 17/05/2015 19:57, Vijay Kumar wrote: > Hi, > > We have a product which we certified on Tomcat 7.0.16 with JRE 1.6 > > One of our Customer want to upgrade his Java environment from 1.6 to 1.8.25 > > So i tried to start the Tomcat 7.0.16 using Java 1.8.25 and got below error > during the deploy

Tomcat occasionally duplicating responses

2015-05-18 Thread Stephen Dawkins
Hi I have an application that uses embedded Tomcat (8.0.22) to serve SOAP services. I've recently attempted to add javamelody[1] to the app to gather some stats, however I've run into an issue where occasionally the response is incorrect, mostly it just duplicates response, although sometimes it's