Re: login issue

2015-02-17 Thread Terence M. Bandoian

On 2/17/2015 9:51 AM, James McEvoy wrote:

Checked logs, added admin and manager to all needed files and added url so
it's ok for tomcat to use and still rejected when Logging in.
Stumped. I started and stopped it etc.



Hi, James-

You might try posting the new contents of tomcat-users.xml (with 
passwords obfuscated).


-Terence Bandoian




On Tuesday, February 17, 2015, James McEvoy 
wrote:


Ok if will check all

On Tuesday, February 17, 2015, John D. Ament > wrote:


Check your logs for why.  Don't forget to include the manager-gui role in
the list of roles.

John

On Tue Feb 17 2015 at 8:15:45 AM James McEvoy 
wrote:


ok it wont take the shutdown command.

On Tue, Feb 17, 2015 at 6:59 AM, James McEvoy 
couldnt screenshot so i just copied and pasted.




   
   
   
   
   






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



Re: Application getting stopped with error code 610 038

2015-02-17 Thread Shruti-Prithvi
forgot to attach log file, please have it attached.

On Wed, Feb 18, 2015 at 11:19 AM, Shruti-Prithvi 
wrote:

> Hi Chris,
>
> Thanks for reply.
>
> Please have below requested details:
>
> Tomcat version:7.0.47
>  tcnative version: 1.1.30
>  APR version: 1.4.8
>  OS vendor/version: Windows Server 2008 R2 SP1
>
>
> We are using Comet.
>
> Please have attached logs.
>
> Please help.
>
> Thanks & Regards,
> Prithvi
>
>
> On Tue, Jan 27, 2015 at 10:02 PM, Christopher Schultz <
> ch...@christopherschultz.net> wrote:
>
>> -BEGIN PGP SIGNED MESSAGE-
>> Hash: SHA256
>>
>> Rahul,
>>
>> On 1/27/15 1:56 AM, Shruti-Prithvi wrote:
>> > My tomcat web application stopped working after getting following
>> > error.
>> >
>> > janv. 09, 2015 9:57:16 AM
>> > org.apache.tomcat.util.net.AprEndpoint$Poller run Grave: Poller
>> > failed with error [610 038] : [APR does not understand this error
>> > code]
>>
>> Tomcat version? tcnative version? APR version? OS vendor/version?
>>
>> With a relatively recent version of Tomcat, the startup logs will
>> include the version numbers of tcnative and APR.
>>
>> What about the usage? Are you using Comet/Websocket, or is this just
>> regular HTTP(s) requests?
>>
>> - -chris
>> -BEGIN PGP SIGNATURE-
>> Version: GnuPG v1
>> Comment: GPGTools - http://gpgtools.org
>>
>> iQIcBAEBCAAGBQJUx72zAAoJEBzwKT+lPKRY71AQAJUpaYm+Ygf1YhmSbBasJ+sS
>> /AduvAjW4fuIWg4N4JIq09Buu9VXfYt72FJWFZ4n8LudaBpb68myOQ2sMwgznh0O
>> 9dzCAPaHCHp5++7wo0Bdip/vC3kwvm7QLxoZEBXJR/VzaGdCkz9hFn/HxHUePOs2
>> XV8Lm7RA1NFlDYSqMjN71OvEvYv9QBOhkSwrJJIun33CEWWBY97n9A2yDQ/awq56
>> FzaX411CSJygBPoWKieh9XEmZCF3XjNlh6Uwv6N4Bh4iadzXuDqpoThY7ih9KjKx
>> M1hA7QnxA1Gt4AznABegD5IS0N+SH2NqazCJbUvQj4yzM9MvPlv5T+GUP9jWVhW7
>> 4AnizeiXJm0DQqWEniwQtiYuGMMhr5WzIm0CuMyjRp+uaX4q4x1W5aACRifrQ827
>> hz2aGjnlT3JB8GWaMXp6qrpBnAJGPPtA2AWKnkspOMLCkMuEYdDZJ+OhVnIvc2HO
>> tlIJ0H0Ta3SP8CAa3gLwbXOeHT8+i+BMCVL1MP2XK+w9+/6aNdarb9yLalaz8xlf
>> 38u3kTSHhE4Zv3eIYHGFqIizjLfZh8fLLxhEG+7Zq4bmcQh7w/UpKA46fKXRQ+b/
>> 72UMe7HVuyh4dU4ViVz9qokm2vV1tU1bVd2P/IfzfQZbv4QJtG4QRt3FNi2SnXMg
>> /olE/Fk5qq0XKGPO3rD7
>> =TtZp
>> -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: Application getting stopped with error code 610 038

2015-02-17 Thread Shruti-Prithvi
Hi Chris,

Thanks for reply.

Please have below requested details:

Tomcat version:7.0.47
 tcnative version: 1.1.30
 APR version: 1.4.8
 OS vendor/version: Windows Server 2008 R2 SP1


We are using Comet.

Please have attached logs.

Please help.

Thanks & Regards,
Prithvi


On Tue, Jan 27, 2015 at 10:02 PM, Christopher Schultz <
ch...@christopherschultz.net> wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA256
>
> Rahul,
>
> On 1/27/15 1:56 AM, Shruti-Prithvi wrote:
> > My tomcat web application stopped working after getting following
> > error.
> >
> > janv. 09, 2015 9:57:16 AM
> > org.apache.tomcat.util.net.AprEndpoint$Poller run Grave: Poller
> > failed with error [610 038] : [APR does not understand this error
> > code]
>
> Tomcat version? tcnative version? APR version? OS vendor/version?
>
> With a relatively recent version of Tomcat, the startup logs will
> include the version numbers of tcnative and APR.
>
> What about the usage? Are you using Comet/Websocket, or is this just
> regular HTTP(s) requests?
>
> - -chris
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1
> Comment: GPGTools - http://gpgtools.org
>
> iQIcBAEBCAAGBQJUx72zAAoJEBzwKT+lPKRY71AQAJUpaYm+Ygf1YhmSbBasJ+sS
> /AduvAjW4fuIWg4N4JIq09Buu9VXfYt72FJWFZ4n8LudaBpb68myOQ2sMwgznh0O
> 9dzCAPaHCHp5++7wo0Bdip/vC3kwvm7QLxoZEBXJR/VzaGdCkz9hFn/HxHUePOs2
> XV8Lm7RA1NFlDYSqMjN71OvEvYv9QBOhkSwrJJIun33CEWWBY97n9A2yDQ/awq56
> FzaX411CSJygBPoWKieh9XEmZCF3XjNlh6Uwv6N4Bh4iadzXuDqpoThY7ih9KjKx
> M1hA7QnxA1Gt4AznABegD5IS0N+SH2NqazCJbUvQj4yzM9MvPlv5T+GUP9jWVhW7
> 4AnizeiXJm0DQqWEniwQtiYuGMMhr5WzIm0CuMyjRp+uaX4q4x1W5aACRifrQ827
> hz2aGjnlT3JB8GWaMXp6qrpBnAJGPPtA2AWKnkspOMLCkMuEYdDZJ+OhVnIvc2HO
> tlIJ0H0Ta3SP8CAa3gLwbXOeHT8+i+BMCVL1MP2XK+w9+/6aNdarb9yLalaz8xlf
> 38u3kTSHhE4Zv3eIYHGFqIizjLfZh8fLLxhEG+7Zq4bmcQh7w/UpKA46fKXRQ+b/
> 72UMe7HVuyh4dU4ViVz9qokm2vV1tU1bVd2P/IfzfQZbv4QJtG4QRt3FNi2SnXMg
> /olE/Fk5qq0XKGPO3rD7
> =TtZp
> -END PGP SIGNATURE-
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: Tomcat Access Logging Valve ?

