JNDI bind in embedded Tomcat for "java:app"

2022-01-26 Thread Thomas Rohde
Hello Tomcat users!

I'm using an embedded Tomcat (9.0.54) with Spring Boot.

I have to execute some legacy code of an Java EE application which uses local 
EJBs an makes JNDI look for "java:app/foo/bar". Now I want to create an 
instance as Spring Bean an register it in the JNDI context. But Tomcat only 
registers objects in path "java:comp/env", if I use 
context.getNamingResources().addResource() by overwriting 
TomcatServletWebServerFactory.postProcessContext(ctx).

Is there a supported solution for registering objects in "java:app"?

I have a workaround with context.bind("java:app/foo/bar") during application 
startup but I need to do some dirty things to make the context writable. I 
think this is neither a good nor a long term solution.

Any ideas or hints for a better approach?

Thanks!

Regards,
Thomas


AW: AW: Logging web applications with log4j 1.2

2019-02-21 Thread Thomas Rohde
Hi Chris,

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA256
> 
> Thomas,
> 
> On 2/21/19 07:20, Thomas Rohde wrote:
> > Hi Chris,
> > 
> > -Ursprüngliche Nachricht- Von: Christopher Schultz 
> > [mailto:ch...@christopherschultz.net] Gesendet: Mittwoch, 20.
> > Februar 2019 16:41 An: users@tomcat.apache.org Betreff: Re: Logging 
> > web applications with log4j 1.2
> > 
> >>> -BEGIN PGP SIGNED MESSAGE- Hash: SHA256
> >>> 
> >>> Thomas,
> >>> 
> >>> On 2/20/19 08:00, Thomas Rohde wrote:
> >>>> I've some basic questions regarding the usage of log4j 1.2 in 
> >>>> Tomcat 8.5.
> >>>> 
> >>>> We are running more than one web application in Tomcat. Each  
> >>>> application uses log4j via slf4j and ships the log4j.jar in
> >>>> 
> >>> WEB-INF/lib. The Tomcat itself uses JULI.
> >>> 
> >>> We are using a common log4j.xml file for configuration.
> >>> 
> >>> The file path is set as system property in CATALINA_OPTS as
> >>> follows: -Dlog4j.configuration=/path/to/file/log4j.xml
> >>> 
> >>> 1. Is this a valid setup or are there any side effects in 
> >>> initialization log4j by the different WebAppClassLoaders?
> >> 
> >> You are not using classpath-based config-file-loading, so it should 
> >> not be a problem[*].
> >> 
> >>> 2. We are observing weird things in rolling the files hourly.
> >>> The timestamp of the log messages doesn't fit to the timestamp 
> >>> suffix of the file. Why does this happen?
> >> 
> >> Possibly conflicting time zones, somewhere? Because log4j.jar is in 
> >> each application's class loader, they CAN have different in-memory 
> >> configurations.
> > No there are no different time zones in use.
> 
> That's what I figured. I've never see anything quite like you describe. I 
> could imagine that the JVM has one time zone but the shell is using another.
> 
> For example, if the JVM is convinced that the time zone is UTC but when you 
> are logged-into the server, your shell has TZ=America/Los_Angeles, then 
> you'll see a ~9 hour difference between file timestamps and the filenames. 
> Like this:
> 
> $ ls -l logs/
> 
> - -rw-r--r--   12345 Feb 19 16:01 log4j.log.2019-02-18
> - -rw-r--r--   12345 Feb 20 16:00 log4j.log.2019-02-19
> - -rw-r--r--   12345 Feb 21 16:01 log4j.log.2019-02-20
> 
> Note how each filename has the name you'd expect, but the timestamp looks a 
> little odd. If you look into each file, you'd see that e.g. in the 2019-02-19 
> file, the timestamps go from 2019-02-19T00:00:00 through 2019-02-19T23:59:59 
> but it looks like the file was rotated 8 hours earlier. That's because it was 
> rotated at 00:00 (PST) as reckoned by the JVM, but at 16:01 in UTC.
> 
> My recommendation would be to set all of your timezones to the same thing. 
> UTC makes the most sense to me, but that's just my opinion.
> Theoretically, all timestamps are interchangeable, right?

Thank you for the hint. We will check that!

> 
> >> [*] While this will work, why would you ever want multiple 
> >> applications to have their logging configuration all tied together? 
> >> Why not separate the logging configuration into one config-per web 
> >> application? OR are you trying to unify all logging into the same 
> >> file(s )?
> > Yes I would like to do that, but I'm not sure how to achieve it 
> > without putting the log4j.xml into the WAR file. Do you have any hint?
> I can think of several ways, but it depends upon how your application 
> initializes log4j.
> 
> If you specify where the configuration file is, directly, then you can either 
> change that to somewhere else, or you can replace that filename with a 
> parameter that you can set in web.xml -- say, in an . You *are* 
> configuring log4j in a ServletContextInitializer, right?
> 
> If you just do "new PropertyConfigurator()" (like I do), then it will search 
> the parent ClassLoader and that's it. In that case, you'll have to arrange 
> for the log4j.properties file to be present, there. Placing it in the WAR 
> file is an option. Another option would be to put the file elsewhere, but 
> then modify the Tomcat configuration to add another directory to the 
> ClassLoader, like this:
> 
> 
>   
>webAppMount="/"
> base="/path/to/app-specific-log-dir"
> cl

AW: Logging web applications with log4j 1.2

2019-02-21 Thread Thomas Rohde
Hi Chris,

-Ursprüngliche Nachricht-
Von: Christopher Schultz [mailto:ch...@christopherschultz.net] 
Gesendet: Mittwoch, 20. Februar 2019 16:41
An: users@tomcat.apache.org
Betreff: Re: Logging web applications with log4j 1.2

