Re: cookie-related regression in Tomcat 8.5?

2016-08-28 Thread Mike Wertheim
I took a look using the LiveHttpHeaders Chrome extension.

It's very simple.  Tomcat 8.0.33 is setting the Set-Cookie header in the
response, and Tomcat 8.5.4 is not setting the Set-Cookie header in the
response.

Ignore what I originally wrote about the distinction between the main
domains (domain1.com and domain2.com) and the subdomain (sub.domain3.com).
The domains and subdomains are not actually relevant to the problem.  What
was going on was that I had pre-existing cookies on domain1.com and
domain2.com but no pre-existing cookie on sub.domain3.com.









On Sun, Aug 28, 2016 at 6:10 PM, Christopher Schultz <
ch...@christopherschultz.net> wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA256
>
> Mike,
>
> On 8/27/16 8:44 PM, Mike Wertheim wrote:
> > I've found a difference in behavior between Tomcat 8.0.33 and
> > Tomcat 8.5.4.
> >
> > Here's the setup...
> >
> > I have some Tomcat servers behind an F5 load balancer.  There are
> > two top-level domains (which I'll call domain1.com
> >  and domain2.com ) pointing
> > to the load balancer.  In addition, there is a separate server
> > running PHP.  There is a top-level domain (which I'll call
> > domain3.com ) that points to the PHP server.
> > So www.domain3.com  goes to the PHP server.
> > But we use DNS to point a subdomain of domain3.com
> >  (let's call it sub.domain3.com
> > ) which points to the Tomcat servers via
> > the load balancer.
> >
> > The Java app that's running on Tomcat sets some cookies.  The
> > cookie's domain is set by doing something like
> > cookie.setDomain(domain), where "domain" is based on the value of
> > request.getServerName().
> >
> > The bug that Tomcat 8.5.4 exhibits is: Chrome and Safari refuse to
> > set the cookie when the site is accessed via
> > http://sub.domain3.com.
> >
> > The cookies work fine in each of the following scenarios: - It
> > works fine when the Tomcat version is 8.0.33 - It works fine with
> > Firefox - It works fine when the site is accessed by either
> > domain1.com  or domain2.com
> > 
> >
> > The failure only happens with the combination of: Tomcat 8.5.4,
> > the browser is Chrome or Safari, and the site is accessed via
> > http://sub.domain3.com.
> >
> > This all happens using regular (non-SSL) http.
> >
> > I've attached server.xml and context.xml.
>
> Can you take a protocol-capture of the Set-Cookie response header in
> each case? Use something like Fiddler, FireBug, LiveHttpHeaders, etc.
> or even Wireshark to see what's being sent.
>
> - -chris
> -BEGIN PGP SIGNATURE-
> Comment: GPGTools - http://gpgtools.org
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>
> iQIcBAEBCAAGBQJXw4twAAoJEBzwKT+lPKRYAFgQAL82b2Fe0WA+41ITaPybsZLV
> NqYn44rx3LAv3L1Bd2wFhSmHY43mWkA5POpGbPPHQP8/BNzpmLoyryeQ6q1aQwP/
> YLjh3Dl5K5adba9Q+LuTe4Kv7uhqb0eEMlLCXVkBCGDPeaT55Z2NVoGGhqVyXRBz
> eEVkz0YvT9VFXKB2zSJBTGP5LP19gXgKMnJ1QXGhcl2nnIOR1eIGVWVEqecOsCgk
> /3gO3ZU3Nq002Sh6eH6c1xVoq75ZgmFQXqOvst/qWTJknMM4qjvdOGPg8Oy4caSN
> nZcSU2Xq6EiypGNK1ikDqcnyARTNxKCs0UvKfiOaUbW3U1TtzdbhcClAPvvaHTPr
> 5cHv+3L4I6a2zeFp3IaFomQaSX6YliSBWe4hYS3czCnvaWFtb789aQbxtDG6OtF3
> WNgxG3daQKTeGH2yPV0qLek+SmcQwvD725eIUKjzyucXKBPERQTSdRSGudL2pB8i
> 2COcwjBXh449tcEl8+7E4DqbXdDq9T+XjpvBnltRA6rbqBw2Baz6EUCLhaAv4DDR
> BVMNXFCFZ1PYPfJgpUtQPr0fT5E3xLIMD352laPTdn6Fx4zL+O5dKf9daruFH0z7
> 9X1qZiKb4vyHzemBMH5H99be7mGa1wsRa45ek5rlUyYSC4kTXXDkQMYEa9LPlkZU
> vmvpJi9g4lXkqOUALpqf
> =OSu4
> -END PGP SIGNATURE-
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: cookie-related regression in Tomcat 8.5?

2016-08-28 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Mike,