2015-02-17 Thread Jeff Kohut
Sent from my tablet.
On Feb 17, 2015 7:22 AM, "Rainer Jung"  wrote:
>
> Am 14.02.2015 um 18:44 schrieb Jeff Kohut:
>
>> Sent from Google Nexus Phone
>> On Feb 14, 2015 9:54 AM, "Rainer Jung"  wrote:
>>>
>>>
>>> Am 14.02.2015 um 12:46 schrieb Jeff Kohut:
>>>
 On Fri, Feb 13, 2015 at 10:29 AM, Christopher Schultz <
 ch...@christopherschultz.net> wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA256
>
> Jeff,
>
> On 2/13/15 10:28 AM, Jeff Kohut wrote:
>>
>>
>> I am running Tomcat  7.0.54 on a Windows 2008 R1 with SP1
>> platform.
>>
>> I would like to control the contents of what gets logged to the
>> Tomcat localhost_access_log
>>
>> specifically , I would like to remove logging of entries like :
>>
>> 10.239.54.8 - - [13/Feb/2015:00:00:07 -0600] "GET /atb HTTP/1.0"
>> 200 573 10.239.58.29 - - [13/Feb/2015:00:00:08 -0600] "GET /atb
>> HTTP/1.0" 200 561
>>
>> we have some external load balancers and server monitoring
>> software periodically hitting the application web page to see if it
>> is responding. I would like to know how remove these entries to
>> reduce the amount of "noise" that is in the  localhost_access_log
>> log file, but allow other entries (i.e. from OTHER IP addresses or
>> with other functions like "POST" or other strings like "HTTP/1.1"
>>
>> I have examined the information at the below link (unfortunately
>> there is no example there with detail on what I am attempting to
>> do).
>>
>> http://tomcat.apache.org/tomcat-7.0-doc/config/valve.html
>>
>> Seems like I want to use the valve Access Log Valve Attributes:
>>
>> conditionIf
>>
>> or
>>
>> conditionUnless
>>
>> options from valve documentation, but it is not clear to me how to
>> do this (if this is the correct way ?).
>
>
>
> Yep, this is what you are looking for.
>
>> Server.xml currently has the following setup configuration:
>>
>>  > className="org.apache.catalina.valves.AccessLogValve"
>> directory="logs" prefix="localhost_access_log." suffix=".txt"
>> pattern="%h %l %u %t "%r" %s %b" />
>>
>> Is it possible to do this without programming (i.e. can I set the
>> valve components to simply filter on an ip address or key word
>> string (i.e. "Get /atb HTTP/1.0" and if that value is found in the
>> request, can I chose to then NOT write that entry to the
>> AccessLogValve). I have searched pretty thoroughly for some time on
>> how to do this, but the documentation simply does not provide
>> enough of an example on how to do this. I am not a programmer, but
>> would think that filtering entries out of logs based on criteria
>> would be a valuable feature to have.
>
>
>
> You have to have a way to set (or not) a request attribute in order to
> use conditionIf/conditionUnless. One way to do it without writing any
> of your own code is to use url-rewrite, which is more like
> url-do-whatever:
> http://tuckey.org/urlrewrite/
>
> You can configure that to set request attributes under certain
> criteria. Just have it set (or not) whatever attribute name you use
> for your conditional logging and you should be good to go.
>
> Hope that helps,
> - -chris
>

 Chris, Looks a bit complicated (but then I guess life is a bit
>>
>> complicated

 ;-) I was hoping for something built in. In looking at the explanation
>>
>> and

 a little at the support websites, it looks as if this is something to
 rewrite what makes it to the actual webapps applications. I did not see
 where it was used to be able to filter out the main tomcat access logs
>>
>> (i.e

 being able to control something so early as the Request and built in
>>
>> Tomcat

 logging), but I guess it may be possible to do that. I will look into
>>
>> this

 further if I have the time. As Andre pointed out in a follow up post, I
 could just filter the access log into another file externally and do my
 cleanup that way.
 Thank you for taking the time to answer and provide something to look
>>
>> into

 further.
>>>
>>>
>>>
>>> I basically agree with André. And the URL rewrite filter is a nice and
>>
>> powerful tool that's useful to learn about, although it can't be easily
>> integrated into a webapp from the outside (not moving it into the webapp
>> itself).
>>>
>>>
>>> If it happens that between your load balancer and Tomcat there is
already
>>
>> an Apache web server and the forwarding from Apache to Tomcat is done by
>> mod_jk, then you can set Tomcat request attributes from mod_jk by using
>> JkSetEnv. You would use a RewriteRule probably with a RewriteCond to set
an
>> Apache environment variable for the requests that come from the LB, then
>> use JkEnvVar to forward that variable,

Re-enabling SSLv3

2015-02-17 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

All,

There have been some questions lately about how to re-enable SSLv3 on
Tomcat and I just went through the trouble of trying to get it to work
in my own environment for some protocol testing.

While there were a few bugs fixed over the past few months in Tomcat
vis-a-vis configuring which protocols should be enabled, etc., those
appear to be completely fixed.

But, when I first tried, I could not get Tomcat to use SSLv3. I tried
a few silly changes to configuration and nothing helped. It seems
Tomcat isn't the problem.

It turns out that Oracle has disabled SSLv3 in both Java 7 (in 7u75)
and Java 8 (in 8u31), and you have to do some work to re-enable it.

Java 7 release notes containing an explanation:
http://www.oracle.com/technetwork/java/javase/7u76-relnotes-2389087.html

Java 8 release notes containing an explanation:
http://www.oracle.com/technetwork/java/javase/8u31-relnotes-2389094.html

The tl;dr is that if you create a java.security.properties file, you
can override the system configuration of this setting. First, create a
file that contains only the following:

=== CUT ===
jdk.tls.disabledAlgorithms=true
=== CUT ===

Now, add this to your CATALINA_OPTS (or other JVM invocation):

  -Djava.security.properties=/path/to/above/file

Now, you'll be able to use SSLv3 again. But, of course, you shouldn't
be using it, so why would you?

Also remember that the disabling of SSLv3 is for both server and
client sockets, so if you want to connect to a server using SSLv3,
you'll need to use the same trick to allow the /client/ to use SSLv3
as well as the server.

This is the part that confused me, because, since I was using a Java
client, my observations were that neither the JSSE-based nor the
OpenSSL-based connectors would "work" with SSLv3. The problem of
course was the client. Once I got that sorted, I was able to connect
to both.

To drive-home the point: SSLv3 works without any of the foolishness
above if you are using the APR connector, because OpenSSL hasn't
disabled SSLv3 in general. Your OpenSSL provider (Linux distribution,
etc.) may determine that SSLv3 should be disabled, but that's another
matter.

Hope that helps,
- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJU47PxAAoJEBzwKT+lPKRYD0QP/RSb8dcULSPGXKfAdLdaDcjP
ZG7Cc336fMt56N0+87DSS7U1BxeDBDNNq16Yrbmp9lQc2npmkyddkVhIXWVYr/o4
pq6NB0eIpZC1kly+uBdqS0PdSe8QdxNjz+Lb4HTkrxwt7gtuDrZ6mzb1Ll50jPds
QdSCu5ffnrEPngQE7FPIpkuASzLqSiJpfsZAyByTOtdkZUw1jM/sN1CV+GmlxTbl
DHPxhp0n9EQvrsk7e5+ID2g5YOIlFHMMvP58d6CPHbtAZJubMg8arnuhYUGa7Jn2
dfn6po8azlHq4G63SRFGzfAQ7F/yFUEZ5kOfSbQirUm03yiSsjVvM3pJ0z52opuC
QVGA/N9HQ+gSF8m9VmINOPj3J1hXV5zqD6SAaUndBWq5KH+22CLBPsqLZkevf/H8
3F2TemW+Wg06hP3cyH3XovPV6Wu5f5jp9OXqZseZCWZT5nJFWqmFoyRC89zQFzC+
AfhM3WyMhpVaziBCCP2RZC1HL6b9iiEHjbCl269rpTq4ZK+CNGMKL0lzvltgHqwX
kknsUWalPV4T6TJ+dgbL6+/HeDO1PMQO/16sjxNQvgKboRHgYCy5Cm5zB747HJSZ
tl8kBdRs0/pUmGtVVtuWl6DG2H8TrmeaumZX0OLkIeaZUhiHKsPZTHc0KH6KkCD9
8NGlmr14pSW0ARa7VkxO
=RTpS
-END PGP SIGNATURE-

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



Re: Issue with RewriteValve and folders (tomcat 8.0.15)

2015-02-17 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Jérémie,

On 2/17/15 10:47 AM, Jérémie Barthés wrote:
> I don't have more to say than :
> 
> "There is a bug using the RewriteValve :If you are targeting a
> folder and there is no "/" at the end of the URI,

The end of which URI? The one in the rewrite rule? Or the one the
client sends in the URL?

> the rewritten URI is visible for the client browser (302
> redirection). Example : http://myhost.com/myFolder =>
> http://myhost.com/rewriteTrick/myFolder/ instead of 
> http://myhost.com/myFolder => http://myhost.com/myFolder/";

It looks like in this case, the rewrite rule isn't matching, and the
DefaultServlet is performing redirection instead. This sounds like a
configuration mistake on your part, not a bug in the rewrite valve.

> The bug is solved for me. I just wanted to tell developers about
> it.

- -chris

> Le 17/02/2015 15:34, Christopher Schultz a écrit : Jérémie,
> 
> On 2/17/15 6:20 AM, Jérémie Barthés wrote:
 I just installed tomcat 8 and used the RewriteValve to
 forward some old URLs on my new tomcat8 webapp. I had an
 issue for URIs targeting a folder: If there is no "/" at the
 end of the URI, the rewritten URI is visible for the client
 browser (302 redirection). Example :
 http://myhost.com/myFolder => 
 http://myhost.com/rewriteTrick/myFolder/ instead of 
 http://myhost.com/myFolder => http://myhost.com/myFolder/
 
 I made a custom patch on RewriteValve to solve it. I would
 like to know if it'll be corrected on next releases. (i tried
 on 8.0.18 but there is still the issue)
 
 Regards,
 
 Jeremie Barthes Oodrive France
 
 
 
 Between lines 480 and 500 :
 
 boolean folderRedirect = false; try{ 
 request.getMappingData().recycle();
 
 request.getConnector().getService().getMapper().map(request.getCoyoteRequest().serverName(),



>
 
request.getCoyoteRequest().requestURI(),
 null, request.getMappingData());
 
 if(request.getMappingData().redirectPath.toString()!=null){ 
 folderRedirect = true; } } catch (Exception e){ //ignore }
 
 request.getMappingData().recycle(); // Reinvoke the whole
 request recursively try {
 
 request.getConnector().getProtocolHandler().getAdapter().service

 
(request.getCoyoteRequest(), response.getCoyoteResponse());
 if(folderRedirect && response.getCoyoteResponse().getStatus()
 == 302){
 
 if(!request.getCoyoteRequest().requestURI().getByteChunk().toString().endsWith("/")){



 
String requestParam = request.getQueryString() == null ? "" : '?'
 + request.getQueryString(); response.setHeader("Location", 
 request.getCoyoteRequest().requestURI().getByteChunk().toString()
 + '/' + requestParam); } } } catch (Exception e) { // This
 doesn't actually happen in the Catalina adapter
 implementation }
> The best practice would be to file an enhancement request in
> Bugzilla, write and attach a test case that demonstrates the
> problem (or describe it in very great detail... from the above, I
> don't know what you have changed and why), and attach your changes
> (as a patch, using "svn diff" or something similar) to the Bugzilla
> issue.
> 
> -chris
>> 
>> -
>>
>> 
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail: users-h...@tomcat.apache.org
>> 
> 
> 
> -
>
> 
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 
-BEGIN PGP SIGNATURE-
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJU44rQAAoJEBzwKT+lPKRYLwEQAJgAdh33TnTRbkRtBfugTc5D
8VwtHftAfL6ykdbGTYllInSfhxZkWH3fA7gxqBb18TaICqw0sxAVg1TaKIjtEwYb
TQzxryNJQsg1fJ97L56EauRJyKikO0OTE7XUT8S5TIr/Z0YuhfQzIOKA+KvzyiUE
rDbJ4N4TA41fvgA7aCdeQluDGJ/sOnFVotq5sSp6j41XSCAfWXrg8r+FlVegPJm8
fblHS3E19PTvv/IuJaNDPefafpdLoyiMYnfPgC8MKYbfipUCJLyl30ZTjiBw2Jmi
9SGqPFkk9y2Yk72R5ihL1dExb332nBwV7xZIVJsyDysKWW2OYI/XY7BYwSW8rguA
05hdEetI1UFgWavh6imqzWoDpOV35Pi+crYB+ZUDeDHfHCxjhvyxlXhXFtp6QkB+
yODHW4qXA4QPjsSNG+I6letaDA2lvxDNlzjip/iSsjEfwOMj6E6vnqkW7oD92YxF
lcNaqI9weDDJwaJZUrra3dxqR4VYj0WcmHsUY/+uqQhh083KKPhpJ6r54xL9Dv4N
1vFdJIRelhX2YxlXTUS5Jx/vhEHGS5P95un92tdP46WyOS9s3Jkutigt5E4I9AaG
v9AdGlDZwah9q8sJ00U1tqGdkMwRdY12KHtY9loWRY1T7Gn3pAzPIcNSvvCR8OE2
uCigdMtsLsOMvqIPz5Mh
=xqs9
-END PGP SIGNATURE-

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



Re: Would Tomcat for UNIX (Solaris) also work on Linux

2015-02-17 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Vijay,

On 2/17/15 11:31 AM, Vijay Kumar wrote:
> Would Tomcat for UNIX (Solaris) also work on Linux, or does Apache
> have separate binaries for UNIX and Linux?

Tomcat only ships compiled .class files for *NIX, so they are
perfectly usable on Linux. The .sh scripts work out of the box.

The only missing component is the optional Tomcat native library[1],
which you'd have to compile yourself if you wanted to use it. That
library compiles cleanly on Linux with a standard toolchain.

Many of us use Tomcat on Linux all the time, myself included. You can
get any package you want -- except the .exe installers of course -- I
prefer the .tar.gz package.

Hope that helps,
- -chris

[1] http://tomcat.apache.org/native-doc/
-BEGIN PGP SIGNATURE-
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJU44pAAAoJEBzwKT+lPKRYD4IQAL+RITU7arpyyqQJhYbqaJGF
xpwg1i1cs/eciuQxjDimZJ4xG7UPxQLFqzF8smk0JZq3fM5dCwnbp2wyN1fyBovJ
QIppt84kmq+h8YdYSFIg5BCC9pKLNUfghpFi3kSziqJmG/kRF0qu2eaSO1ZtjfTW
D31nfqjxc8Vuu0CTuL0/4pk3h8EYDYl1wG1pI96oylZrnysLrMxki3/iDhnfHeLC
DeqIRamj/frGhNgWQDrthOkIJoClFp+IT0+EkqsekRXqas7imv1NgU6cMrN5eSju
tB4BBtvURiGm3XlN96EFh7sht7DUriQ0mn0Y8f5v2/XYHrc2rlGF2ZrBeC9tbFO0
C2cIiP2DDBwoXjjh2wLWyVVbQ+sruwxYexEYSv5wPd1pGAg9+52uOuVjqcOkUh74
I/8/yikwSWNpgU0+l1EUlrRhOl89dAk4mPeJoj5NCT8QN/yCaoOpDO6iAcngzwkh
NlhFsQG48G4TLcYIqa84r5RclDSE/8AjtokKCnbx/CJjG9Kz/SsbEwOHUiGNJd99
JFxpdMWiOaJ1zpPfOBe+Cksi+6VOju5/LNaFv/7BHwR8UVa9xMq4/5EwrgsJR9iE
55+Kbc3Bo5odjmXEAjkc+P5PyQc7gjwccTRyqHOH6XDSCnxANjyKteiDxtZKOd26
WsZs2o1wuP4X/rq5/jxM
=05p/
-END PGP SIGNATURE-

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



Would Tomcat for UNIX (Solaris) also work on Linux

2015-02-17 Thread Vijay Kumar
Hi All,

Would Tomcat for UNIX (Solaris) also work on Linux, or does Apache have
separate binaries for UNIX and Linux?


Thanks,

Vijay G


Re: login issue

2015-02-17 Thread James McEvoy
Checked logs, added admin and manager to all needed files and added url so
it's ok for tomcat to use and still rejected when Logging in.
Stumped. I started and stopped it etc.

On Tuesday, February 17, 2015, James McEvoy 
wrote:

> Ok if will check all
>
> On Tuesday, February 17, 2015, John D. Ament  > wrote:
>
>> Check your logs for why.  Don't forget to include the manager-gui role in
>> the list of roles.
>>
>> John
>>
>> On Tue Feb 17 2015 at 8:15:45 AM James McEvoy 
>> wrote:
>>
>> > ok it wont take the shutdown command.
>> >
>> > On Tue, Feb 17, 2015 at 6:59 AM, James McEvoy > >
>> > wrote:
>> >
>> > > couldnt screenshot so i just copied and pasted.
>> > >
>> > > 
>> > > 
>> > > 
>> > >   
>> > >   
>> > >   
>> > >   
>> > >   
>> > > 
>> > >
>> > >
>> >
>>
>


Re: Issue with RewriteValve and folders (tomcat 8.0.15)

2015-02-17 Thread Jérémie Barthés

Hi,

I don't have more to say than :

"There is a bug using the RewriteValve :If you are targeting a folder and there is no 
"/" at the end of the URI,
the rewritten URI is visible for the client browser (302 redirection).
Example :
http://myhost.com/myFolder => http://myhost.com/rewriteTrick/myFolder/
instead of
http://myhost.com/myFolder => http://myhost.com/myFolder/";


The bug is solved for me.
I just wanted to tell developpers about it.

Regards

Jérémie


Le 17/02/2015 15:34, Christopher Schultz a écrit :

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Jérémie,

On 2/17/15 6:20 AM, Jérémie Barthés wrote:

I just installed tomcat 8 and used the RewriteValve to forward some
old URLs on my new tomcat8 webapp. I had an issue for URIs
targeting a folder: If there is no "/" at the end of the URI, the
rewritten URI is visible for the client browser (302 redirection).
Example : http://myhost.com/myFolder =>
http://myhost.com/rewriteTrick/myFolder/ instead of
http://myhost.com/myFolder => http://myhost.com/myFolder/

I made a custom patch on RewriteValve to solve it. I would like to
know if it'll be corrected on next releases. (i tried on 8.0.18 but
there is still the issue)

Regards,

Jeremie Barthes Oodrive France



Between lines 480 and 500 :

boolean folderRedirect = false; try{
request.getMappingData().recycle();

request.getConnector().getService().getMapper().map(request.getCoyoteRequest().serverName(),



request.getCoyoteRequest().requestURI(),

null, request.getMappingData());

if(request.getMappingData().redirectPath.toString()!=null){
folderRedirect = true; } } catch (Exception e){ //ignore }

request.getMappingData().recycle(); // Reinvoke the whole request
recursively try {

request.getConnector().getProtocolHandler().getAdapter().service
(request.getCoyoteRequest(), response.getCoyoteResponse());
if(folderRedirect && response.getCoyoteResponse().getStatus() ==
302){

if(!request.getCoyoteRequest().requestURI().getByteChunk().toString().endsWith("/")){

  String requestParam = request.getQueryString() == null ? "" : '?'
+ request.getQueryString(); response.setHeader("Location",
request.getCoyoteRequest().requestURI().getByteChunk().toString() +
'/' + requestParam); } } } catch (Exception e) { // This doesn't
actually happen in the Catalina adapter implementation }

The best practice would be to file an enhancement request in Bugzilla,
write and attach a test case that demonstrates the problem (or
describe it in very great detail... from the above, I don't know what
you have changed and why), and attach your changes (as a patch, using
"svn diff" or something similar) to the Bugzilla issue.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJU41FiAAoJEBzwKT+lPKRYJVwP/0txV+MSHwzl4FQjRWd2gaOS
V+l0b7CIXI77lHr+xuC6A/OqqpJHNPZjYWIqtCaeDvq/eFc8eVXczV8C6CV1NWN5
b9dQdBTw4/+bC/JNg2XlWkwlbeW08eNqeX77F1zXhSoBEUuZrRcmy/sZXsa4g9x8
XusQqrjpjc5KvZOkUqJbazbKO86o7kRrOuVNVXR0MHtpmBMOkCI0WKht+RpsA3DN
fH0Qd+eo0xtmU0YNSMURr6Z8y+yi3v/pNx4tBQ5ijEAHXB8f9SolfObt63OrcTh3
I347ZIEESfkeqxqBqImJkeRsqvlx2pv2ChF0fm638vgiYFXU+a4xYLP45ovR0wg6
c4P0GYK3mE2yieQjio3zAj/Z9Qc4DW39FJNIeU1zYY+73yzkn28CprW6nn9eaRvf
cz+vaU2IamD/e4vJgHpiB5vewwaZSx1a81OkpDn8O7xWyO4azp4eViA2K5jwM2Cf
LL7/fztfJoapob+polncNECb3Bi3aT/yKeI9tbunb7x8jCHqIBWtGrvKJ0U5q25U
XzH1Wk6EZCtYhiYXQvyPoktKmXfDuayMiq+IexdMBic+I/Uqv5scQuFrjEZVlFj+
hSNd9OpPQwXKL7ScFAyznw6R4h5yzPZyW01KtO1jVek1oOOdIRI7PxLRgJReh6j0
78GINeUMF8NCRkYY4/sf
=zX1T
-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: Issue with RewriteValve and folders (tomcat 8.0.15)

2015-02-17 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Jérémie,

On 2/17/15 6:20 AM, Jérémie Barthés wrote:
> I just installed tomcat 8 and used the RewriteValve to forward some
> old URLs on my new tomcat8 webapp. I had an issue for URIs
> targeting a folder: If there is no "/" at the end of the URI, the
> rewritten URI is visible for the client browser (302 redirection). 
> Example : http://myhost.com/myFolder =>
> http://myhost.com/rewriteTrick/myFolder/ instead of 
> http://myhost.com/myFolder => http://myhost.com/myFolder/
> 
> I made a custom patch on RewriteValve to solve it. I would like to
> know if it'll be corrected on next releases. (i tried on 8.0.18 but
> there is still the issue)
> 
> Regards,
> 
> Jeremie Barthes Oodrive France
> 
> 
> 
> Between lines 480 and 500 :
> 
> boolean folderRedirect = false; try{ 
> request.getMappingData().recycle();
> 
> request.getConnector().getService().getMapper().map(request.getCoyoteRequest().serverName(),
>
> 
request.getCoyoteRequest().requestURI(),
> null, request.getMappingData());
> 
> if(request.getMappingData().redirectPath.toString()!=null){ 
> folderRedirect = true; } } catch (Exception e){ //ignore }
> 
> request.getMappingData().recycle(); // Reinvoke the whole request
> recursively try {
> 
> request.getConnector().getProtocolHandler().getAdapter().service 
> (request.getCoyoteRequest(), response.getCoyoteResponse()); 
> if(folderRedirect && response.getCoyoteResponse().getStatus() ==
> 302){
> 
> if(!request.getCoyoteRequest().requestURI().getByteChunk().toString().endsWith("/")){
>
>  String requestParam = request.getQueryString() == null ? "" : '?'
> + request.getQueryString(); response.setHeader("Location", 
> request.getCoyoteRequest().requestURI().getByteChunk().toString() +
> '/' + requestParam); } } } catch (Exception e) { // This doesn't
> actually happen in the Catalina adapter implementation }

The best practice would be to file an enhancement request in Bugzilla,
write and attach a test case that demonstrates the problem (or
describe it in very great detail... from the above, I don't know what
you have changed and why), and attach your changes (as a patch, using
"svn diff" or something similar) to the Bugzilla issue.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJU41FiAAoJEBzwKT+lPKRYJVwP/0txV+MSHwzl4FQjRWd2gaOS
V+l0b7CIXI77lHr+xuC6A/OqqpJHNPZjYWIqtCaeDvq/eFc8eVXczV8C6CV1NWN5
b9dQdBTw4/+bC/JNg2XlWkwlbeW08eNqeX77F1zXhSoBEUuZrRcmy/sZXsa4g9x8
XusQqrjpjc5KvZOkUqJbazbKO86o7kRrOuVNVXR0MHtpmBMOkCI0WKht+RpsA3DN
fH0Qd+eo0xtmU0YNSMURr6Z8y+yi3v/pNx4tBQ5ijEAHXB8f9SolfObt63OrcTh3
I347ZIEESfkeqxqBqImJkeRsqvlx2pv2ChF0fm638vgiYFXU+a4xYLP45ovR0wg6
c4P0GYK3mE2yieQjio3zAj/Z9Qc4DW39FJNIeU1zYY+73yzkn28CprW6nn9eaRvf
cz+vaU2IamD/e4vJgHpiB5vewwaZSx1a81OkpDn8O7xWyO4azp4eViA2K5jwM2Cf
LL7/fztfJoapob+polncNECb3Bi3aT/yKeI9tbunb7x8jCHqIBWtGrvKJ0U5q25U
XzH1Wk6EZCtYhiYXQvyPoktKmXfDuayMiq+IexdMBic+I/Uqv5scQuFrjEZVlFj+
hSNd9OpPQwXKL7ScFAyznw6R4h5yzPZyW01KtO1jVek1oOOdIRI7PxLRgJReh6j0
78GINeUMF8NCRkYY4/sf
=zX1T
-END PGP SIGNATURE-

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



Re: Given password did not match password used to create the PooledConnection when there is no change in password

2015-02-17 Thread Vinoth Raja
Hi Chris,

Yes. I could test with "tomcat-dbcp" library. There is issue in calling
getConnection with correct password.
"I store encrypted password and decrypt the password before calling
getConnection."encrypted password was used to create connection when there
is more requests"
variable "password" was declared as global variable in ConnectionManager
class.Hence the encrypted value is updated before calling getConnection
when there is more request"

Thanks for the advice!

Thanks
Vinoth

On Mon, Feb 16, 2015 at 12:27 AM, Vinoth Raja  wrote:

> Hi,
>
> I have downloaded tomcat source but couldn't find this dbcp package under
> "org.apache.tomcat".
>
> I have figured out when it happens.
>
> I have a class "ConnectionManager" which is called to get the connection
> object.
>
> It is singleton class and I call the below method to get the object
> public static ConnectionManager getInstance() {
>
> if (objConnectionManager == null)
> objConnectionManager = new ConnectionManager();
>
> return objConnectionManager;
> }
>
>
> Here is the method which is called to get the connection object and return
> it
>
> // This is original method to get DataSource.
> public Connection getDataSource(String dnis) {
>
> Connection connection = null;
> if (!initialized)
> createContext();
> try {
> .
>   objDataSource = (DataSource)
> envContext.lookup(dataSourceName);
> try {
> connection = objDataSource.getConnection(userName, password);
> } catch (SQLException e) {
> objLogger.error("[" + ucid + "]"
> + "SQLException in connection manager: "
> + e.getMessage());
> }
>
> } catch (NamingException e) {
> objLogger.info("[" + ucid + "]"
> + "NamingException in connection manager: "
> + e.getMessage());
> e.printStackTrace();
> }
> return connection;
> }
>
> This issue happens when this class is accessed through singleton object.
> It doesn't happen when do one of the following:
> 1) make the method as synchronized.
> or
> 2) remove singleton and initialize an object for every request for
> ConnectionManager.
>
> I could reproduce it by keeping two datasource and sending simultaneous
> request to both the datasource using singleton ConnectionManager.
>
> Please advice what could be the reason.
> I have verified the SQL log when this incident happens it throws Login
> failed for user "". Reason: "Password didn't match that for login provided".
>
> Please advice whether singleton object can't be used when using multiple
> datasources.
>
> Thanks
> Vinoth
>
> On Thu, Feb 12, 2015 at 12:09 AM, Christopher Schultz <
> ch...@christopherschultz.net> wrote:
>
>> -BEGIN PGP SIGNED MESSAGE-
>> Hash: SHA256
>>
>> Vinoth,
>>
>> On 2/10/15 10:03 PM, Vinoth Raja wrote:
>> > Thanks for the quick response.
>> >
>> > Please find the stack trace. This happens when there is more
>> > requests. I could reproduce it by loading more concurrent request
>> > All datasources called with same username/password. 4 datasources
>> > are called at a time by 4 different application.
>>
>> This is a little confusing:
>>
>> > INFO: Stopping ProtocolHandler ["ajp-bio-8009"]
>> > ionFilterChain.java:208) at
>> >
>> org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:748)
>>
>> I
>> >
>> think something has been cut-off, here.
>>
>> > at
>> >
>> org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:486)
>> >
>> >
>> at
>> >
>> org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:411)
>> >
>> >
>> at
>> >
>> org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:338)
>> >
>> >
>> at com.avaya.sce.runtime.SCEServlet.forward(SCEServlet.java:1356)
>> > at
>> > com.avaya.sce.runtime.BasicServlet.handleRequest(BasicServlet.java:116)
>> >
>> >
>> at com.avaya.sce.runtime.AppServlet.processRequest(AppServlet.java:96)
>> > at
>> > com.avaya.sce.runtime.SCEServlet.requestHandler(SCEServlet.java:285)
>> >
>> >
>> at com.avaya.sce.runtime.SCEServlet.doGet(SCEServlet.java:182)
>> > at javax.servlet.http.HttpServlet.service(HttpServlet.java:620) at
>> > javax.servlet.http.HttpServlet.service(HttpServlet.java:727) at
>> >
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
>> >
>> >
>> at
>> >
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
>> >
>> >
>> at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
>> > at
>> >
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
>> >
>> >
>> at
>> >
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
>> >
>> >
>> at
>> >
>> org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:748)
>> >
>> >
>> at
>> >
>> org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:486)
>> >
>> >
>> at
>> >
>> org.apache.catalina.core.ApplicationDisp