> > -BEGIN PGP SIGNED MESSAGE-
> > Hash: SHA256
> > 
> > Thomas,
> > 
> > On 2/20/19 08:00, Thomas Rohde wrote:
> > > I've some basic questions regarding the usage of log4j 1.2 in Tomcat 
> > > 8.5.
> > > 
> > > We are running more than one web application in Tomcat. Each 
> > > application uses log4j via slf4j and ships the log4j.jar in 
> > WEB-INF/lib. The Tomcat itself uses JULI.
> > 
> > We are using a common log4j.xml file for configuration.
> > 
> > The file path is set as system property in CATALINA_OPTS as
> > follows: -Dlog4j.configuration=/path/to/file/log4j.xml
> > 
> > 1. Is this a valid setup or are there any side effects in 
> > initialization log4j by the different WebAppClassLoaders?
> 
> You are not using classpath-based config-file-loading, so it should not be a 
> problem[*].
> 
> > 2. We are observing weird things in rolling the files hourly. The 
> > timestamp of the log messages doesn't fit to the timestamp suffix of 
> > the file. Why does this happen?
> 
> Possibly conflicting time zones, somewhere? Because log4j.jar is in each 
> application's class loader, they CAN have different in-memory configurations.
No there are no different time zones in use.

> 
> [*] While this will work, why would you ever want multiple applications to 
> have their logging configuration all tied together?
> Why not separate the logging configuration into one config-per web 
> application? OR are you trying to unify all logging into the same file(s )?
Yes I would like to do that, but I'm not sure how to achieve it without putting 
the log4j.xml into the WAR file. Do you have any hint?

> 
> - -chris
> -BEGIN PGP SIGNATURE-
> Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/
> 
> iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlxtdSUACgkQHPApP6U8
> pFhxow//T+5ALVYJcljqLxykHND7ZSy9NHf0+a+jnWzlDO5S6oO+bxjso9raJZYC
> jUG4nhBwuAtD5MWyS04t0UedYUBP+n1iw4aAGs7PrhFgPxLiHZpMOTBBaeDSYgny
> bI+7GuqOhkiauPA8Jb6guE8SkrT18d9X+k7xzy6puYgqbTws0iwk2yEmSV+KNtXy
> 0EsVC20KGhU9pCdD7MLSpYX8PaM8sctazxSSVMygL9Ed03WKkJ6BRPavq4ao1uGg
> V0ZlTQb7f9PRPOXOQzoAlsaWNTCVRKQES82/HHJE/uJG5tg7jnQ5Syjs53FyfVwH
> 0AtfNpJiOI4LES5ejR7E5JZ8Lx0/J41XwsPO5hOmYaiHHs35EFtozCETNNwjYxcb
> 245z++YsBw0bnBDRpAFi5Kq5UL8ludo0CqDTfKQSIqrMoNHoiULm4U3niGl2P01w
> O8k2KrwqtYWu77esh+TpJpXTTaLnEhCc+YWFGWnER3w8WAOHitvjbmAi21gL3NIG
> 3PJEFEdrNMaoI2h3SkK+DJzuVVJRmXRMV2wduX4+3qGW6l31Jo3ihFiDDdXyGB+b
> jtpU1JHYfYP+ck8mEXgOvI6RXZEG7R8Ef7ectYuKdhRRpE+S9wx1llZminsxY/fr
> 0apA+L6paBo9R7EGxJVt237wx/L+tRnfF5raLZoAJrkks7SkWgE=
> =sjai
> -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



Logging web applications with log4j 1.2

2019-02-20 Thread Thomas Rohde
Hi!

I've some basic questions regarding the usage of log4j 1.2 in Tomcat 8.5.

We are running more than one web application in Tomcat. Each application uses 
log4j via slf4j and ships the log4j.jar in WEB-INF/lib. The Tomcat itself uses 
JULI.

We are using a common log4j.xml file for configuration.

The file path is set as system property in CATALINA_OPTS as follows:
-Dlog4j.configuration=/path/to/file/log4j.xml

1. Is this a valid setup or are there any side effects in initialization log4j 
by the different WebAppClassLoaders?

2. We are observing weird things in rolling the files hourly. The timestamp of 
the log messages doesn't fit to the timestamp suffix of the file. Why does this 
happen?

Regards,
Thomas



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



AW: Catalina.out not updating

2018-03-06 Thread Thomas Rohde
Hi Akhilesh,

 
have you checked your file system permissions? Has the Tomcat runtime user the 
permissions to write into the log directory?

 
Regards,