On 8/27/16 8:44 PM, Mike Wertheim wrote:
> I've found a difference in behavior between Tomcat 8.0.33 and
> Tomcat 8.5.4.
> 
> Here's the setup...
> 
> I have some Tomcat servers behind an F5 load balancer.  There are
> two top-level domains (which I'll call domain1.com
>  and domain2.com ) pointing
> to the load balancer.  In addition, there is a separate server
> running PHP.  There is a top-level domain (which I'll call
> domain3.com ) that points to the PHP server.
> So www.domain3.com  goes to the PHP server.
> But we use DNS to point a subdomain of domain3.com 
>  (let's call it sub.domain3.com 
> ) which points to the Tomcat servers via
> the load balancer.
> 
> The Java app that's running on Tomcat sets some cookies.  The
> cookie's domain is set by doing something like
> cookie.setDomain(domain), where "domain" is based on the value of
> request.getServerName().
> 
> The bug that Tomcat 8.5.4 exhibits is: Chrome and Safari refuse to
> set the cookie when the site is accessed via
> http://sub.domain3.com.
> 
> The cookies work fine in each of the following scenarios: - It
> works fine when the Tomcat version is 8.0.33 - It works fine with
> Firefox - It works fine when the site is accessed by either
> domain1.com  or domain2.com
> 
> 
> The failure only happens with the combination of: Tomcat 8.5.4,
> the browser is Chrome or Safari, and the site is accessed via 
> http://sub.domain3.com.
> 
> This all happens using regular (non-SSL) http.
> 
> I've attached server.xml and context.xml.

Can you take a protocol-capture of the Set-Cookie response header in
each case? Use something like Fiddler, FireBug, LiveHttpHeaders, etc.
or even Wireshark to see what's being sent.

- -chris
-BEGIN PGP SIGNATURE-
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJXw4twAAoJEBzwKT+lPKRYAFgQAL82b2Fe0WA+41ITaPybsZLV
NqYn44rx3LAv3L1Bd2wFhSmHY43mWkA5POpGbPPHQP8/BNzpmLoyryeQ6q1aQwP/
YLjh3Dl5K5adba9Q+LuTe4Kv7uhqb0eEMlLCXVkBCGDPeaT55Z2NVoGGhqVyXRBz
eEVkz0YvT9VFXKB2zSJBTGP5LP19gXgKMnJ1QXGhcl2nnIOR1eIGVWVEqecOsCgk
/3gO3ZU3Nq002Sh6eH6c1xVoq75ZgmFQXqOvst/qWTJknMM4qjvdOGPg8Oy4caSN
nZcSU2Xq6EiypGNK1ikDqcnyARTNxKCs0UvKfiOaUbW3U1TtzdbhcClAPvvaHTPr
5cHv+3L4I6a2zeFp3IaFomQaSX6YliSBWe4hYS3czCnvaWFtb789aQbxtDG6OtF3
WNgxG3daQKTeGH2yPV0qLek+SmcQwvD725eIUKjzyucXKBPERQTSdRSGudL2pB8i
2COcwjBXh449tcEl8+7E4DqbXdDq9T+XjpvBnltRA6rbqBw2Baz6EUCLhaAv4DDR
BVMNXFCFZ1PYPfJgpUtQPr0fT5E3xLIMD352laPTdn6Fx4zL+O5dKf9daruFH0z7
9X1qZiKb4vyHzemBMH5H99be7mGa1wsRa45ek5rlUyYSC4kTXXDkQMYEa9LPlkZU
vmvpJi9g4lXkqOUALpqf
=OSu4
-END PGP SIGNATURE-

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



Re: 自动: SuTing Chen 已离开办公室 (返回日期 2016-11-12)

2016-08-28 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Mark,

On 8/27/16 2:13 PM, Mark Thomas wrote:
> On 27/08/2016 13:48, Christopher Schultz wrote:
>> All,
>> 
>> CC'ing markt, since he's both Tomcat PMC and INFRA.
> 
> 
> 
>> This is an out-of-office reply. Isn't there a way to have the
>> mailing list reject (or ignore) messages with the following SMTP
>> headers?
>> 
>> Auto-Submitted: auto-generated Auto-Submitted: auto-repllied
> 
> The message was sent to you personally, not the mailing list.

In the headers of the original message, the "To" field says:

To: "Tomcat Users List" 

Other interesting headers are:

List-Help: 
List-Unsubscribe: 
List-Post: 
List-Id: 
Reply-To: "Tomcat Users List" 
Delivered-To: mailing list users@tomcat.apache.org
X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org
Received: from mx2-lw-eu.apache.org ([10.40.0.8])
by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new,
port 10024)
with ESMTP id YHQOnyUbgpPC for ;
Fri, 26 Aug 2016 14:02:41 + (UTC)


I'm pretty sure that message came through the ASF mailing list.

> You'd need to configure and appropriate filter on your client /
> mail server depending on your personal config.
> 
> These responses do occasionally make it to the list but not often 
> enough (yet) that I've felt the need to do anything about it.

Ok.