Re: [OT] FileNotFoundException for existing JAR files

2015-02-17 Thread Mark H. Wood
On Fri, Feb 13, 2015 at 01:21:13PM -0500, Christopher Schultz wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA256
> 
> Mark,
> 
> On 2/13/15 1:02 PM, Mark H. Wood wrote:
> > On Fri, Feb 13, 2015 at 11:46:37AM -0500, Christopher Schultz
> > wrote:
> >> -BEGIN PGP SIGNED MESSAGE- Hash: SHA256
> >> 
> >> Alexander,
> >> 
> >> On 2/12/15 2:26 PM, Alexander Johnson wrote:
> >>> It looks like that's true.  It turns out this wasn't a
> >>> permissions issue at all.  For some reason copying the JAR
> >>> files out of the directory and back into it caused them to be
> >>> picked up (I read this in a suggestion somewhere).  Reading the
> >>> 'man' entry for cp I see that it doesn't preserve "Access
> >>> Control Lists (ACLs) and Extended Attributes (EAs), including
> >>> resource forks" unless the -p flag is set (this is on by
> >>> default when using mv).  My guess is that removing this "access
> >>> control" information somehow made the files accessible to the
> >>> tomcat7-maven-plugin.  It seems a little sketchy that I don't
> >>> really know the root cause of the problem, but I'm happy that
> >>> it's now fixed.
> >> 
> >> Aah, yes: the ACL. That's one of those super-fun *NIX-isms that
> >> can ruin your day.
> >> 
> >> $ ls -l
> >> 
> >> - -rwxrwxrwx chris chris   100 a_file
> >> 
> >> $ cat a_file
> >> 
> >> cat: a_file: Permission denied
> >> 
> >> *grumble*
> >> 
> >> The best part is that 'ls' doesn't show you there is a problem,
> >> at least not directly. Everyone always forgets about the other
> >> commands.
> > 
> > The 'ls' that comes as part of Gnu Coreutils will, when built that 
> > way, add a "+" to the mask to show that there is an ACL on the 
> > object.  (But that's all it does -- I still have to remember to
> > use 'getfacl' to see what the ACL actually *says*.)
> 
> Yep.
> 
> - From Alexander's previous message, it did not seem like 'ls' was
> notifying him about the presence of the acl. I checked the
> gnu-coreutils man pages and info pages, and neither mention ACLs. Can
> you give me a reference for the "+" thing?