Thomas

 
BTW: Tomcat 6 ist end of life since 31 December 2016 
(https://tomcat.apache.org/tomcat-60-eol.html). Please consider upgrading to 
Tomcat 9.

 
Von: Akhilesh ET [mailto:akhilesh...@itcinfotech.com] 
Gesendet: Dienstag, 6. März 2018 13:31
An: users@tomcat.apache.org
Betreff: Catalina.out not updating

 
Hi All,

 
We are facing a situation wherein one of our production servers running tomcat 
6.0.18 is unable to generate logs after service startup. Logging just stops 
after service start up.

 

 
The setup is such a way that the control flows from a Apache Webserver to Jboss 
application server to Tomcat server. The tomcat server will connect to the 
external API URLs and logs should be generated for the same which is not 
working from past one week.

 
Just to give you an insight we are using source code based tomcat server and 
not rpm based. So the service startup is done using startup.sh script.

 
We tried swapping the IP of the server with the one that was working with no 
luck (The status was reversed with the server with same IP still not working). 
Which means there is something to do with the IP which is causing that issue 
(our assumption). 

 
Please let me know what else needs to checked in order to make this working. 
The application itself is working fine. However the issue is with only the log 
generation which is very critical for tracking the application.

 
Details of troubleshooting done so far : 

 
1.   Cleared the logs, restarted the service – No luck.

2.   Cleared the cache of the server and restarted the service – No luck.

3.   Rebooted the server multiple times – No Luck.

4.   Tried starting tomcat from different web root and upgrading java  – No 
Luck.

5.   Gave full permissions to tomcat folder and log files – No Luck

 
Thanks & Regards

Akhilesh.E.T

ITC Infotech India Ltd.,

ITC Infotech Park, #18 Banaswadi Main Road, Bangalore - 560005

 
 
Disclaimer: This communication is for the exclusive use of the intended 
recipient(s) and shall not attach any liability on the originator or ITC 
Infotech India Ltd./its Holding company/ its Subsidiaries/ its Group Companies. 
If you are the addressee, the contents of this e-mail are intended for your use 
only and it shall not be forwarded to any third party, without first obtaining 
written authorization from the originator or ITC Infotech India Ltd./ its 
Holding company/its Subsidiaries/ its Group Companies. It may contain 
information which is confidential and legally privileged and the same shall not 
be used or dealt with by any third party in any manner whatsoever without the 
specific consent of ITC Infotech India Ltd./ its Holding company/ its 
Subsidiaries/ its Group Companies.

 


RE: AW: File and directory permissions on Tomcat 8.5 tar archive

2017-11-24 Thread Thomas Rohde
Chris,



-Original message-
From: Christopher Schultz 
Sent: Friday 24th November 2017 14:46
To: users@tomcat.apache.org
Subject: Re: AW: File and directory permissions on Tomcat 8.5 tar archive


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Thomas,

On 11/24/17 8:39 AM, Thomas Rohde wrote:
> 
> 
> -Ursprüngliche Nachricht- Von: Christopher Schultz
> [mailto:ch...@christopherschultz.net] Gesendet: Freitag, 24.
> November 2017 14:21 An: users@tomcat.apache.org Betreff: Re: File
> and directory permissions on Tomcat 8.5 tar archive
> 
> Rune,
> 
> On 11/24/17 7:53 AM, Rune Rustand wrote:
>> Apache Tomcat 8.5.23 Redhat Enterprise Linux 7.4 
>> (3.10.0-693.1.1.el7.x86_64)
> 
> 
> 
>> Binary distributions tar archive
> 
>> We are upgrading our servers from Tomcat 8.0 to Tomcat 8.5, and
>> are using the core archive. The process is done by running a
>> puppet script that extracts the tar archive on all the servers
>> (many).
> 
>> Are there any reasons why the file and directory permissions
>> differ from the tar archive and the zip archive?
> 
> Good question. Evidently, both Info-Zip (the 'unzip' program
> usually found on *NIX-based systems) and Apache Ant understand the
> Info-Zip-specified extension to the ZIP format that encodes file
> permissions and both ought to respect them when both packing and
> unpacking the archive[1].
> 
> I don't know enough about the ZIP file format to be able to inspect
> the archive to determine what's actually stored in there (to
> determine if the archive lacks the permissions or if the extraction
> process is at fault).
> 
>> When I unpack the tar archive the permissions on files and
>> directories are not set for all users.
> 
>> I unpack the archive like this: tar zxvpf
>> apache-tomcat-8.5.23.tar.gz
> 
>> [snip]
> 
>> For the zip file: unzip apache-tomcat-8.5.23.zip
> 
>> [snip]
> 
> Hmm. Those definitely *should be* producing the same file
> permissions... at least, I'd expect them to produce the same file
> permissions.
> 
> I don't see any (missing) options to Apache ant's  task that
> look like they would strip those file permissions. I also don't see
> any options for (Info-Zip) unzip that would be required to restore
> such permissions.
> 
> IMHO, this should Just Work.
> 
> -chris
> 
> [1] https://en.wikipedia.org/wiki/Zip_(file_format)#Implementation
> 
> -
>
> 
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 
> 
> While turning around the same issue this week I compared a
> apache-tomcat-8.5.14.tar.gz and an apache-tomcat-8.0.17.tar.gz.
> 
> The permissions differ.
> 
> With 8.0.17 files have rw-r--r-- and with 8.5.14 files have
> rw-r-
> 
> With 8.0.17 directories (e.g. webapps) have rwxr-xr-x and with
> 8.5.14 they have rwxr-x---
> 
> This means others have no permissions in current Tomcat versions by
> default.
> 
> I found that in the changelog of 8.5.0: Tighten up the default file
> permissions for the .tar.gz distribution so no files or directories
> are world readable by default. Configure Tomcat to run with a
> default umask of 0027 which may be overridden by setting UMASK in
> setenv.sh. (markt)
> 
> So I think it works like expected.

This is a comparison of file permissions coming from tar archives
versus *zip* archives, not a comparison of file permissions coming
from (only) tar archives from two different Tomcat versions.

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

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAloYIo4ACgkQHPApP6U8
pFgo3hAAyjUnW8j885CPWUwffUCN++QWoRTP4qU/nV4X4P0SDrV6OZ7AN0g/ELGU
klUqT6XRSaosHdxleVo4GKrP8vDg21XlezCsAZ6KclRvrtrGZ8yK0Toh+6Z4eyMc
BReM/mqaiIeVhsq3BL8+gwpaYNsAxI68QGdLvYRe+wZ+AdZUXtPPQjrECC4fjFly
kabmYuU37anAHOvMtGTPQWeqzLO0zPeA9GlIixKSknlzLedJ4ZkfBSOc8mBcaEcV
aR08cHQyJyh/411p8o7gaWmZPR7cvUqN1/qgTd7E1ehJPhPiIi4Dz5CUD7Kw9Fa2
hzxxh9IBuJxc4ftGchltbKLZpoT9648Bt1zD3tzyAgZq0CMX3sibl7CM3v/NxxCc
HYIImq9WrJlUNYactium9auDqfFNAJSW9WzTjCBWtwipcOMuW0kaCcQdJheQ6M3E
/qUQ/M+A0aUgBxhZbuLy8R4Fx/wjReaSWg4pxMp9ZMwj+9XV32RlStz87vtuuww7
bosj9u4+weYpnfSnaUFrTSATFpJSus7bxzFw/nTY4+CsHiUwDt0pEAGVW/QNkCzX
kgEKWEmMpzfSjQkj4/rvXTLu2aaLQrlVLcHHeADHkDt+rtUUp9h/EykNo2YaD3ca
/gucCVnTU/6+doyiXLRyAjawVc9rYMeZ+N1RK1wbxgI/yGvtqqk=
=XB2B
-END PGP SIGNATURE-

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

AW: File and directory permissions on Tomcat 8.5 tar archive

2017-11-24 Thread Thomas Rohde


-Ursprüngliche Nachricht-
Von: Christopher Schultz [mailto:ch...@christopherschultz.net] 
Gesendet: Freitag, 24. November 2017 14:21
An: users@tomcat.apache.org
Betreff: Re: File and directory permissions on Tomcat 8.5 tar archive

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Rune,

On 11/24/17 7:53 AM, Rune Rustand wrote:
> Apache Tomcat 8.5.23 Redhat Enterprise Linux 7.4
> (3.10.0-693.1.1.el7.x86_64)
> 
> 
> 
> Binary distributions tar archive
> 
> We are upgrading our servers from Tomcat 8.0 to Tomcat 8.5, and are 
> using the core archive. The process is done by running a puppet script 
> that extracts the tar archive on all the servers (many).
> 
> Are there any reasons why the file and directory permissions differ 
> from the tar archive and the zip archive?