- -chris
-BEGIN PGP SIGNATURE-
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJXw4pjAAoJEBzwKT+lPKRY8nYQAISL6aMc8sBBAdG9uXcg+YOZ
p0PL4n9lrHYFBi9NRkZyl81Y9xD7SxOoTA8tE/GrMfqB4SxtgKNJi23p6ZDMHUOo
xBZySnXg/SmzyvCDiTz4UFqJfWsdLBovvw+2S4tKZEE8YtxCp7BqgDWH1WcUUz33
tcFH2iYkqhKDryvwayQgLPyXeRXxwS5tnuaJ7dofBhvexkFBWYVXkvMVuaNe3K9A
2nXXA8HkpFj33mOnX+N/8P1bae39rWElSE6wPXTbGYEXgHv2+e7V/pi10n+ikAE6
0oPrwcXvgZdR2dxOXGX2ieHl4dZ6505txj6kNCtQaJd8v+jlIn/98WMlxpyFc2+s
ypr6zAvvh9LErJBMnbm7RPALmAXwaleO80GqzOAvIOWiMFRKdA+BpjYCx72rMifJ
C2FccTAEE4UO0zFh3bC3zfW8/NORn7MVgIOn2ndcXMxoXPa2RwrmG1Api8bVY+Uc
A431KcFVXT8BXDektmR4xfop49csMqcFavQjx27aOlzEs8alZK0Nec7YytjzRsbM
bwoGofyfebYHqaFiWgz/19u7cypJkHgP4a6Nmycbha216BcQbdxBd9OaQjxGfvub
NVaMLbHjO92eGEKTOQVscOlkwEJAMLBqdGFM5EyMlbmKJynre18oW9IBYIQB4s0f
vUzNubhyoJrlMVC/Z/Uf
=guwN
-END PGP SIGNATURE-

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



RE: Apache Tomcat 8.5.4 question

2016-08-28 Thread Jorge Alfonso
Installed Tomcat Server 7.0.37, same one used to test on the Netbeans 8.1
IDE and this one allows 2 sessions to work. One remote and one local on the
server 

-Original Message-
From: Jorge Alfonso [mailto:jo...@qbex.com] 
Sent: Sunday, August 28, 2016 5:59 PM
To: 'Tomcat Users List'
Subject: RE: Apache Tomcat 8.5.4 question

Dear Sirs

In addition I installed Tomcat 7.0.70 and behaves exactly the same as the 8
versions. Only the first user logging in gets to work all others only up to
the Main Menu.

In the Tomcat console it appears working in all sessions, but no display to
the second, third and further sessions 

-Original Message-
From: Johanes Soetanto [mailto:otnat...@gmail.com]
Sent: Saturday, August 27, 2016 11:12 PM
To: Tomcat Users List
Subject: Re: Apache Tomcat 8.5.4 question

On 27 Aug 2016 10:43 pm, "Christopher Schultz"

wrote:
>
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA256
>
> Jorge,
>
> On 8/26/16 10:26 PM, Jorge Alfonso wrote:
> > Dear Sirs
> >
> > I configured and started Tomcat Server on Windows 2008-R12 Server.
> >
> > Compiled and deployed a Java Vaadin Web application that I just 
> > started to program 2 months ago. My experience with Vaadin is only
> > 2 months and the Tomcat Server only 2 days. I am a newbie learning 
> > Java, Vaadin and Tomcat, but willing to investigate and learn
> >
> > The application starts just fine and runs the login and executes the 
> > main menu all the time, it does not matter how many sessions or 
> > where from, remote systems or localhost.
> >
> > The only session or execution that allows running options from the 
> > Menu is the first one. all the other sessions are not getting 
> > displayed the forms and the information.

Have the application been tested on other Tomcat version? E.g. 7.x You may
want to change log configuration to find what happened when you try to
access the form etc since Vaadin allows you to debug your application on
some IDE.

>
> So, the main menu works for everyone, but the other stuff only works 
> properly for the first user to login? What if that user logs out, then 
> logs back in again? Does it work again for that user, or is it 
> literally the *first session* that works, and none others work?
>
> > I have investigated this behavior on Google and Apache but 
> > unfortunately there is nothing that I can use to properly guide my 
> > efforts.
> >
> > I need to isolate if this could be a parameter or configuration 
> > missing in Tomcat or this is a Vaadin Framework problem with session 
> > handling or the like.
> >
> > I do not want to overwhelm you initially with configuration in 
> > Tomcat, logs or console file, unless you want me to submit them
>
> I have no personal experience with Vaadin, so I'm probably going to 
> ask a lot of dumb questions.
>
> First of all, have you personally written code to access the 
> HttpSession? Can you give us an example?
>
> - -chris
> -BEGIN PGP SIGNATURE-
> Comment: GPGTools - http://gpgtools.org
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>
> iQIcBAEBCAAGBQJXwYsPAAoJEBzwKT+lPKRYwdkQAJ0lhlINZr22nxT6h0l4LGvT
> gS8Gs7iDzRTc6w1UpfXbFUn5i/mf9EddjTa0t5/iBlVaXDUqLv3nCi05rXsfSZPX
> In/cqwGjeMQ8J3+DuAbNMd7gF2TaVAmgmdIMi1rQJ77IGbA0Y7Ntd5CFTDRh57XK
> k0/ZoeBI9+y3iCp1lhJ25YQ+g9785nahFeadPoz8tEIQbDerAGDL+C7Y9Bj7hQMc
> IOn65hs2pS2DB5KBAbQKrgIE0BibKGhrdrXsVUDGSvzjVh5CGnxLoManvNbPiZpm
> 4a/T1BN4Cv/LU8sLHtLCkxOZ6CPvRWyI7ZQOLX+gNehnuiw7eDBhSfM2McUHFSdW
> Dz6XCG0d1g8PAYyRMZnmCQY/h9UGk8QdGpvWjyeFvU9ntFcV/5d0nPVflI1/p+4S
> TL1o0edPt0x9+D0ftyZjFjw0r/THRFM/ntZ4C72lJ5Puwy41tMrnTGjjAMi7PZEY
> aATXBL1kYM+A5QIXGrOLm0/vNhIj5Em3sUDMmKmOshaOj0jF8ZMW6RwxqQ+YNyqV
> yug7sIlAPLllZhMkYiaK4+JjWMLy/5tTeB0Nf4NGx0CgF1C3m/NoFjoZ2OdT0p7w
> urrcFbnjngKbwlXjAMc2Ao4be3UVGseVq4B4EIxK+hu9oxO7vfCJqf1sWPqCkk9e
> 8U01oYnwEKn9tXKdIO72
> =7LxQ
> -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