coreutils.info v8.21, section 10.1.2: "What information is listed".
About 52% down the page: "[f]ollowing the file mode bits is a singe
character that specifies whether an alternate access method such as an
access control list applies to the file."  You could just search for
"alternate access method".

-- 
Mark H. Wood
Lead Technology Analyst

University Library
Indiana University - Purdue University Indianapolis
755 W. Michigan Street
Indianapolis, IN 46202
317-274-0749
www.ulib.iupui.edu


signature.asc
Description: Digital signature


Re: login issue

2015-02-17 Thread James McEvoy
Ok if will check all

On Tuesday, February 17, 2015, John D. Ament  wrote:

> Check your logs for why.  Don't forget to include the manager-gui role in
> the list of roles.
>
> John
>
> On Tue Feb 17 2015 at 8:15:45 AM James McEvoy  >
> wrote:
>
> > ok it wont take the shutdown command.
> >
> > On Tue, Feb 17, 2015 at 6:59 AM, James McEvoy  >
> > wrote:
> >
> > > couldnt screenshot so i just copied and pasted.
> > >
> > > 
> > > 
> > > 
> > >   
> > >   
> > >   
> > >   
> > >   
> > > 
> > >
> > >
> >
>


Re: Tomcat Access Logging Valve ?

2015-02-17 Thread Rainer Jung