Good question. Evidently, both Info-Zip (the 'unzip' program usually found on 
*NIX-based systems) and Apache Ant understand the Info-Zip-specified extension 
to the ZIP format that encodes file permissions and both ought to respect them 
when both packing and unpacking the archive[1].

I don't know enough about the ZIP file format to be able to inspect the archive 
to determine what's actually stored in there (to determine if the archive lacks 
the permissions or if the extraction process is at fault).

> When I unpack the tar archive the permissions on files and directories 
> are not set for all users.
> 
> I unpack the archive like this: tar zxvpf apache-tomcat-8.5.23.tar.gz
> 
> [snip]
> 
> For the zip file: unzip apache-tomcat-8.5.23.zip
> 
> [snip]

Hmm. Those definitely *should be* producing the same file permissions... at 
least, I'd expect them to produce the same file permissions.

I don't see any (missing) options to Apache ant's  task that look like 
they would strip those file permissions. I also don't see any options for 
(Info-Zip) unzip that would be required to restore such permissions.

IMHO, this should Just Work.

- -chris

[1] https://en.wikipedia.org/wiki/Zip_(file_format)#Implementation
-BEGIN PGP SIGNATURE-
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAloYHLMACgkQHPApP6U8
pFhIohAAmCj7pZufx9VexFHy7vl16HOdnQZ07swJ5kT4zuK29Ajv+l734Lykx0xT
YGpOmjc+lYW9B8Ewz/VaqzGuH485lWK8hMNtYzv/e4nytFvI6C4D2umm/GQwefy+
3YihUZPg0VPtw7mROYAHMYDtuPwUFbCi9Qs9rmAil+79+DIYE+RcKOuX6Da7Qbm1
xB85hHX0x2WaPbOOZh6FUcYzekMW1Nw07ggxIP7GknnnR+cWQlRo+MMufIFChCXN
f0iMGN5JEkkBuFH6j0s1IYgzxUH75pa3mqIA1T5nAv0B2VRELDCBs23MOah83w6K
eghMXT3eD3ti88HD7YcrC8dUzQczpNAbxsRNx5a0G2GNUVdb1u3oa/J8qUzFQrFT
5Aay5XlJgH7MYJOJxDezUojax2e372zniVaKMjhq9qKBeLoBYdCqHO/bfpkzYK9i
JARpc9PVczyQYXWpcjHvlvT3OF9MSlzVZbrqdIqNHYU5lH9rhSIp9O+bRkXQpluU
uEp2EeLk6rXtUdamKooW63RD1CDNjUjpXT/Hb2WrSYDrWu8gN7/1YpuNKo1nlILS
aet4dePuM/6Bd1Vs1oIi21YdKvwS2lQnr/XbKjqCwe/4qAJelHRDArHFp40cLlMv
B23azWYuu6kqr8aUMSXjplNTk5/i9mkYcVCUzJkN01ZZCTvPqwo=
=Rk3D
-END PGP SIGNATURE-

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


While turning around the same issue this week I compared a 
apache-tomcat-8.5.14.tar.gz and an apache-tomcat-8.0.17.tar.gz.

The permissions differ.

With 8.0.17 files have rw-r--r-- and with 8.5.14 files have rw-r-

With 8.0.17 directories (e.g. webapps) have rwxr-xr-x and with 8.5.14 they have 
rwxr-x---

This means others have no permissions in current Tomcat versions by default.

I found that in the changelog of 8.5.0:
Tighten up the default file permissions for the .tar.gz distribution so no 
files or directories are world readable by default. Configure Tomcat to run 
with a default umask of 0027 which may be overridden by setting UMASK in 
setenv.sh. (markt)

So I think it works like expected.

Regards
Thomas



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



AW: Brand new to Tomcat

2015-06-16 Thread Thomas Rohde
Hi Larry,

of course you can add several Connector elements in server.xml. But notice that 
the value of the port attribute (not proxyPort) must be unique. Otherwise the 
second connector cannot be established at Tomcat startup.

Regards
Thomas


-Ursprüngliche Nachricht-
Von: Cohen, Laurence [mailto:lco...@novetta.com] 
Gesendet: Dienstag, 16. Juni 2015 17:33
An: users@tomcat.apache.org
Betreff: Brand new to Tomcat

Hi,

I find myself in a position where I am the only system administrator on a 
project that uses tomcat appserver and apache webeserver with a postgres 
backend.  We have two applications, and before and changeover from mod_ssl to 
mod_nss we were able to go over port 80 to grab files out of the database.  The 
web app in question is listening on port 8007, but proxied on 443.  After we 
switch to mod_nss, something happened with the configuration or the Rewrite 
Rules, where we can not longer use port 80, although port 443 is working fine.

In server.xml I can see the following connector line:

  

My first question is, can I add another connector line, proxying to port 80 as 
so:

 

Thanks,

Larry Cohen


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



AW: Tomcat minor upgrade

2015-03-10 Thread Thomas Rohde


-Ursprüngliche Nachricht-
Von: Rajesh Cherukuri [mailto:rajec...@gmail.com] 
Gesendet: Dienstag, 10. März 2015 12:43
An: Tomcat Users List
Betreff: Re: Tomcat minor upgrade

Thanks Thomas

 so it is just that we need to update the newer version of file's  that
shows in the link you provided   correct ? or  do we need any more changes
to libraries

On Tue, Mar 10, 2015 at 4:59 PM, Thomas Rohde  wrote:

> -Ursprüngliche Nachricht-
> Von: Rajesh Cherukuri [mailto:rajec...@gmail.com]
> Gesendet: Dienstag, 10. März 2015 12:01
> An: Tomcat Users List
> Betreff: Tomcat minor upgrade
>
> hi
>
> can some one help me how to do the tomcat minor upgrade from 7.0.39 to
> 7.0.59
>
>
> Hi Rajesh,
>
> check Tomcat migration guide:
> http://tomcat.apache.org/migration-7.html#Upgrading_7.0.x
>
> Regards
> Thomas
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>

No you have to update the complete tomcat. On the website you can see changes 
in configuration files between minor versions of tomcat. Please ensure that  
any changes in the configuration files such as new attributes and changes to 
defaults are applied as part of the upgrade.