RE: Apache Tomcat 8.5.4 question

2016-08-28 Thread Jorge Alfonso
Dear Sirs

In addition I installed Tomcat 7.0.70 and behaves exactly the same as the 8
versions. Only the first user logging in gets to work all others only up to
the Main Menu.

In the Tomcat console it appears working in all sessions, but no display to
the second, third and further sessions 

-Original Message-
From: Johanes Soetanto [mailto:otnat...@gmail.com] 
Sent: Saturday, August 27, 2016 11:12 PM
To: Tomcat Users List
Subject: Re: Apache Tomcat 8.5.4 question

On 27 Aug 2016 10:43 pm, "Christopher Schultz"

wrote:
>
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA256
>
> Jorge,
>
> On 8/26/16 10:26 PM, Jorge Alfonso wrote:
> > Dear Sirs
> >
> > I configured and started Tomcat Server on Windows 2008-R12 Server.
> >
> > Compiled and deployed a Java Vaadin Web application that I just 
> > started to program 2 months ago. My experience with Vaadin is only
> > 2 months and the Tomcat Server only 2 days. I am a newbie learning 
> > Java, Vaadin and Tomcat, but willing to investigate and learn
> >
> > The application starts just fine and runs the login and executes the 
> > main menu all the time, it does not matter how many sessions or 
> > where from, remote systems or localhost.
> >
> > The only session or execution that allows running options from the 
> > Menu is the first one. all the other sessions are not getting 
> > displayed the forms and the information.

Have the application been tested on other Tomcat version? E.g. 7.x You may
want to change log configuration to find what happened when you try to
access the form etc since Vaadin allows you to debug your application on
some IDE.

>
> So, the main menu works for everyone, but the other stuff only works 
> properly for the first user to login? What if that user logs out, then 
> logs back in again? Does it work again for that user, or is it 
> literally the *first session* that works, and none others work?
>
> > I have investigated this behavior on Google and Apache but 
> > unfortunately there is nothing that I can use to properly guide my 
> > efforts.
> >
> > I need to isolate if this could be a parameter or configuration 
> > missing in Tomcat or this is a Vaadin Framework problem with session 
> > handling or the like.
> >
> > I do not want to overwhelm you initially with configuration in 
> > Tomcat, logs or console file, unless you want me to submit them
>
> I have no personal experience with Vaadin, so I'm probably going to 
> ask a lot of dumb questions.
>
> First of all, have you personally written code to access the 
> HttpSession? Can you give us an example?
>
> - -chris
> -BEGIN PGP SIGNATURE-
> Comment: GPGTools - http://gpgtools.org
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>
> iQIcBAEBCAAGBQJXwYsPAAoJEBzwKT+lPKRYwdkQAJ0lhlINZr22nxT6h0l4LGvT
> gS8Gs7iDzRTc6w1UpfXbFUn5i/mf9EddjTa0t5/iBlVaXDUqLv3nCi05rXsfSZPX
> In/cqwGjeMQ8J3+DuAbNMd7gF2TaVAmgmdIMi1rQJ77IGbA0Y7Ntd5CFTDRh57XK
> k0/ZoeBI9+y3iCp1lhJ25YQ+g9785nahFeadPoz8tEIQbDerAGDL+C7Y9Bj7hQMc
> IOn65hs2pS2DB5KBAbQKrgIE0BibKGhrdrXsVUDGSvzjVh5CGnxLoManvNbPiZpm
> 4a/T1BN4Cv/LU8sLHtLCkxOZ6CPvRWyI7ZQOLX+gNehnuiw7eDBhSfM2McUHFSdW
> Dz6XCG0d1g8PAYyRMZnmCQY/h9UGk8QdGpvWjyeFvU9ntFcV/5d0nPVflI1/p+4S
> TL1o0edPt0x9+D0ftyZjFjw0r/THRFM/ntZ4C72lJ5Puwy41tMrnTGjjAMi7PZEY
> aATXBL1kYM+A5QIXGrOLm0/vNhIj5Em3sUDMmKmOshaOj0jF8ZMW6RwxqQ+YNyqV
> yug7sIlAPLllZhMkYiaK4+JjWMLy/5tTeB0Nf4NGx0CgF1C3m/NoFjoZ2OdT0p7w
> urrcFbnjngKbwlXjAMc2Ao4be3UVGseVq4B4EIxK+hu9oxO7vfCJqf1sWPqCkk9e
> 8U01oYnwEKn9tXKdIO72
> =7LxQ
> -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