Am 14.02.2015 um 18:44 schrieb Jeff Kohut:

Sent from Google Nexus Phone
On Feb 14, 2015 9:54 AM, "Rainer Jung"  wrote:


Am 14.02.2015 um 12:46 schrieb Jeff Kohut:


On Fri, Feb 13, 2015 at 10:29 AM, Christopher Schultz <
ch...@christopherschultz.net> wrote:


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Jeff,

On 2/13/15 10:28 AM, Jeff Kohut wrote:


I am running Tomcat  7.0.54 on a Windows 2008 R1 with SP1
platform.

I would like to control the contents of what gets logged to the
Tomcat localhost_access_log

specifically , I would like to remove logging of entries like :

10.239.54.8 - - [13/Feb/2015:00:00:07 -0600] "GET /atb HTTP/1.0"
200 573 10.239.58.29 - - [13/Feb/2015:00:00:08 -0600] "GET /atb
HTTP/1.0" 200 561

we have some external load balancers and server monitoring
software periodically hitting the application web page to see if it
is responding. I would like to know how remove these entries to
reduce the amount of "noise" that is in the  localhost_access_log
log file, but allow other entries (i.e. from OTHER IP addresses or
with other functions like "POST" or other strings like "HTTP/1.1"

I have examined the information at the below link (unfortunately
there is no example there with detail on what I am attempting to
do).

http://tomcat.apache.org/tomcat-7.0-doc/config/valve.html

Seems like I want to use the valve Access Log Valve Attributes:

conditionIf

or

conditionUnless

options from valve documentation, but it is not clear to me how to
do this (if this is the correct way ?).



Yep, this is what you are looking for.


Server.xml currently has the following setup configuration:

 

Is it possible to do this without programming (i.e. can I set the
valve components to simply filter on an ip address or key word
string (i.e. "Get /atb HTTP/1.0" and if that value is found in the
request, can I chose to then NOT write that entry to the
AccessLogValve). I have searched pretty thoroughly for some time on
how to do this, but the documentation simply does not provide
enough of an example on how to do this. I am not a programmer, but
would think that filtering entries out of logs based on criteria
would be a valuable feature to have.



You have to have a way to set (or not) a request attribute in order to
use conditionIf/conditionUnless. One way to do it without writing any
of your own code is to use url-rewrite, which is more like
url-do-whatever:
http://tuckey.org/urlrewrite/

You can configure that to set request attributes under certain
criteria. Just have it set (or not) whatever attribute name you use
for your conditional logging and you should be good to go.

Hope that helps,
- -chris



Chris, Looks a bit complicated (but then I guess life is a bit

complicated

;-) I was hoping for something built in. In looking at the explanation

and

a little at the support websites, it looks as if this is something to
rewrite what makes it to the actual webapps applications. I did not see
where it was used to be able to filter out the main tomcat access logs

(i.e

being able to control something so early as the Request and built in

Tomcat

logging), but I guess it may be possible to do that. I will look into

this

further if I have the time. As Andre pointed out in a follow up post, I
could just filter the access log into another file externally and do my
cleanup that way.
Thank you for taking the time to answer and provide something to look

into

further.



I basically agree with André. And the URL rewrite filter is a nice and

powerful tool that's useful to learn about, although it can't be easily
integrated into a webapp from the outside (not moving it into the webapp
itself).


If it happens that between your load balancer and Tomcat there is already

an Apache web server and the forwarding from Apache to Tomcat is done by
mod_jk, then you can set Tomcat request attributes from mod_jk by using
JkSetEnv. You would use a RewriteRule probably with a RewriteCond to set an
Apache environment variable for the requests that come from the LB, then
use JkEnvVar to forward that variable, then use the conditionUnless for the
Tomcat access log valve to suppress those requests. Using a seconds
AccessLogValve with conditionIf would let you log those requests to a
second log file.


I'm not saying that I would inject a new Apache/mod_jk into the picture

just for that feature. But if it were already there ...


Regards,

Rainer


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


All good thoughts, but no Apache.  If it can't be done in Tomcat, I will
likely just live without.


Triggered by another post today: Starting with Tomcat 8 there's the 
RewriteValve:


http://tomcat.apache.org/tomcat-8.0-doc/rewrite.html

And that is able to set request attributes via configuration. Look for 
"ENV" and "environment variable" because the RewriteValve was modelled 
aft

Re: login issue

2015-02-17 Thread John D. Ament
Check your logs for why.  Don't forget to include the manager-gui role in
the list of roles.

John

On Tue Feb 17 2015 at 8:15:45 AM James McEvoy 
wrote:

> ok it wont take the shutdown command.
>
> On Tue, Feb 17, 2015 at 6:59 AM, James McEvoy 
> wrote:
>
> > couldnt screenshot so i just copied and pasted.
> >
> > 
> > 
> > 
> >   
> >   
> >   
> >   
> >   
> > 
> >
> >
>


Re: login issue

2015-02-17 Thread James McEvoy
ok it wont take the shutdown command.

On Tue, Feb 17, 2015 at 6:59 AM, James McEvoy 
wrote:

> couldnt screenshot so i just copied and pasted.
>
> 
> 
> 
>   
>   
>   
>   
>   
> 
>
>


Re: login issue

2015-02-17 Thread James McEvoy
  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.
-->

  
  
  
  
  



On Tue, Feb 17, 2015 at 6:59 AM, James McEvoy 
wrote:

> couldnt screenshot so i just copied and pasted.
>
> 
> 
> 
>   
>   
>   
>   
>   
> 
>
>


Re: login issue

2015-02-17 Thread John D. Ament
And also make sure you bounce tomcat after updating the tomcat-users.xml
file.  It is not read dynamically, it is read on start up.

John

On Tue Feb 17 2015 at 7:23:34 AM Mark Thomas  wrote:

> On 17/02/2015 12:17, James McEvoy wrote:
> > Mark
> > I did that one before and it didn't work either. I even tried admin-gui
>
> The manager-gui role isn't in the file you quoted below. It should be.
> Add it and then show us the new version of the file.
>
> Did you restart Tomcat after you edited tomcat-users.xml?
>
> If it still doesn't work, provide the full URL you are trying to access
> and the full text of any response you receive.
>
> Mark
>
> >
> >
> > On Tuesday, February 17, 2015, Mark Thomas  wrote:
> >
> >> On 17/02/2015 11:59, James McEvoy wrote:
> >>> couldnt screenshot so i just copied and pasted.
> >>
> >> No user has the manager-gui role.
> >>
> >> 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: login issue

2015-02-17 Thread Mark Thomas
On 17/02/2015 12:17, James McEvoy wrote:
> Mark
> I did that one before and it didn't work either. I even tried admin-gui

The manager-gui role isn't in the file you quoted below. It should be.
Add it and then show us the new version of the file.

Did you restart Tomcat after you edited tomcat-users.xml?

If it still doesn't work, provide the full URL you are trying to access
and the full text of any response you receive.

Mark

> 
> 
> On Tuesday, February 17, 2015, Mark Thomas  wrote:
> 
>> On 17/02/2015 11:59, James McEvoy wrote:
>>> couldnt screenshot so i just copied and pasted.
>>
>> No user has the manager-gui role.
>>
>> 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: login issue

2015-02-17 Thread James McEvoy
Mark
I did that one before and it didn't work either. I even tried admin-gui


On Tuesday, February 17, 2015, Mark Thomas  wrote:

> On 17/02/2015 11:59, James McEvoy wrote:
> > couldnt screenshot so i just copied and pasted.
>
> No user has the manager-gui role.
>
> Mark
>
>
> >
> > 
> > 
> > 
> >   
> >   
> >   
> >   
> >   
> > 
> >
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org 
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 
>
>


Re: login issue

2015-02-17 Thread Mark Thomas
On 17/02/2015 11:59, James McEvoy wrote:
> couldnt screenshot so i just copied and pasted.

No user has the manager-gui role.

Mark


> 
> 
> 
> 
>   
>   
>   
>   
>   
> 
> 


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



login issue

2015-02-17 Thread James McEvoy
couldnt screenshot so i just copied and pasted.




  
  
  
  
  



Re: Login issues

2015-02-17 Thread James McEvoy
Yes I took out the xml markers. I will show next what I put.

On Tuesday, February 17, 2015, Mark Thomas  wrote:

> On 17/02/2015 01:26, James McEvoy wrote:
> > The usernames and passwords. I took out the note section that it advised
> > to. Nothing more.
>
> There is no advice to remove the note section. The note is advice to
> remove the XML comment markers around the user and role definitions.
>
> 99% of login problems are caused by folks not setting up
> tomcat-users.xml correctly. When some asks to see the contents of the
> file that is exactly what they mean. Mask out passwords and provide the
> *full* contents of the file.
>
> Mark
>
> >
> > On Monday, February 16, 2015, John D. Ament  > wrote:
> >
> >> What are the contents of your tomcat-users.xml?
> >>
> >> On Mon Feb 16 2015 at 8:03:33 PM James McEvoy  
> >> >
> >> wrote:
> >>
> >>> hi
> >>> I've read every document I can and still after following all the steps
> it
> >>> will not authenticate me to the login manager. I am using tomcat7.
> >>> Thanks
> >>> James
> >>>
> >>
> >
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org 
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 
>
>


Re: data source problem

2015-02-17 Thread Yaragalla Muralidhar
Ok. Thank you.

*Thanks and Regards,*
Muralidhar Yaragalla.

*http://yaragalla.blogspot.in/ *

On Tue, Feb 17, 2015 at 2:32 PM, André Warnier  wrote:

> Hi.
>
> Yaragalla Muralidhar wrote:
>
>> I have configured the datasource in serverhome/conf/context.xml but when i
>> am hosting my web app the servers conf/context.xml is not available so i
>> have copied context.xml into META-INF folder of web app but still i get
>> the
>> message like datasource info not found. how can i solve this?
>>
>>
> I do not know how to resolve that.  But I can tell you how you could
> improve your chances of getting help here.
>
> In case you have not noticed, this is the Tomcat Users list, not Twitter
> or Facebook.
> So here, it helps if you think somewhat before firing off whatever comes
> to your fingers.
> First, read this : http://www.catb.org/esr/faqs/smart-questions.html
> It helps, in a general sense.
>
> Then, read the Tomcat on-line documentation, here :
> http://tomcat.apache.org/
> (I would point you to the appropriate version, but unfortunately you do
> not provide any useful information about that either)
> Start with this : http://wiki.apache.org/tomcat/FAQ
> and read the first few lines, they have useful recommendations.
> Then maybe search for "database" and "application deployment" ?  (there
> are even some examples there).
>
> The general idea is this : First, read the appropriate documentation to
> see how you are *supposed* to do this.  Then, if it does not work, make an
> effort at finding out why, using the available on-line resources.
> Then, if you still need help from this list, provide some *useful and
> precise* information about what you have tried, with what version of
> Tomcat, on which platform, according to what documentation.  And when it
> does not work, instead of mentioning a "message like..", copy the real
> message from the real logfile.
> All of that would immensely increase your chances of getting help quickly
> on this list.
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Issue with RewriteValve and folders (tomcat 8.0.15)

2015-02-17 Thread Jérémie Barthés


Hi,

I just installed tomcat 8 and used the RewriteValve to forward some old
URLs on my new tomcat8 webapp. I had an issue for URIs targeting a
folder: If there is no "/" at the end of the URI, the rewritten URI is
visible for the client browser (302 redirection).
Example :
http://myhost.com/myFolder => http://myhost.com/rewriteTrick/myFolder/
instead of
http://myhost.com/myFolder => http://myhost.com/myFolder/

I made a custom patch on RewriteValve to solve it. I would like to know if 
it'll be corrected on next releases. (i tried on 8.0.18 but there is still the 
issue)

Regards,

Jeremie Barthes
Oodrive France



Between lines 480 and 500 :

  boolean folderRedirect = false;
try{
request.getMappingData().recycle();

request.getConnector().getService().getMapper().map(request.getCoyoteRequest().serverName(),
 request.getCoyoteRequest().requestURI(),
null, request.getMappingData());

if(request.getMappingData().redirectPath.toString()!=null){
folderRedirect = true;
}
} catch (Exception e){
//ignore
}

request.getMappingData().recycle();
// Reinvoke the whole request recursively
try {

request.getConnector().getProtocolHandler().getAdapter().service
(request.getCoyoteRequest(), 
response.getCoyoteResponse());

if(folderRedirect && response.getCoyoteResponse().getStatus() == 302){


if(!request.getCoyoteRequest().requestURI().getByteChunk().toString().endsWith("/")){
String requestParam = request.getQueryString() == 
null ? "" : '?' + request.getQueryString();
response.setHeader("Location", 
request.getCoyoteRequest().requestURI().getByteChunk().toString() + '/' + requestParam);
}
}
} catch (Exception e) {
// This doesn't actually happen in the Catalina adapter 
implementation
}

 







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



Re: Login issues

2015-02-17 Thread Mark Thomas
On 17/02/2015 01:26, James McEvoy wrote:
> The usernames and passwords. I took out the note section that it advised
> to. Nothing more.

There is no advice to remove the note section. The note is advice to
remove the XML comment markers around the user and role definitions.

99% of login problems are caused by folks not setting up
tomcat-users.xml correctly. When some asks to see the contents of the
file that is exactly what they mean. Mask out passwords and provide the
*full* contents of the file.

Mark

> 
> On Monday, February 16, 2015, John D. Ament  wrote:
> 
>> What are the contents of your tomcat-users.xml?
>>
>> On Mon Feb 16 2015 at 8:03:33 PM James McEvoy > >
>> wrote:
>>
>>> hi
>>> I've read every document I can and still after following all the steps it
>>> will not authenticate me to the login manager. I am using tomcat7.
>>> Thanks
>>> James
>>>
>>
> 


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



Re: data source problem

2015-02-17 Thread André Warnier

Hi.

Yaragalla Muralidhar wrote:

I have configured the datasource in serverhome/conf/context.xml but when i
am hosting my web app the servers conf/context.xml is not available so i
have copied context.xml into META-INF folder of web app but still i get the
message like datasource info not found. how can i solve this?



I do not know how to resolve that.  But I can tell you how you could improve your chances 
of getting help here.


In case you have not noticed, this is the Tomcat Users list, not Twitter or 
Facebook.
So here, it helps if you think somewhat before firing off whatever comes to 
your fingers.
First, read this : http://www.catb.org/esr/faqs/smart-questions.html
It helps, in a general sense.

Then, read the Tomcat on-line documentation, here : http://tomcat.apache.org/
(I would point you to the appropriate version, but unfortunately you do not provide any 
useful information about that either)

Start with this : http://wiki.apache.org/tomcat/FAQ
and read the first few lines, they have useful recommendations.
Then maybe search for "database" and "application deployment" ?  (there are even some 
examples there).


The general idea is this : First, read the appropriate documentation to see how you are 
*supposed* to do this.  Then, if it does not work, make an effort at finding out why, 
using the available on-line resources.
Then, if you still need help from this list, provide some *useful and precise* information 
about what you have tried, with what version of Tomcat, on which platform, according to 
what documentation.  And when it does not work, instead of mentioning a "message like..", 
copy the real message from the real logfile.

All of that would immensely increase your chances of getting help quickly on 
this list.


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



data source problem

2015-02-17 Thread Yaragalla Muralidhar
I have configured the datasource in serverhome/conf/context.xml but when i
am hosting my web app the servers conf/context.xml is not available so i
have copied context.xml into META-INF folder of web app but still i get the
message like datasource info not found. how can i solve this?


*Thanks and Regards,*
Muralidhar Yaragalla.

*http://yaragalla.blogspot.in/ *