Regards,
Thomas




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



AW: Tomcat minor upgrade

2015-03-10 Thread Thomas Rohde
-Ursprüngliche Nachricht-
Von: Rajesh Cherukuri [mailto:rajec...@gmail.com] 
Gesendet: Dienstag, 10. März 2015 12:01
An: Tomcat Users List
Betreff: Tomcat minor upgrade

hi

can some one help me how to do the tomcat minor upgrade from 7.0.39 to
7.0.59


Hi Rajesh,

check Tomcat migration guide: 
http://tomcat.apache.org/migration-7.html#Upgrading_7.0.x

Regards
Thomas



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




Re: very basic question about apache and tomcat

2012-09-19 Thread Thomas Rohde


Am 19.09.2012 23:31, schrieb Mead, Jen L:

Hi Everybody,

Now I will show my real ignorance about what I know after NOT working with 
Apache or Tomcat for several years now.  I have been working on a project that 
allows our CGI web pages to authenticate users from their windows desktop 
against Windows AD and not requiring any kind of unix account.  I am slowly 
getting the information I need to move forward but information is just not out 
there to get.  I am just chipping away at it.

My basic question is: do I need to install apache as well as tomcat to have an 
httpd.conf file?  I have tomcat running on several AIX servers, 6.1 and 5.3, 
with tomcat 7.0.27 installed.  I was doing a simple search to find the 
httpd.conf file when I realized none of my servers have it installed.  When I 
try to find out which app creates it I get the answer apache (from google 
searches).  So I guess that tomcat is a subset of apache?  A virtual java app I 
suppose?  See I told you the questions were basic.  Yikes it is hard to 
understand as a newbie, especially when I can load tomcat and get web pages 
working in a few minutes.  LOL

Any help is appreciated in regard to helping me wrap my brain around this.  ARGH

Regards,
Jen

Jen L Mead | Sys Admin | ICC Operations | Con-way | Office 503-450-8641
SAFETY| LEADERSHIP | INTEGRITY | COMMITMENT | EXCELLENCE | Driven by Integrity





Hi Jen,

basic answer:

Apache HTTPD and Apache Tomcat have generally nothing in common. They 
are totally different.


The httpd.conf is the main configuration file for the Apache HTTPD 
Webserver. It comes with the installation of an Apache HTTPD Webserver 
and is located in /conf/httpd.conf. Tomcat neither 
generates nor reads this file.


Bye
Thomas

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



AW: Manager activeSessions and customized error page

2012-05-14 Thread Thomas Rohde
-Ursprüngliche Nachricht-
Von:Mark Thomas 
Gesendet:   Mo 14.05.2012 18:25
Betreff:Re: AW: Manager activeSessions and customized error page
An: Tomcat Users List ; 
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> On 14/05/2012 16:58, Christopher Schultz wrote:
> > Thomas,
> > 
> > On 5/14/12 9:44 AM, Thomas Rohde  wrote:
> >> A Filter was my first approach. But the filter is invoked after 
> >> authentication has taken place. And for authentication a session 
> >> is needed. ;-)
> > 
> > Right: the form authenticator is in a Valve and Valves run before
> > Filters.
> > 
> >> A HttpSessionListener is invoked AFTER a session is created.
> > 
> > Hrm.
> > 
> >> It seems that every approach has some ugly pitfalls. :(
> > 
> > Agreed. Perhaps a different exception type could be used? We are
> > using IllegalStateException but there's no particular reason a
> > different subclass of RuntimeException couldn't be used in this
> > case: something that could then be mapped in web.xml using
> > .
> > 
> > Since it would technically be a change to the API to throw
> > something other than IllegalStateException, you might get some
> > push-back on a solution like this.

There it is: https://issues.apache.org/bugzilla/show_bug.cgi?id=53230

> 
> A change to a new sub-class of IllegalStateException shouldn't break
> anything.
> 
> Mark
> 
> > 
> > Please file a bug in bugzilla and we'll hash it out over there.
> > 
> > -chris
> > 
> > -
> >
> > 
> 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.4.9 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
> 
> iQIcBAEBAgAGBQJPsTIDAAoJEBDAHFovYFnnjYEP/ibbVSvXy1T22zHo/ZPeDuOJ
> p/AwNGgyafsv/FExSDFVTWiRJNPRpImaVmVnc9JzRj7DQJC1xjQzp0SsCYh9Gu58
> ZGyz6U9psDZYbSW6cfNToVdbgJZWEdBXo5jb0s/kU1GHqfKx1ZzwrcKCHc2OAYZ+
> XZvMNb29ouCPF7kVdFYyXZm/WVLrw5ZQ1KL60f65iIvZDaBrBCNgnhh7Fhxq2PU+
> NzRwWiGWVAPWxk1VcBxZuJQz+qsRqp22FBkaEM8A7mDBTfbJvK+rszBqPNk/YGGq
> MHRg5DysjTEWizfmRySSw9cSHtQfHq2cQxuxVMfgfMVt67BqeW+r7GB5kUNK/Dpt
> fKTFw5AkmJDXYSE0tKOgVq1eECiybSP5co/DFrtnNmVQI/AXePrJ+G8lLdC9KYV/
> UyjuT8jPl5JUTA6mKUafGCxL1RYDPFZ3KYpeu9mRDW4gMMmVIsp5xUPMZvPRyfBq
> l6O3zjYGMNtFaedcOColeJuXQTvYqiizB2fPzzJdh10Mmb8G1PMlB0cHjhO3/j/F
> kQ1W4aQxr4gipQWj0zTqrwZYTkndia0v4VqctbiYJmyHTKAeb6z/Ks9z9yya3vF9
> TnvgG+Sf0KEP7zB01MI07UDXP/IdKIyeEhhqIJJ/U4ixSHtBui9MkjfMzjE3V6lw
> SCucYHY0sZUFwRMg+Mp1
> =b/Sy
> -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



AW: Manager activeSessions and customized error page

2012-05-14 Thread Thomas Rohde
-Ursprüngliche Nachricht-
Von:Konstantin Kolinko 
Gesendet:   Mo 14.05.2012 15:00
Betreff:Re: Manager activeSessions and customized error page
An: Tomcat Users List ; 
> 2012/5/14 Thomas Rohde :
> > Hi!
> >
> > I configured the Manager's maxActiveSessions attribute in context.xml. If 
> > the 
> configured value is exceeded an IllegalStateException "createSession: Too 
> many 
> active sessions" is thrown in ManagerBase class. In our application we catch 
> this exception around httpServletRequest.getSession(true) and redirect to an 
> customized error page. Works!
> >
> > Now I activated form based authentication via securiy constraint in 
> > web.xml. 
> If I try to open the web application with my browser by sending the first 
> request, the response is empty (status 200 OK).
> >
> > Is there any way to map a static customized error page in this scenario?
> >
> 
> It depends on where ErrorReportValve is in the request processing
> chain in your situation. There were several changes to that (read:
> fixes) in different Tomcat 7.0.x versions. You did not wrote which
> version you do use.

Sorry! I tested with 7.0.8.

> 
> If it is reproducible in latest 7.0.27, feel free to create a bug
> report and attach a simple sample web application + steps to
> reproduce.
> 
> It might be that it is already reproducible with the standard example
> app [1], but I have not tried.
> 
> [1] http://localhost:8080/examples/jsp/security/protected/index.jsp

Now I tried with the standard example and 7.0.27. I get the default 500 error 
page. Would be great to have a possibiltiy to make a distinguish between this 
error and any other error.

> 
> > If not: Is there any other approach to limit the number of sessions?
> 
> I think it is possible with a Filter, Valve or with a SessionListener.
> It should be also be possible with a custom o.a.c.Manager.
> YMMV.

A Filter was my first approach. But the filter is invoked after authentication 
has taken place. And for authentication a session is needed. ;-)