RE: Apache Tomcat 8.5.4 question

2016-08-28 Thread Jorge Alfonso
Dear Sirs

I had to relad the app and after that I checked for leaks and this is the
message

The following web applications were stopped (reloaded, undeployed), but
their
classes from previous runs are still loaded in memory, thus causing a memory
leak (use a profiler to confirm):
BriTrident-1.0 

-Original Message-
From: Johanes Soetanto [mailto:otnat...@gmail.com] 
Sent: Saturday, August 27, 2016 11:12 PM
To: Tomcat Users List
Subject: Re: Apache Tomcat 8.5.4 question

On 27 Aug 2016 10:43 pm, "Christopher Schultz"

wrote:
>
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA256
>
> Jorge,
>
> On 8/26/16 10:26 PM, Jorge Alfonso wrote:
> > Dear Sirs
> >
> > I configured and started Tomcat Server on Windows 2008-R12 Server.
> >
> > Compiled and deployed a Java Vaadin Web application that I just 
> > started to program 2 months ago. My experience with Vaadin is only
> > 2 months and the Tomcat Server only 2 days. I am a newbie learning 
> > Java, Vaadin and Tomcat, but willing to investigate and learn
> >
> > The application starts just fine and runs the login and executes the 
> > main menu all the time, it does not matter how many sessions or 
> > where from, remote systems or localhost.
> >
> > The only session or execution that allows running options from the 
> > Menu is the first one. all the other sessions are not getting 
> > displayed the forms and the information.

Have the application been tested on other Tomcat version? E.g. 7.x You may
want to change log configuration to find what happened when you try to
access the form etc since Vaadin allows you to debug your application on
some IDE.

>
> So, the main menu works for everyone, but the other stuff only works 
> properly for the first user to login? What if that user logs out, then 
> logs back in again? Does it work again for that user, or is it 
> literally the *first session* that works, and none others work?
>
> > I have investigated this behavior on Google and Apache but 
> > unfortunately there is nothing that I can use to properly guide my 
> > efforts.
> >
> > I need to isolate if this could be a parameter or configuration 
> > missing in Tomcat or this is a Vaadin Framework problem with session 
> > handling or the like.
> >
> > I do not want to overwhelm you initially with configuration in 
> > Tomcat, logs or console file, unless you want me to submit them
>
> I have no personal experience with Vaadin, so I'm probably going to 
> ask a lot of dumb questions.
>
> First of all, have you personally written code to access the 
> HttpSession? Can you give us an example?
>
> - -chris
> -BEGIN PGP SIGNATURE-
> Comment: GPGTools - http://gpgtools.org
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>
> iQIcBAEBCAAGBQJXwYsPAAoJEBzwKT+lPKRYwdkQAJ0lhlINZr22nxT6h0l4LGvT
> gS8Gs7iDzRTc6w1UpfXbFUn5i/mf9EddjTa0t5/iBlVaXDUqLv3nCi05rXsfSZPX
> In/cqwGjeMQ8J3+DuAbNMd7gF2TaVAmgmdIMi1rQJ77IGbA0Y7Ntd5CFTDRh57XK
> k0/ZoeBI9+y3iCp1lhJ25YQ+g9785nahFeadPoz8tEIQbDerAGDL+C7Y9Bj7hQMc
> IOn65hs2pS2DB5KBAbQKrgIE0BibKGhrdrXsVUDGSvzjVh5CGnxLoManvNbPiZpm
> 4a/T1BN4Cv/LU8sLHtLCkxOZ6CPvRWyI7ZQOLX+gNehnuiw7eDBhSfM2McUHFSdW
> Dz6XCG0d1g8PAYyRMZnmCQY/h9UGk8QdGpvWjyeFvU9ntFcV/5d0nPVflI1/p+4S
> TL1o0edPt0x9+D0ftyZjFjw0r/THRFM/ntZ4C72lJ5Puwy41tMrnTGjjAMi7PZEY
> aATXBL1kYM+A5QIXGrOLm0/vNhIj5Em3sUDMmKmOshaOj0jF8ZMW6RwxqQ+YNyqV
> yug7sIlAPLllZhMkYiaK4+JjWMLy/5tTeB0Nf4NGx0CgF1C3m/NoFjoZ2OdT0p7w
> urrcFbnjngKbwlXjAMc2Ao4be3UVGseVq4B4EIxK+hu9oxO7vfCJqf1sWPqCkk9e
> 8U01oYnwEKn9tXKdIO72
> =7LxQ
> -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



Re: Custom Authentication in Tomcat 8.5.4 using JDK 1.8.0_92?

2016-08-28 Thread Doug Gschwind
Hi Mark,