A HttpSessionListener is invoked AFTER a session is created.

It seems that every approach has some ugly pitfalls. :(

> 
> Best regards,
> Konstantin Kolinko
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 
> 

Thomas

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



Manager activeSessions and customized error page

2012-05-14 Thread Thomas Rohde
Hi!

I configured the Manager's maxActiveSessions attribute in context.xml. If the 
configured value is exceeded an IllegalStateException "createSession: Too many 
active sessions" is thrown in ManagerBase class. In our application we catch 
this exception around httpServletRequest.getSession(true) and redirect to an 
customized error page. Works!

Now I activated form based authentication via securiy constraint in web.xml. If 
I try to open the web application with my browser by sending the first request, 
the response is empty (status 200 OK).

Is there any way to map a static customized error page in this scenario?

If not: Is there any other approach to limit the number of sessions?

Thanks!
Thomas

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



AW: Maximum number of sessions

2012-05-10 Thread Thomas Rohde
-Ursprüngliche Nachricht-
Von:Mark Thomas 
Gesendet:   Do 10.05.2012 15:55
Betreff:Re: Maximum number of sessions
An: Tomcat Users List ; 
> On 10/05/2012 14:45, Thomas Rohde  wrote:
> > Hi!
> > 
> > Is it possible to configure an upper limit for the number of sessions
> > in Tomcat? Thought the Context would be the right place for such a
> > configuration parameter, but I couldn't find anything like this.
> 
> It is on the Manager, not the Context. You want maxActiveSessions
> 
> Mark
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 
> 
Hi Mark!

Thats what I was looking for, thank you! I should read the documentation more 
carefully. :-)

Thomas

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



Maximum number of sessions

2012-05-10 Thread Thomas Rohde
Hi!

Is it possible to configure an upper limit for the number of sessions in 
Tomcat? Thought the Context would be the right place for such a configuration 
parameter, but I couldn't find anything like this.

Thomas

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



AW: SEVERE: Unable to start cluster.

2012-04-04 Thread Thomas Rohde
-Ursprüngliche Nachricht-
Von:Dhaval Jaiswal 
Gesendet:   Mi 04.04.2012 16:41
Betreff:SEVERE: Unable to start cluster.
An: Tomcat Users List ; 
CC: Shrinivas Devarkonda ; 
> Hi List,
> 
> Below is the error we are facing while starting tomcats.
> 
> SEVERE: Unable to start cluster.
> org.apache.catalina.tribes.ChannelException: java.net.SocketException: Not
> a multicast address; No faulty members identified.
> 
> 
> Our cluster setting is as below in server.xml
> 
> 
>   channelSendOptions="6">
>  expireSessionsOnShutdown="false"
>notifyListenersOnReplication="true" mapSendOptions="6"/>
> 
>  className="org.apache.catalina.tribes.group.GroupChannel">
>   className="org.apache.catalina.tribes.membership.McastService"
> address="192.168.3.14"
> port="45564"
> frequency="500"
> dropTime="3"/>
>   className="org.apache.catalina.tribes.transport.nio.NioReceiver"
>   address="auto"
>   port="4000"
>   selectorTimeout="5000"
>   timeout="6"
>   maxThreads="6"/>
> 
>   className="org.apache.catalina.tribes.transport.ReplicationTransmitter">
>className="org.apache.catalina.tribes.transport.nio.PooledParallelSender"
> timeout="6" keepAliveCount="0"/>
>  
>   className="org.apache.catalina.tribes.group.interceptors.TcpFailureDetector"/>
>   className="org.apache.catalina.tribes.group.interceptors.MessageDispatch15Interc
> eptor"/>
>   className="org.apache.catalina.tribes.group.interceptors.ThroughputInterceptor"/
> >
>
>   
> filter=".*\.gif|.*\.js|.*\.jpeg|.*\.jpg|.*\.png|.*\.htm|.*\.html|.*\.css|.*\.txt
> "/>
>   className="org.apache.catalina.ha.session.JvmRouteBinderValve"/>
> className="org.apache.catalina.ha.session.ClusterSessionListener"/>
> className="org.apache.catalina.ha.session.JvmRouteSessionIDBinderListener"/>
>  
> 
> 
> 
> Note: 192.168.3.14 is the IP of backup manager with java & 192.168.3.9 is
> the IP address of local tomcat where above server.xml is hosted.
> 
> Please guide us as to how to overcome the issue & please give us the sample
>  file if possible.
> 

Hi Dhaval,

you have to set a multicast ip address for the "address" attribute of the 
McastService. A multicast address looks like 224.x.x.x.

Take a look at http://en.wikipedia.org/wiki/Multicast_address for further 
details.

The Tomcat cluster uses multicast for the management of the cluster member.

Thomas

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



Re: Info on PermSize and MaxPermSize

2012-02-19 Thread Thomas Rohde

Hi Geet,

these parameters are not Tomcat specific. This are JVM parameters as 
Chuck mentioned. The parameter -XX:PermSize defines the initial size of 
the PermGen (permanent generation) of the jvm memory. -XX:MaxPermSize is 
to set the max size.


Thomas


Am 20.02.2012 04:46, schrieb Geet Chandra:

Hi All,

Please let me know,

What is the difference beween PermSize and MaxPermSize in Tomcat





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



Re: Apache Tomcat Native library

2012-01-30 Thread Thomas Rohde


Am 30.01.2012 16:26, schrieb Paul Singleton:

My standalone Tomcat 6 informs me, at startup, that

The APR based Apache Tomcat Native library which allows optimal 
performance in production environments was not found on the 
java.library.path:...


Does this library offer any benefit to standalone systems, or is it 
purely for use with Apache httpd + Tomcat?


Paul Singleton


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




Hi Paul,

APR is a native HTTP implementation (heart of the Apache HTTP Server). 
It provides a better performance for handling the http overhead in 
Tomcat's request processing.


See http://tomcat.apache.org/tomcat-7.0-doc/apr.html for more details.

If you use Apache Webserver with Tomcat you wouldn't use APR but AJP.

Thomas

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



Re: Tomcat 6 - How to make an application available at www.mydomain.com