Very good, thank you for that direction. Both approaches you suggest seem
appropriate, but I was unable to find any guide that describes how to
provide/implement a JASPIC module, let alone that within Tomcat. I am
hoping a custom Authenticator via extending AuthenticatorBase
(FormAuthenticator in particular) will do the trick, but I don't know just
yet.

Thank you for the help.

Doug

On Fri, Aug 26, 2016 at 5:07 AM, Mark Thomas  wrote:

> On 26/08/2016 06:54, Doug Gschwind wrote:
> > Hello,
>
> 
>
> > In my research today on the topic, this appears to be much more difficult
> > than I would expect in Tomcat 8.5, so I can only conclude I am missing
> > something. Here are the two potential solutions I have found :
> >
> > 1) Provide our own implementation of the org.apache.catalina.Realm
>
> The split isn't completely clean but generally Realm's provide
> authorization, not authentication.
>
> Very roughly, Authenticators obtain the user name, password etc and
> Realms validate them against a credential store.
>
> You probably want to implement a custom Authenticator (extending
> AuthenticatorBase).
>
> Depending on what you are trying to do, you might need a custom
> Authenticator and a custom Realm.
>
> A more portable solution would be to implement a JASPIC module.
>
> HTH,
>
> Mark
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


RE: Apache Tomcat 8.5.4 question

2016-08-28 Thread Jorge Alfonso
Dear Sirs

I am attacing the console of execution with Tomcat 8.0.36 as follows:
The last lines correspond to my logout from the application

lasspath or add files to WebContent/VAADIN folder.
Hola Mundo Menu 54 Analisis de Clientes
Aug 28, 2016 4:35:23 PM com.vaadin.ui.AbstractComponent readDesign
INFO: Unsupported attribute found when reading from design : "clientes"
Aug 28, 2016 4:35:24 PM com.vaadin.ui.AbstractComponent readDesign
INFO: Unsupported attribute found when reading from design :
item-caption-mode
C:\Program Files\apache-tomcat-8.0.36
SELECT c.city_name, e.state_name FROM `trident`.`cities` AS c INNER JOIN
`triden
t`.`states` AS e ON c.state = e.code WHERE c.city_name LIKE '%%'
Hola Mundo 1713
Linea 667: 1133Linea 860: true
Linea 1533: com.vaadin.ui.Grid$HeaderRow@42f9a5e9
Hola Mundo 1304 8300434467 18448Aug 28, 2016 4:35:26 PM
com.vaadin.server.Vaadin
Servlet serveStaticResourcesInVAADIN
INFO: Requested resource [/VAADIN/themes/mytheme/icons/tea-16px.png] not
found f
rom filesystem or through class loader. Add widgetset and/or theme JAR to
your c
lasspath or add files to WebContent/VAADIN folder.
Hola Mundo 1397  row1   ItmID1  Clktfalse  Cstmr8300434467 null false
Hola Mundo 1398  1 company_name 18448 8300434467 false false A & C Asociados
Ltd
a
Hola Mundo 1416 8300434467  18448  A & C Asociados Ltda
Hola Mundo 1360 1 8300434467
Aug 28, 2016 4:35:32 PM com.vaadin.addon.contextmenu.ContextMenu
beforeClientRes
ponse
INFO: beforeClientResponse
Hola Mundo 1360 1 8300434467
Aug 28, 2016 4:35:33 PM com.vaadin.addon.contextmenu.ContextMenu$1
contextClick
INFO: Context click listener
Aug 28, 2016 4:35:33 PM com.vaadin.addon.contextmenu.ContextMenu
beforeClientRes
ponse
INFO: beforeClientResponse
Aug 28, 2016 4:35:33 PM com.vaadin.addon.contextmenu.ContextMenu
beforeClientRes
ponse
INFO: beforeClientResponse
Aug 28, 2016 4:35:34 PM com.vaadin.ui.AbstractComponent readDesign
INFO: Unsupported attribute found when reading from design :
item-caption-mode
SELECT * FROM customers_recdocs WHERE customer_code= '8300434467' AND
acc_period
 = '2016-06'