2012-01-29 Thread Thomas Rohde
> Thomas Rohde wrote:
>>
>> That is a good point. I will change my configuration to
>>
>>JkMount /myApplication/* tomcat
>>
> Actually, you need 2 lines to cover all :
>
>  >JkMount /myApplication tomcat  # for the index ?
>  >JkMount /myApplication/* tomcat# for the rest

Yes, I've already figured that out.

>
> Or you can use the following syntax :
>
> 
>SetHandler jakarta-servlet
>...
> 

That was actually new for me. I'll try it next time. Thank you!

>
> I personally like this second form better : it fits better with the
> general Apache httpd
> configuration style, and it allows for other httpd-level things in the
> same section.
>
>
> -
> 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: Tomcat 6 - How to make an application available at www.mydomain.com

2012-01-29 Thread Thomas Rohde
> André Warnier wrote:
>> Thomas Rohde wrote:
>>>> I'm running tomcat 6 behind apache.
>>>>
>>>> I currently have an application deployed as "myApplication" and it is
>>>> available at "http://www.mydomain.com/myApplication";.
>>>>
>>>> How can I make this application available at "http://www.mydomain.com";
>>>> without deploying it as ROOT.war?
>>>>
>>>> My server is running Ubuntu 10.04.
>>>>
>>>> Thanks!
>>>>
>>>> Dean Del Ponte
>>>>
>>>
>>> You could use a rewrite rule to achieve that:
>>>
>>> RewriteEngine On
>>> RewriteRule ^/$ /myApplication/ [PT]
>>> JkMount /myApplication* tomcat
>>>
>>> Works for me very well.
>>>
>>
>> That is assuming that the OP has an Apache httpd front-end, which he
>> never said.
>
> Ooops, he did...
>
>> Also, even if he has, the above is not enough except in the simplest of
>> cases.
>> As far as I can tell also, this RewriteRule only rewrites requests to
>> "/".
>> If that is enough to make it work for you, then one could wonder why you
>> need an httpd front-end in the first place.

This is a virtual host specific configuration and so it doesn't affect the
whole apache web server.

>> Note also that the JkMount above will not only proxy "/myApplication"
>> and "/myApplication/*", but just as well "/myApplication_as_a_prefix"
>> and anything else starting with "myApplication".  This may or may not be
>> what you want, in terms of security for example.
>>
>> Chuck's recommendation is still the best.
>> The above notes already illustrate some of the reasons.
>> Let's see if the OP really has a good reason /not to/ deploy his
>> application as ROOT.
>>
>
> -
> 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: Tomcat 6 - How to make an application available at www.mydomain.com

2012-01-29 Thread Thomas Rohde
> André Warnier wrote:
>> Thomas Rohde wrote:
>>>> I'm running tomcat 6 behind apache.
>>>>
>>>> I currently have an application deployed as "myApplication" and it is
>>>> available at "http://www.mydomain.com/myApplication";.
>>>>
>>>> How can I make this application available at "http://www.mydomain.com";
>>>> without deploying it as ROOT.war?
>>>>
>>>> My server is running Ubuntu 10.04.
>>>>
>>>> Thanks!
>>>>
>>>> Dean Del Ponte
>>>>
>>>
>>> You could use a rewrite rule to achieve that:
>>>
>>> RewriteEngine On
>>> RewriteRule ^/$ /myApplication/ [PT]
>>> JkMount /myApplication* tomcat
>>>
>>> Works for me very well.
>>>
>>
>> That is assuming that the OP has an Apache httpd front-end, which he
>> never said.
>
> Ooops, he did...

Yes. ;-)

>
>> Also, even if he has, the above is not enough except in the simplest of
>> cases.
>> As far as I can tell also, this RewriteRule only rewrites requests to
>> "/".
>> If that is enough to make it work for you, then one could wonder why you
>> need an httpd front-end in the first place.
>> Note also that the JkMount above will not only proxy "/myApplication"
>> and "/myApplication/*", but just as well "/myApplication_as_a_prefix"
>> and anything else starting with "myApplication".  This may or may not be
>> what you want, in terms of security for example.

That is a good point. I will change my configuration to

   JkMount /myApplication/* tomcat

Thank you!

>>
>> Chuck's recommendation is still the best.
>> The above notes already illustrate some of the reasons.
>> Let's see if the OP really has a good reason /not to/ deploy his
>> application as ROOT.
>>
>
> -
> 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: Tomcat 6 - How to make an application available at www.mydomain.com

2012-01-29 Thread Thomas Rohde
> I'm running tomcat 6 behind apache.
>
> I currently have an application deployed as "myApplication" and it is
> available at "http://www.mydomain.com/myApplication";.
>
> How can I make this application available at "http://www.mydomain.com";
> without deploying it as ROOT.war?
>
> My server is running Ubuntu 10.04.
>
> Thanks!
>
> Dean Del Ponte
>

You could use a rewrite rule to achieve that:

RewriteEngine On
RewriteRule ^/$ /myApplication/ [PT]
JkMount /myApplication* tomcat

Works for me very well.

Thomas


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



Re: Please somebody can translate this configuration in tomcat form for server.xml or another xml config file?

2012-01-27 Thread Thomas Rohde



Am 27.01.2012 15:28, schrieb Luciano Andress Martini:

Sorry where is the correct place to put this security constraint?


The web.xml file is an essential part of each Tomat web application. It 
is located in /WEB-INF/web.xml.





2012/1/27, Luciano Andress Martini<777u...@gmail.com>:

  Thomas Rohde:

  With this tomcat still can upload files? Cause it need to can =[


2012/1/27, Luciano Andress Martini<777u...@gmail.com>:

   Thomas Rohde
  Man thank you very much, i will try it now! =]


2012/1/27, Luciano Andress Martini<777u...@gmail.com>:

Humm sorry friends im not trying to fight, i just really need to do
that.

I will try to draw what i want to happen, maybe my english is very poor.

(TOMCAT SERVER)   says
-Yes i can access
/var/lib/tomcat6/webapps/temporarios/upload_contracheque  i can upload
files here.

(USER) says
-No i cant access
/var/lib/tomcat6/webapps/temporarios/upload_contracheque/

(TOMCAT LIST HELPER) says
Luciano, Idiot you need to move this directory outside tomcat6
upload_contracheque.

(DEVELOPER) says
Luciano Idiot, i never will move this directory, you just need to
block it, as you do in Apache2. You dont know how to do that?

Understand now?


2012/1/27, Luciano Andress Martini<777u...@gmail.com>:

I really want to block a directory like
/webapps/temporarios/upload_contracheque

Yes is the first option but withou moving the directory outside
tomcat, because im not the developer of the system, and i just put
this system on the server and i really need to simple block this
directory...=//

I need to block this, in the similar way that i do in apache...
/var/lib/tomcat6/webapps/temporarios/upload_contracheque

I really cant move this outside this directory.

Thank you.


2012/1/27, André Warnier:

Luciano Andress Martini wrote:

I need to do this in tomcat6:
Apache2 form:

 Order allow,deny
 deny from all



I think that you are again not very clear, but I will try to guess.

There is no direct equivalent of the above in Tomcat, because Tomcat
works
on the base of
"context" rather than "disk directory".
(For an Apache2 equivalent, think  instead of).

So to re-phrase your question :
You have a directory in Tomcat, like (tomcat_dir)/webapps/mywebapp/X ,
and
you want to
prevent (all) web users from accessing the content of that
sub-directory
X.
Yes ?

If yes, then the best way of achieving this is probably to have this
directory be outside
of the Tomcat /webapps/ space (better even, totally outside the Tomcat
directory tree).
If you need to access it from Apache2, then you can always use an
Alias
in
Apache2.
E.g.

/var/www/site1/docs/  = Apache2 DocumentRoot

/var/www/tomcat/webapps/ = Tomcat webapps dir

/var/www/temporarios/upload = directory where the files are uploaded

In Apache2 :

Alias /temporarios/ /var/www/temporarios/

.  (Allow/deny and other things) ...


In Tomcat : nothing  (Tomcat will not even see this directory, and no
Tomcat
URL can reach
it).

If your Tomcat webapp needs to read/write there, then you decide that
inside
your Tomcat
webapp.(And you give the Apache and the Tomcat user the appropriate
user-id
&  permissions
to read/write there).


-
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: Please somebody can translate this configuration in tomcat form for server.xml or another xml config file?

2012-01-27 Thread Thomas Rohde



Am 27.01.2012 15:07, schrieb Luciano Andress Martini:

I really want to block a directory like
/webapps/temporarios/upload_contracheque

Yes is the first option but withou moving the directory outside
tomcat, because im not the developer of the system, and i just put
this system on the server and i really need to simple block this
directory...=//

I need to block this, in the similar way that i do in apache...
/var/lib/tomcat6/webapps/temporarios/upload_contracheque


Okay, it seems that your directory doesn't point to a web application 
but rather to a sub directory of a web application. If so you can put 
the rules into the web.xml file of the application.


Use a security constraint to handle this:



Upload directory
/upload_contracheque/*


uploaduser



BASIC
upload


uploaduser


Now only authenticated users with the role "uploaduser" can access the 
directory.


Thomas





I really cant move this outside this directory.

Thank you.


2012/1/27, André Warnier:

Luciano Andress Martini wrote:

I need to do this in tomcat6:
Apache2 form:

 Order allow,deny
 deny from all




I think that you are again not very clear, but I will try to guess.

There is no direct equivalent of the above in Tomcat, because Tomcat works
on the base of
"context" rather than "disk directory".
(For an Apache2 equivalent, think  instead of).

So to re-phrase your question :
You have a directory in Tomcat, like (tomcat_dir)/webapps/mywebapp/X , and
you want to
prevent (all) web users from accessing the content of that sub-directory X.
Yes ?

If yes, then the best way of achieving this is probably to have this
directory be outside
of the Tomcat /webapps/ space (better even, totally outside the Tomcat
directory tree).
If you need to access it from Apache2, then you can always use an Alias in
Apache2.
E.g.

/var/www/site1/docs/  = Apache2 DocumentRoot

/var/www/tomcat/webapps/ = Tomcat webapps dir

/var/www/temporarios/upload = directory where the files are uploaded

In Apache2 :

Alias /temporarios/ /var/www/temporarios/

.  (Allow/deny and other things) ...


In Tomcat : nothing  (Tomcat will not even see this directory, and no Tomcat
URL can reach
it).

If your Tomcat webapp needs to read/write there, then you decide that inside
your Tomcat
webapp.(And you give the Apache and the Tomcat user the appropriate user-id
&  permissions
to read/write there).


-
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: Please somebody can translate this configuration in tomcat form for server.xml or another xml config file?

2012-01-27 Thread Thomas Rohde



Am 27.01.2012 13:23, schrieb Luciano Andress Martini:

I need to do this in tomcat6:
Apache2 form:

 Order allow,deny
 deny from all



Thank you friends!

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


You need to define a Remote Adress Filter for your Context, Host or 
Engine. See 
http://tomcat.apache.org/tomcat-6.0-doc/config/valve.html#Remote_Address_Filter 
for more details.


I think



should work for you.

Thomas


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