Hola Mundo 1450 8300434467 0.0
Hola Mundo 1450 8300434467 6.99
Hola Mundo 1450 8300434467 0.0
Hola Mundo 1450 8300434467 0.0
Hola Mundo 1450 8300434467 6000.0
Hola Mundo 1450 8300434467 5000.0
Hola Mundo 1450 8300434467 30500.0
Hola Mundo 1450 8300434467 0.0
Hola Mundo 1450 8300434467 0.0
Hola Mundo 1450 8300434467 0.0
Hola Mundo 1450 8300434467 0.0
SELECT * FROM customers_stat WHERE code= '8300434467'
Hola Mundo 256
Hola Mundo 124 [130505  Nacionales]
Hola Mundo 272
Hola Mundo 162 [2016-01  Ene 2016, 2016-02  Feb 2016, 2016-03  Mar 2016,
2016-04
  Abr 2016, 2016-05  May 2016, 2016-06  Jun 2016, 2016-07  Jul 2016, 2016-08
Ag
o 2016]
Hola Mundo 272
Hola Mundo 182 2016-01  2016-08
Hola Mundo 287 2016-01
Hola Mundo 295 2016-01
Hola Mundo 307
Hola Mundo 329 2016-01 8300434467 130505
Hola Mundo 295 2016-01
Hola Mundo 355 2016-08 8300434467 130505
Hola Mundo 183 2016-01  Ene 2016 2016-08  Ago 2016 2016-01-01 2016-01-31
SELECT * FROM transactions WHERE intrfce_code= '8300434467' AND
(transac_date >=
 '2016-01-01' AND transac_date <= '2016-08-31'
Linea 328: 38 2016-01-01 2016-08-31Hola Mundo 179 [2016-01  Ene 2016,
2016-02  F
eb 2016, 2016-03  Mar 2016, 2016-04  Abr 2016, 2016-05  May 2016, 2016-06
Jun 2
016, 2016-07  Jul 2016, 2016-08  Ago 2016]
Aug 28, 2016 4:35:35 PM com.vaadin.server.communication.PublishedFileHandler
han
dleRequest
WARNING: mystyle.css published by com.trident.cstomers.CstmrTranHist not
found.
Verify that the file com/trident/cstomers/mystyle.css is available on the
classp
ath.
Hola Mundo Menu 54 Clientes
Aug 28, 2016 4:35:43 PM com.vaadin.ui.AbstractComponent readDesign
INFO: Unsupported attribute found when reading from design : "clientes"
Aug 28, 2016 4:35:43 PM com.vaadin.ui.AbstractComponent readDesign
INFO: Unsupported attribute found when reading from design :
item-caption-mode
Aug 28, 2016 4:35:43 PM com.vaadin.ui.AbstractComponent readDesign
INFO: Unsupported attribute found when reading from design :
item-caption-mode
Aug 28, 2016 4:35:43 PM com.vaadin.ui.AbstractComponent readDesign
INFO: Unsupported attribute found when reading from design :
item-caption-mode
SELECT * FROM trident.customers_contacts WHERE cstmr_code= '8300434467'
 conn 575  Bogota D.C.
 conn 575
SELECT c.city_name, e.state_name FROM `trident`.`cities` AS c INNER JOIN
`triden
t`.`states` AS e ON c.state = e.code WHERE c.city_name LIKE '%Bogota D.C.%'
Hola Mundo 705 01 Roberto Pelaez
Hola Mundo 705 02 OLGA LUCIA ORJUELA
Hola Mundo 1998
Hola Mundo 937 2015-12-21 09:30:00
Hola Mundo 939 2015-12-21 09:30:00
Hola Mundo 1872
Hola Mundo 1215 ESTTMILINT TRIDENT 5.0 CONTABILIDAD 5
Hola Mundo 1226 ESTTMILINT TRIDENT 5.0 CONTABILIDAD 5
hola Mundo 59 BOGOTA
SELECT c.city_name, e.state_name FROM `trident`.`cities` AS c INNER JOIN
`triden
t`.`states` AS e ON c.state = e.code WHERE c.city_name LIKE '%BOGOTA%'
Hola Mundo 1713
es nulo
Hola Mundo 1909
SELECT c.city_name, e.state_na

RE: Apache Tomcat 8.5.4 question

2016-08-28 Thread Jorge Alfonso
Dear Sir

I installed Tomcat 8.0.36 and behaves the same

I would have to add from my previous report that the classes load perfectly
since the trace implemented in code track data retrieval and display is
working fine, however the display to the screen is not happening.

While Tomcat 8.5.4 was warning of memory leaks, the 8.0.36 is displaying the
message :

No web applications appear to have triggered a memory leak on stop, reload
or undeploy.

The only way the application would work fine again is to reload it from the
manager, but that would do for the first user to log in again, those working
would stop working 

-Original Message-
From: Johanes Soetanto [mailto:otnat...@gmail.com] 
Sent: Saturday, August 27, 2016 11:12 PM
To: Tomcat Users List
Subject: Re: Apache Tomcat 8.5.4 question

On 27 Aug 2016 10:43 pm, "Christopher Schultz"

wrote:
>
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA256
>
> Jorge,
>
> On 8/26/16 10:26 PM, Jorge Alfonso wrote:
> > Dear Sirs
> >
> > I configured and started Tomcat Server on Windows 2008-R12 Server.
> >
> > Compiled and deployed a Java Vaadin Web application that I just 
> > started to program 2 months ago. My experience with Vaadin is only
> > 2 months and the Tomcat Server only 2 days. I am a newbie learning 
> > Java, Vaadin and Tomcat, but willing to investigate and learn
> >
> > The application starts just fine and runs the login and executes the 
> > main menu all the time, it does not matter how many sessions or 
> > where from, remote systems or localhost.
> >
> > The only session or execution that allows running options from the 
> > Menu is the first one. all the other sessions are not getting 
> > displayed the forms and the information.

Have the application been tested on other Tomcat version? E.g. 7.x You may
want to change log configuration to find what happened when you try to
access the form etc since Vaadin allows you to debug your application on
some IDE.

>
> So, the main menu works for everyone, but the other stuff only works 
> properly for the first user to login? What if that user logs out, then 
> logs back in again? Does it work again for that user, or is it 
> literally the *first session* that works, and none others work?
>
> > I have investigated this behavior on Google and Apache but 
> > unfortunately there is nothing that I can use to properly guide my 
> > efforts.
> >
> > I need to isolate if this could be a parameter or configuration 
> > missing in Tomcat or this is a Vaadin Framework problem with session 
> > handling or the like.
> >
> > I do not want to overwhelm you initially with configuration in 
> > Tomcat, logs or console file, unless you want me to submit them
>
> I have no personal experience with Vaadin, so I'm probably going to 
> ask a lot of dumb questions.
>
> First of all, have you personally written code to access the 
> HttpSession? Can you give us an example?
>
> - -chris
> -BEGIN PGP SIGNATURE-
> Comment: GPGTools - http://gpgtools.org
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>
> iQIcBAEBCAAGBQJXwYsPAAoJEBzwKT+lPKRYwdkQAJ0lhlINZr22nxT6h0l4LGvT
> gS8Gs7iDzRTc6w1UpfXbFUn5i/mf9EddjTa0t5/iBlVaXDUqLv3nCi05rXsfSZPX
> In/cqwGjeMQ8J3+DuAbNMd7gF2TaVAmgmdIMi1rQJ77IGbA0Y7Ntd5CFTDRh57XK
> k0/ZoeBI9+y3iCp1lhJ25YQ+g9785nahFeadPoz8tEIQbDerAGDL+C7Y9Bj7hQMc
> IOn65hs2pS2DB5KBAbQKrgIE0BibKGhrdrXsVUDGSvzjVh5CGnxLoManvNbPiZpm
> 4a/T1BN4Cv/LU8sLHtLCkxOZ6CPvRWyI7ZQOLX+gNehnuiw7eDBhSfM2McUHFSdW
> Dz6XCG0d1g8PAYyRMZnmCQY/h9UGk8QdGpvWjyeFvU9ntFcV/5d0nPVflI1/p+4S
> TL1o0edPt0x9+D0ftyZjFjw0r/THRFM/ntZ4C72lJ5Puwy41tMrnTGjjAMi7PZEY
> aATXBL1kYM+A5QIXGrOLm0/vNhIj5Em3sUDMmKmOshaOj0jF8ZMW6RwxqQ+YNyqV
> yug7sIlAPLllZhMkYiaK4+JjWMLy/5tTeB0Nf4NGx0CgF1C3m/NoFjoZ2OdT0p7w
> urrcFbnjngKbwlXjAMc2Ao4be3UVGseVq4B4EIxK+hu9oxO7vfCJqf1sWPqCkk9e
> 8U01oYnwEKn9tXKdIO72
> =7LxQ
> -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



Re: Increased memory consumption due to url encoding

2016-08-28 Thread Svetlin Zarev
Hi,

Today I had some free time, so I implemented a more (memory and performance
wise) efficient URLEncoder [1]  and I'd like to contribute it if there is
interest for improvement in that area. My encoder has close to zero
allocation rate (unless there is very high concurrency for the encode()
operations, but still will be much more memory efficient than the current
encoder)  and encodes 2-4 times faster than the current implementation. It
is available @ [1]. I'm open for reviews, critiques, questions,
suggestions, etc.

[1] https://github.com/SvetlinZarev/UrlEncoder

Svetlin


Re: How to properly map a filter in tomcat embedded

2016-08-28 Thread John D. Ament
On Sun, Aug 28, 2016 at 5:07 AM Mark Thomas  wrote:

> On 28 August 2016 02:33:00 BST, "John D. Ament" 
> wrote:
> >Hi,
> >
> >I have this pretty straight forward case of starting an instance of
> >tomcat
> >and bringing in a filter.
>
> 
>
> >When starting this up (Just running in a plain JUnit test), the
> >container
> >is running however making requests to localhost:8080/ just result in
> >404's.  I'd expect my filter to handle those requests.
> >
> >When using a servlet, its perfectly fine.
> >
> >I tried it on both 8.5.4 and 8.0.30.
> >
> >Any ideas?
>
> The Mapper (the component that Maps requests to the correct Host + Context
> + Servlet) expects to map a request to a Servlet and returns a 404 if none
> is found even if there is a filter that will handle the request.
>
> Normally you'd never see this behaviour because of the Default Servlet.
>

Ah ha, perfect tip!  I can simply programmatically register default servlet
if none found.  And that works!


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


Re: How to properly map a filter in tomcat embedded

2016-08-28 Thread Mark Thomas
On 28 August 2016 02:33:00 BST, "John D. Ament"  wrote:
>Hi,
>
>I have this pretty straight forward case of starting an instance of
>tomcat
>and bringing in a filter.



>When starting this up (Just running in a plain JUnit test), the
>container
>is running however making requests to localhost:8080/ just result in
>404's.  I'd expect my filter to handle those requests.
>
>When using a servlet, its perfectly fine.
>
>I tried it on both 8.5.4 and 8.0.30.
>
>Any ideas?

The Mapper (the component that Maps requests to the correct Host + Context + 
Servlet) expects to map a request to a Servlet and returns a 404 if none is 
found even if there is a filter that will handle the request.

Normally you'd never see this behaviour because of the Default Servlet.

Mark


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