Tocat webapp listening on different port

2009-11-04 Thread Sergio Arrighi

Hello to everyone,

I'm pretty new with tomcat and I've a newbie question.
Is it possible to have a tomcat webapp listening on a port different 
from the port which is in use by the server itself??

Example:
I have a tomcat server listening on port 80 and I want the 'A' webapp to 
be listening on port 1.


Is this possible? If so could someone give me hints or pointers?
Thanks,

Sergio

--
*I.M.I.N. Holding s.r.l.*
Sergio Arrighi
sergio.arri...@iminholding.com mailto:sergio.arri...@iminholding.com
Cell. 3455805121

Vicolo Molino, 2
21052 Busto Arsizio
Varese
Tel. +39 0331324679
Fax. +39 0331324678
www.iminholding.com


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



Re: Problem forward HTTP / Soap request using mod_jk

2009-11-04 Thread breako

Thanks so much for replies. Very much appreciated.

In response to the questions:

1. I have an apache server in front of my tomcat.
2. The reason why I am doing this is because I wish to use multiple tomcats
and have some load balancing. 
That didn't work, so in trying to diagnose the problem, I got rid all but
one of the tomcat's behind the apache http server. This was to get the
simpliest case using apache http server working first.
3. No I have seen no errors in any logs (apache or mod_jk) with extra
logging.
I see notices in error.log but they look benign.

[Tue Nov 03 18:12:46 2009] [notice] IBM_HTTP_Server/6.1.0.9 Apache/2.0.47
configured -- resuming normal operations
[Tue Nov 03 18:12:46 2009] [notice] Server built: Apr 12 2007 19:42:26
[Tue Nov 03 18:12:46 2009] [notice] Parent: Created child process 7724
[Tue Nov 03 18:12:47 2009] [notice] Child 7724: Child process is running
[Tue Nov 03 18:12:47 2009] [notice] Child 7724: Acquired the start mutex.
[Tue Nov 03 18:12:47 2009] [notice] Child 7724: Starting 250 worker threads.
 
4. Here is some debug logging from the mod_jk...

[Tue Nov 03 18:12:47 2009] [7724:3508] [debug] jk_ajp_common.c (2562):
setting connection pool size to 250 with min 125 and acquire timeout 200
[Tue Nov 03 18:12:47 2009] [7724:3508] [debug] jk_worker.c (146): about to
create instance worker2 of ajp13
[Tue Nov 03 18:12:47 2009] [7724:3508] [debug] jk_worker.c (159): about to
validate and init worker2
[Tue Nov 03 18:12:47 2009] [7724:3508] [debug] jk_ajp_common.c (2512):
worker worker2 contact is 'localhost:23009'
[Tue Nov 03 18:12:47 2009] [7724:3508] [debug] jk_ajp_common.c (2699):
setting endpoint options:
[Tue Nov 03 18:12:47 2009] [7724:3508] [debug] jk_ajp_common.c (2702):
keepalive:  0
[Tue Nov 03 18:12:47 2009] [7724:3508] [debug] jk_ajp_common.c (2706):
socket timeout: 0
[Tue Nov 03 18:12:47 2009] [7724:3508] [debug] jk_ajp_common.c (2710):
socket connect timeout: 0
[Tue Nov 03 18:12:47 2009] [7724:3508] [debug] jk_ajp_common.c (2714):
buffer size:0
[Tue Nov 03 18:12:47 2009] [7724:3508] [debug] jk_ajp_common.c (2718): pool
timeout:   0
[Tue Nov 03 18:12:47 2009] [7724:3508] [debug] jk_ajp_common.c (2722): ping
timeout:   1
[Tue Nov 03 18:12:47 2009] [7724:3508] [debug] jk_ajp_common.c (2726):
connect timeout:0
[Tue Nov 03 18:12:47 2009] [7724:3508] [debug] jk_ajp_common.c (2730): reply
timeout:  0
[Tue Nov 03 18:12:47 2009] [7724:3508] [debug] jk_ajp_common.c (2734):
prepost timeout:0
[Tue Nov 03 18:12:47 2009] [7724:3508] [debug] jk_ajp_common.c (2738):
recovery options:   0
[Tue Nov 03 18:12:47 2009] [7724:3508] [debug] jk_ajp_common.c (2742):
retries:2
[Tue Nov 03 18:12:47 2009] [7724:3508] [debug] jk_ajp_common.c (2746): max
packet size:8192
[Tue Nov 03 18:12:47 2009] [7724:3508] [debug] jk_ajp_common.c (2750): retry
interval: 100



worker2 of type ajp13 (2)
[Tue Nov 03 18:12:47 2009] [7724:3508] [debug] jk_worker.c (116): found a
worker worker2
[Tue Nov 03 18:12:47 2009] [7724:3508] [debug] jk_worker.c (293): Found
worker type 'ajp13'
[Tue Nov 03 18:12:47 2009] [7724:3508] [debug] jk_uri_worker_map.c (512):
Checking extension for worker 2: 

and then
...

ue Nov 03 18:14:30 2009] [7724:3132] [debug] jk_uri_worker_map.c (850):
Attempting to map context URI '/docy=worker2' source 'JkMount'
[Tue Nov 03 18:14:30 2009] [7724:3132] [debug] jk_uri_worker_map.c (873):
Found an exact match '/docy=worker2'
[Tue Nov 03 18:14:30 2009] [7724:3132] [debug] mod_jk.c (2459): Into handler
jakarta-servlet worker=worker2 r-proxyreq=0
[Tue Nov 03 18:14:30 2009] [7724:3132] [debug] jk_worker.c (116): found a
worker worker2
[Tue Nov 03 18:14:30 2009] [7724:3132] [debug] jk_worker.c (339):
Maintaining worker worker1
[Tue Nov 03 18:14:30 2009] [7724:3132] [debug] jk_worker.c (339):
Maintaining worker worker2
[Tue Nov 03 18:14:30 2009] [7724:3132] [debug] jk_worker.c (339):
Maintaining worker loadbalancer
[Tue Nov 03 18:14:30 2009] [7724:3132] [debug] jk_lb_worker.c (670): decay
with 2^1
[Tue Nov 03 18:14:30 2009] [7724:3132] [debug] jk_worker.c (293): Found
worker type 'ajp13'
[Tue Nov 03 18:14:30 2009] [7724:3132] [debug] mod_jk.c (977): Service
protocol=HTTP/1.1 method=POST ssl=false host=(null) addr=192.168.125.90
name=ied031 port=8080 auth=(null) user=(null) laddr=192.168.125.90
raddr=192.168.125.90 uri=/docy
[Tue Nov 03 18:14:30 2009] [7724:3132] [debug] jk_ajp_common.c (2977):
acquired connection pool slot=0 after 0 retries
[Tue Nov 03 18:14:30 2009] [7724:3132] [debug] jk_ajp_common.c (605): ajp
marshaling done
[Tue Nov 03 18:14:30 2009] [7724:3132] [debug] jk_ajp_common.c (2283):
processing worker2 with 2 retries
[Tue Nov 03 18:14:30 2009] [7724:3132] [debug] jk_ajp_common.c (1501):
(worker2) all endpoints are disconnected.
[Tue Nov 03 18:14:30 2009] [7724:3132] [debug] jk_connect.c (452): socket
TCP_NODELAY set to On
[Tue Nov 03 18:14:30 2009] [7724:3132] 

Inactive sessions won't be removed

2009-11-04 Thread Christian Stöber

Hello list,

I've the problem that some (yes, really some) HttpSessions won't be 
removed. Here are some details from the manager app of two these 
sessions. Please consider the TTL an the Inactive Time value. I've just 
take a copy of the manager output!


Details for Session A2B3FF68F366B9533CFE66DBF2903DDA.www1
Session IdA2B3FF68F366B9533CFE66DBF2903DDA.www1
Guessed Locale
Guessed User
Creation Time 2009-11-04 09:20:50
Last Accessed Time2009-11-04 09:23:03
Session Max Inactive Interval 00:35:00
Used Time 00:02:13
Inactive Time *00:45:43*
TTL   *00:0-10:0-43*

Details for Session 927B892EE1B94FB4A551B96F84E0BB62.www1
Session Id927B892EE1B94FB4A551B96F84E0BB62.www1
Guessed Locale
Guessed User
Creation Time 2009-11-04 09:27:21
Last Accessed Time2009-11-04 09:27:30
Session Max Inactive Interval 00:35:00
Used Time 00:00:08
Inactive Time *00:41:17*
TTL   *00:0-6:0-17*

Why doesn't tomcat remove these sessions? How often does tomcat check 
when to remove an old session?


As said above only some sessions are affected.

Thanks in advance.

Christian



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



Re: tomcat https

2009-11-04 Thread Ognjen Blagojevic

Torleif wrote:

I am trying to set up tomcat to use https.
I used keytool -genkey -alias tomcat -keyalg RSA
If I use changeit as password for keystore everything works ok.
If I use a different password it does not work.
I have modified server.xml with keystorePass=newpassword
My .keystore is located in default place.


It could help if you tell us what Tomcat version, OS and version are you 
using and what is default place.


.keystore file should be on the home directory of the user running 
Tomcat. E.g. /home/tomcat on Linux, or C:\Documents and 
Settings\ognjen\ on Windows XP.


Also note: Finally, you will be prompted for the key password, which is 
the password specifically for this Certificate (as opposed to any other 
Certificates stored in the same keystore file). You MUST use the same 
password here as was used for the keystore password itself. (Currently, 
the keytool prompt will tell you that pressing the ENTER key does this 
for you automatically.) (tomcat SSL docs)




If I use changeit as password, will this be a security risk since this
is a widely known password?


The way I see it, the security risk is not too big. .keystore file will 
most probably have the same access rights as your server.xml where the 
keystore password is stored in cleartext. So, if the unauthorized user 
is able to access .keystore file it will also be able to access the 
server.xml, and read the keystore password.


However, if your configuration, backup strategy, or anything else 
introduces the possibility for unauthorized person to access only the 
.keystore file (and not server.xml) - or you are simply paranoid - you 
should change the default password.




Also I run a mailserver with https web interface.
Can I use a different https certificate in tomcat or must it be the same
as my mailserver?


It really depends of your configuration.

Are both webmail and Tomcat on the same port? Do you run webmail 
application under Tomcat or not? Do you use httpd or not? Do you have 
more than one IP address available for the server?


If you use two servers, two different IP addresses OR two different 
ports on the same IP address, you can have different certificates. In 
other cases, you can't.


Regards,
Ognjen

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



Re: Tocat webapp listening on different port

2009-11-04 Thread Tobias Crefeld
Am Wed, 04 Nov 2009 09:43:54 +0100
schrieb Sergio Arrighi sergio.arri...@iminholding.com:

 Is it possible to have a tomcat webapp listening on a port different 
 from the port which is in use by the server itself??
 Example:
 I have a tomcat server listening on port 80 and I want the 'A' webapp
 to be listening on port 1.

AFAIK it is not possible to setup 2 http-connectors for one tomcat, but
you can install another tomcat in its own JVM with other port- and/or
IP-address-assignments with a coyote-connector listening to Port 1.

Or you install a proxy or Apache2 with mod_proxy_ajp or mod_proxy_http
to offer an access via port 80 to tomcat and change tomcats
coyote-connector to Port 1. Of course this will only give you two
different ways to connect to the same tomcat (and both applications)
but you can control access by using valves in tomcat and
ProxyPass-settings in Apache2.


RU,
 Tobias.

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



Re: Tocat webapp listening on different port

2009-11-04 Thread Ognjen Blagojevic

Tobias Crefeld wrote:

schrieb Sergio Arrighi sergio.arri...@iminholding.com:
Is it possible to have a tomcat webapp listening on a port different 
from the port which is in use by the server itself??


AFAIK it is not possible to setup 2 http-connectors for one tomcat, but
you can install another tomcat in its own JVM with other port- and/or
IP-address-assignments with a coyote-connector listening to Port 1.


It is possible also to do it with two connectors. Just edit the 
server.xml to have to services (say, Catalina80, and Catalina1), 
with appropriate Connectors on ports 80 and 1, appropriate Engines 
and appropriate Hosts.


-Ognjen

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



webapps question

2009-11-04 Thread Michele Mase'
I've 100 webapps on one single tomcat instance.
Every webapps has in his WEB-INF/lib the same jars
I've some permgen memory problems too
Moving all the shared libs in tomcat's root/common/lib should help me
reducing the perm gen memory usage?
Should it be a good pratics?
Michele


Re: Reading and writing files outside tomcat directory

2009-11-04 Thread Ognjen Blagojevic

noobie45 wrote:

Thank you so much.

I am absolutely new to Tomcat on Linux.

I need to figure out what you mean by user-id under which Tomcat runs.


Every process on Linux is ran by a certain user. With command ps -ef, 
you can list all the processes and users that run them (first column 
from left).


You can easily identify Tomcat process by recognizing Java executable, 
something like:


tomcat   28710 1  5 10:43 ?00:00:17 
/usr/java/default/bin/java 
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager 
-Djava.util.logging.config.file=/usr/local/tomcat/conf/logging.properties 
-Dorg.apache.el.parser.COERCE_TO_ZERO=false -XX:MaxPermSize=300m 
-Xms300m -Xmx400m -Djava.endorsed.dirs=/usr/local/tomcat/endorsed 
-classpath :/usr/local/tomcat/bin/bootstrap.jar 
-Dcatalina.base=/usr/local/tomcat -Dcatalina.home=/usr/local/tomcat 
-Djava.io.tmpdir=/usr/local/tomcat/temp 
org.apache.catalina.startup.Bootstrap start



Here you can see that Tomcat server is started as Java application 
packed in bootstrap.jar file, invoked by default JVM 
(/usr/java/default/bin/java), and ran by user tomcat. On some system 
the user can be root or something else.


Now, to go back to the original question: if the user that is running 
Tomcat server have privileges to read or write to any directory on the 
file system, so will the tomcat web application. (At least if the 
security manager is turned off which is default setting.)


Regards,
Ognjen

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



Re: webapps question

2009-11-04 Thread Mikolaj Rydzewski

Michele Mase' wrote:

I've 100 webapps on one single tomcat instance.
Every webapps has in his WEB-INF/lib the same jars
I've some permgen memory problems too
Moving all the shared libs in tomcat's root/common/lib should help me
reducing the perm gen memory usage?
Should it be a good pratics
It will solve one problem, but will cause others, difficult to trace. 
E.g. static classes/fields loaded from common classloader will be shared 
among all webapps.
You should rather refactor your webapp to be able to change its 'work 
context' depending on URI/domain name.


--
Mikolaj Rydzewski m...@ceti.pl


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



remote debug

2009-11-04 Thread maven apache
Hi:
I have a project and want to use the remote debug manner,my web
container is tomcat of version of 5.5,I have seen the faq in wiki of
tomcat.
I follow the instruction:
--

%CATALINA_HOME%\bin\tomcat6w.exe //ES//tomcat6

Select the Java tab in the properties dialog box,
Add the following two lines to the Java Options text box:

-Xdebug
-Xrunjdwp:transport=dt_socket,address=192.168.2.10:1044,server=y,suspend=n

after the configuration I restart the tomcat.

then in my eclipse EE I open the debug configuration dialog,create a
new remote java application,in the connection properties I set :
host:192.168.2.10
port:1044
Then I click applay--debug.However a error dialog comes out which tell me:

Failed to connect to remote VM. Connection refused.
Connection refused: connect

I wonder why?

I have tried to  Set environment variables JPDA_ADDRESS=1044 and
JPDA_TRANSPORT=dt_socket,but it does not work also.

Anyone can give me some advise?

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



Re: webapps question

2009-11-04 Thread Michele Mase'
Thanx 4 you answer;
ps: there are 100 webservices, not webapps
Pls, help me: I'm not a developer ... and I don't understand the
disadvantages of static classes/fields loaded from common classloader will
be shared among all webapps, Could you be a little more specific about the
disadvantages?
Your suggestion is to split the apps into vitualhost like, context.xml
ecc..?
I use the oracle odbc thin; which problem should I have putting the jdbc
driver int the commos/lib ?
For reference, those are the jars userd in all webservices: classes12.jar
ibatis-common-2.jar ibatis-dao-2.jar ibatis-sqlmap-2.jar activation.jar
axis-ant.jar axis.jar commons-discovery-0.2.jar commons-logging-1.0.4.jar
jaxrpc.jar LEGO_CONDIVISI.jar log4j-1.2.8.jar mail.jar saaj.jar
wsdl4j-1.5.1.jar xmlsec-1.4.0.jar
Michele

On Wed, Nov 4, 2009 at 11:00 AM, Mikolaj Rydzewski m...@ceti.pl wrote:

 Michele Mase' wrote:

 I've 100 webapps on one single tomcat instance.
 Every webapps has in his WEB-INF/lib the same jars
 I've some permgen memory problems too
 Moving all the shared libs in tomcat's root/common/lib should help me
 reducing the perm gen memory usage?
 Should it be a good pratics

 It will solve one problem, but will cause others, difficult to trace. E.g.
 static classes/fields loaded from common classloader will be shared among
 all webapps.
 You should rather refactor your webapp to be able to change its 'work
 context' depending on URI/domain name.

 --
 Mikolaj Rydzewski m...@ceti.pl


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




Re: webapps question

2009-11-04 Thread Ognjen Blagojevic

Michele Mase' wrote:

I've 100 webapps on one single tomcat instance.
Every webapps has in his WEB-INF/lib the same jars
I've some permgen memory problems too
Moving all the shared libs in tomcat's root/common/lib should help me
reducing the perm gen memory usage?
Should it be a good pratics?


No.

Search the mailing list archives. All your questions are answered in
last couple of days.

Regards,
Ognjen

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



Multi-level context starting at ROOT

2009-11-04 Thread Maurice Yarrow

Hello Tomcat Users Group

I have no problem configuring a multi-level context originating
at the context uri level, e.g.:

   http://www.domain.com/context/multi-level-sub-context/servletname

and I have no problem creating a web-app context at the ROOT level, e.g.:

   http://www.domain.com/servletname

These above have been configured of course using context xml
files in conf/Catalina/localhost.

Problem:
Have not been able to find any correct context xml file configuration
(or naming) that will give a multi-level sub context starting at
the ROOT level, .e.g.:

   http://www.domain.com/multi-level-sub-context/servletname

as well as the above

   http://www.domain.com/servletname

So: question is:
Can this be done ?
How is it configured ?
What are the respective context xml files named ?

Thanks

Maurice Yarrow

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



Re: Reading and writing files outside tomcat directory

2009-11-04 Thread noobie45

Thanks. I just tried out the command and got the list of users including
tomcat.
-- 
View this message in context: 
http://old.nabble.com/Reading-and-writing-files-outside-tomcat-directory-tp26160054p26194539.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: webapps question

2009-11-04 Thread Mikolaj Rydzewski

Michele Mase' wrote:

ps: there are 100 webservices, not webapps
Pls, help me: I'm not a developer ... and I don't understand the
disadvantages of static classes/fields loaded from common classloader will
be shared among all webapps, Could you be a little more specific about the
disadvantages?
  
It might break your webapps/services in many ways, diffucult to trace. 
However, there's a chance everything will work. If you're not a 
developer better do not change anything.


--
Mikolaj Rydzewski m...@ceti.pl


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



Re: Failed to install Tomcat5 service

2009-11-04 Thread chamin de silva

I had the same problem while I was installing Tomcat 5.5.9 and I observed
that there was a service defined for tomcat installed previously of version
6.
Once I uninstalled that version of Tomcat the problem was fixed.

Hope this would others having same problem!

---
Chamin De Silva



Hez wrote:
 
 Hi!
 
 I got this error when trying to install Tomcat 5.5.23 on Windows XP:
 
   Failed to install Tomcat5 service.
   Check your settings and permissions
   Ignore and continue anyway (not recommended)?
 
 the above error occurs with these status:
   ..
   tomcat-users.xml written
   Remove folder: C:\Temp\confinstall
   Using Jvm: C:\Program Files\Java\jre1.5.0_11\bin\client\jvm.dll
 
 I abort the installation at this point.
 
 After searching the Google, I tried to set the environment variable
 TEMP and TMP to C:\Temp, but that doesn't help either.
 
 When I open the Services (Local) window, I see that there is a service
 named Apache Tomcat (Apache Tomcat 5.5.23 Server -
 http://tomcat.apache.org/; ...
 I think this service is created but not being remove when I abort the
 Tomcat installation.
 
 Please help, thank you!
 
 
 -- 
 
 Hez
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 
 
 

-- 
View this message in context: 
http://old.nabble.com/Failed-to-install-Tomcat5-service-tp4789p26194794.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: Multi-level context starting at ROOT

2009-11-04 Thread Konstantin Kolinko
2009/11/4 Maurice Yarrow maurice.yar...@comcast.net:
 Hello Tomcat Users Group

 I have no problem configuring a multi-level context originating
 at the context uri level, e.g.:

   http://www.domain.com/context/multi-level-sub-context/servletname


See http://tomcat.apache.org/tomcat-6.0-doc/config/context.html
and search for character '#' there.

Though maybe you mean something different...

Are you using a standalone Tomcat, or you have another webserver before it?

What is your configuration, and what are the versions?


Best regards,
Konstantin Kolinko

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



Re: Problem forward HTTP / Soap request using mod_jk

2009-11-04 Thread André Warnier

breako wrote:

Thanks so much for replies. Very much appreciated.

In response to the questions:

1. I have an apache server in front of my tomcat.
2. The reason why I am doing this is because I wish to use multiple tomcats
and have some load balancing. 
That didn't work, so in trying to diagnose the problem, I got rid all but

one of the tomcat's behind the apache http server. This was to get the
simpliest case using apache http server working first.
3. No I have seen no errors in any logs (apache or mod_jk) with extra
logging.
I see notices in error.log but they look benign.

[Tue Nov 03 18:12:46 2009] [notice] IBM_HTTP_Server/6.1.0.9 Apache/2.0.47
configured -- resuming normal operations
[Tue Nov 03 18:12:46 2009] [notice] Server built: Apr 12 2007 19:42:26
[Tue Nov 03 18:12:46 2009] [notice] Parent: Created child process 7724
[Tue Nov 03 18:12:47 2009] [notice] Child 7724: Child process is running
[Tue Nov 03 18:12:47 2009] [notice] Child 7724: Acquired the start mutex.
[Tue Nov 03 18:12:47 2009] [notice] Child 7724: Starting 250 worker threads.
 
4. Here is some debug logging from the mod_jk...



...
All this log looks pretty normal



and then
...

Indeed, that is where it becomes interesting



ue Nov 03 18:14:30 2009] [7724:3132] [debug] jk_uri_worker_map.c (850):
Attempting to map context URI '/docy=worker2' source 'JkMount'
[Tue Nov 03 18:14:30 2009] [7724:3132] [debug] jk_uri_worker_map.c (873):
Found an exact match '/docy=worker2'
[Tue Nov 03 18:14:30 2009] [7724:3132] [debug] mod_jk.c (2459): Into handler

...

[Tue Nov 03 18:14:30 2009] [7724:3132] [debug] mod_jk.c (977): Service
protocol=HTTP/1.1 method=POST ssl=false host=(null) addr=192.168.125.90
name=ied031 port=8080 auth=(null) user=(null) laddr=192.168.125.90
raddr=192.168.125.90 uri=/docy

.. so mod_jk got the request to /docy and is processing it
...


and then several of this logs...

and that is where it would start becoming interesting, but you have cut 
it off...


So, what happens next ?
I mean, you should see the request that is being sent to Tomcat, then 
Tomcat's answer.


Another question : what, on the Tomcat side, is supposed to process 
requests to /docy ?




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



Monitoring Tomcat over SNMP

2009-11-04 Thread Sameek Bhaumik
Hi,
 
We intend to monitor a J2EE application deployed in Tomcat 5.5 using IBM Tivoli 
Monitor (ITM) 6.1 over SNMP. It'll be really helpful if some information on 
this is provided. To be more specific the information I am looking forward to 
is:
 
1) Whether Tomcat 5.5 supports SNMP?
2) If the answer to question 1 is yes, then what is the configuration 
required in Tomcat, so that Tivoli can monitor it over SNMP?
3) How are the MIBs generated from the Tomcat and what information a Tomcat MIB 
will contain?
 
Looking forward to an early response.
 
Thanks and Regards,
Sameek Bhaumik 


  Keep up with people you care about with Yahoo! India Mail. Learn how. 
http://in.overview.mail.yahoo.com/connectmore

Re: Multi-level context starting at ROOT

2009-11-04 Thread Pid

On 04/11/2009 11:13, Maurice Yarrow wrote:

Hello Tomcat Users Group

I have no problem configuring a multi-level context originating
at the context uri level, e.g.:

http://www.domain.com/context/multi-level-sub-context/servletname

and I have no problem creating a web-app context at the ROOT level, e.g.:

http://www.domain.com/servletname

These above have been configured of course using context xml
files in conf/Catalina/localhost.

Problem:
Have not been able to find any correct context xml file configuration
(or naming) that will give a multi-level sub context starting at
the ROOT level, .e.g.:

http://www.domain.com/multi-level-sub-context/servletname


It's a separate context, just not a multi-level one.

 multi-level-sub-context.war


p


as well as the above

http://www.domain.com/servletname

So: question is:
Can this be done ?
How is it configured ?
What are the respective context xml files named ?

Thanks

Maurice Yarrow

-
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: webapps question

2009-11-04 Thread Joseph Morgan
Michele,

It looks like all of the jar files you mention can safely be deployed in
Tomcat's common lib area.

Another question, though, to ask yourself and your developers is, do you
really need 100 individual web apps to support the web services you
have?

In other words, there is no requirement to have a 1 to 1 correlation
between applications and web services.

Joe

-Original Message-
From: Michele Mase' [mailto:michele.m...@gmail.com] 
Sent: Wednesday, November 04, 2009 4:56 AM
To: Tomcat Users List
Subject: Re: webapps question

Thanx 4 you answer;
ps: there are 100 webservices, not webapps
Pls, help me: I'm not a developer ... and I don't understand the
disadvantages of static classes/fields loaded from common classloader
will
be shared among all webapps, Could you be a little more specific about
the
disadvantages?
Your suggestion is to split the apps into vitualhost like, context.xml
ecc..?
I use the oracle odbc thin; which problem should I have putting the jdbc
driver int the commos/lib ?
For reference, those are the jars userd in all webservices:
classes12.jar
ibatis-common-2.jar ibatis-dao-2.jar ibatis-sqlmap-2.jar activation.jar
axis-ant.jar axis.jar commons-discovery-0.2.jar
commons-logging-1.0.4.jar
jaxrpc.jar LEGO_CONDIVISI.jar log4j-1.2.8.jar mail.jar saaj.jar
wsdl4j-1.5.1.jar xmlsec-1.4.0.jar
Michele

On Wed, Nov 4, 2009 at 11:00 AM, Mikolaj Rydzewski m...@ceti.pl wrote:

 Michele Mase' wrote:

 I've 100 webapps on one single tomcat instance.
 Every webapps has in his WEB-INF/lib the same jars
 I've some permgen memory problems too
 Moving all the shared libs in tomcat's root/common/lib should help me
 reducing the perm gen memory usage?
 Should it be a good pratics

 It will solve one problem, but will cause others, difficult to trace.
E.g.
 static classes/fields loaded from common classloader will be shared
among
 all webapps.
 You should rather refactor your webapp to be able to change its 'work
 context' depending on URI/domain name.

 --
 Mikolaj Rydzewski m...@ceti.pl


 -
 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: webapps question

2009-11-04 Thread Pid

On 04/11/2009 13:17, Joseph Morgan wrote:

Michele,

It looks like all of the jar files you mention can safely be deployed in
Tomcat's common lib area.


I'm not sure that's true of commons-logging or log4j.

Someone else might have a better memory than me, but I've a feeling that 
they hold onto classloader references, which may cause a memory leak 
during redeployments.



p



Another question, though, to ask yourself and your developers is, do you
really need 100 individual web apps to support the web services you
have?

In other words, there is no requirement to have a 1 to 1 correlation
between applications and web services.

Joe

-Original Message-
From: Michele Mase' [mailto:michele.m...@gmail.com]
Sent: Wednesday, November 04, 2009 4:56 AM
To: Tomcat Users List
Subject: Re: webapps question

Thanx 4 you answer;
ps: there are 100 webservices, not webapps
Pls, help me: I'm not a developer ... and I don't understand the
disadvantages of static classes/fields loaded from common classloader
will
be shared among all webapps, Could you be a little more specific about
the
disadvantages?
Your suggestion is to split the apps into vitualhost like, context.xml
ecc..?
I use the oracle odbc thin; which problem should I have putting the jdbc
driver int the commos/lib ?
For reference, those are the jars userd in all webservices:
classes12.jar
ibatis-common-2.jar ibatis-dao-2.jar ibatis-sqlmap-2.jar activation.jar
axis-ant.jar axis.jar commons-discovery-0.2.jar
commons-logging-1.0.4.jar
jaxrpc.jar LEGO_CONDIVISI.jar log4j-1.2.8.jar mail.jar saaj.jar
wsdl4j-1.5.1.jar xmlsec-1.4.0.jar
Michele

On Wed, Nov 4, 2009 at 11:00 AM, Mikolaj Rydzewskim...@ceti.pl  wrote:


Michele Mase' wrote:


I've 100 webapps on one single tomcat instance.
Every webapps has in his WEB-INF/lib the same jars
I've some permgen memory problems too
Moving all the shared libs in tomcat's root/common/lib should help me
reducing the perm gen memory usage?
Should it be a good pratics


It will solve one problem, but will cause others, difficult to trace.

E.g.

static classes/fields loaded from common classloader will be shared

among

all webapps.
You should rather refactor your webapp to be able to change its 'work
context' depending on URI/domain name.

--
Mikolaj Rydzewskim...@ceti.pl


-
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: webapps question

2009-11-04 Thread Joseph Morgan
I think you're right:

http://stackoverflow.com/questions/217929/problem-with-commons-logging-l
og4j-setup-in-spring-webapp-with-tomcat-6

So commons-logging is not safe in common lib area.


-Original Message-
From: Pid [mailto:p...@pidster.com] 
Sent: Wednesday, November 04, 2009 7:23 AM
To: Tomcat Users List
Subject: Re: webapps question

On 04/11/2009 13:17, Joseph Morgan wrote:
 Michele,

 It looks like all of the jar files you mention can safely be deployed
in
 Tomcat's common lib area.

I'm not sure that's true of commons-logging or log4j.

Someone else might have a better memory than me, but I've a feeling that

they hold onto classloader references, which may cause a memory leak 
during redeployments.


p


 Another question, though, to ask yourself and your developers is, do
you
 really need 100 individual web apps to support the web services you
 have?

 In other words, there is no requirement to have a 1 to 1 correlation
 between applications and web services.

 Joe

 -Original Message-
 From: Michele Mase' [mailto:michele.m...@gmail.com]
 Sent: Wednesday, November 04, 2009 4:56 AM
 To: Tomcat Users List
 Subject: Re: webapps question

 Thanx 4 you answer;
 ps: there are 100 webservices, not webapps
 Pls, help me: I'm not a developer ... and I don't understand the
 disadvantages of static classes/fields loaded from common classloader
 will
 be shared among all webapps, Could you be a little more specific
about
 the
 disadvantages?
 Your suggestion is to split the apps into vitualhost like,
context.xml
 ecc..?
 I use the oracle odbc thin; which problem should I have putting the
jdbc
 driver int the commos/lib ?
 For reference, those are the jars userd in all webservices:
 classes12.jar
 ibatis-common-2.jar ibatis-dao-2.jar ibatis-sqlmap-2.jar
activation.jar
 axis-ant.jar axis.jar commons-discovery-0.2.jar
 commons-logging-1.0.4.jar
 jaxrpc.jar LEGO_CONDIVISI.jar log4j-1.2.8.jar mail.jar saaj.jar
 wsdl4j-1.5.1.jar xmlsec-1.4.0.jar
 Michele

 On Wed, Nov 4, 2009 at 11:00 AM, Mikolaj Rydzewskim...@ceti.pl
wrote:

 Michele Mase' wrote:

 I've 100 webapps on one single tomcat instance.
 Every webapps has in his WEB-INF/lib the same jars
 I've some permgen memory problems too
 Moving all the shared libs in tomcat's root/common/lib should help
me
 reducing the perm gen memory usage?
 Should it be a good pratics

 It will solve one problem, but will cause others, difficult to trace.
 E.g.
 static classes/fields loaded from common classloader will be shared
 among
 all webapps.
 You should rather refactor your webapp to be able to change its 'work
 context' depending on URI/domain name.

 --
 Mikolaj Rydzewskim...@ceti.pl


 -
 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


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



Re: Problem forward HTTP / Soap request using mod_jk

2009-11-04 Thread breako

Thanks so much for getting back to me.

It's just a java process that is supposed to process requests from docy.
This all works when it's just one tomcat as a client and one tomcat as a
server with no apache http server infront of the server.

Here is part of the request I edited out... 

[Tue Nov 03 18:14:30 2009] [7724:3132] [debug] jk_ajp_common.c (931):
Connected socket 4536 to (127.0.0.1:23009)
[Tue Nov 03 18:14:30 2009] [7724:3132] [debug] jk_ajp_common.c (1070):
sending to ajp13 pos=4 len=388 max=8192
[Tue Nov 03 18:14:30 2009] [7724:3132] [debug] jk_ajp_common.c (1070):    
12 34 01 80 02 04 00 08 48 54 54 50 2F 31 2E 31  - .4..HTTP/1.1
[Tue Nov 03 18:14:30 2009] [7724:3132] [debug] jk_ajp_common.c (1070): 0010   
00 00 28 2F 66 69 6E 65 6F 73 2D 64 6F 63 70 72  - ..(/docy...19
[Tue Nov 03 18:14:30 2009] [7724:3132] [debug] jk_ajp_common.c (1070): 0040   
32 2E 31 36 38 2E 31 32 35 2E 39 30 00 FF FF 00  - 2.168.125.90
[Tue Nov 03 18:14:30 2009] [7724:3132] [debug] jk_ajp_common.c (1070): 0050   
06 69 65 64 30 33 31 00 1F 90 00 00 04 A0 07 00  - .ied031.
[Tue Nov 03 18:14:30 2009] [7724:3132] [debug] jk_ajp_common.c (1070): 0060   
E9 6D 75 6C 74 69 70 61 72 74 2F 72 65 6C 61 74  - .multipart/relat
[Tue Nov 03 18:14:30 2009] [7724:3132] [debug] jk_ajp_common.c (1070): 0070   
65 64 3B 20 62 6F 75 6E 64 61 72 79 3D 4D 49 4D  - ed;.boundary=MIM
[Tue Nov 03 18:14:30 2009] [7724:3132] [debug] jk_ajp_common.c (1070): 0080   
45 42 6F 75 6E 64 61 72 79 75 72 6E 5F 75 75 69  - EBoundaryurn_uui
[Tue Nov 03 18:14:30 2009] [7724:3132] [debug] jk_ajp_common.c (1070): 0090   
64 5F 33 43 34 37 37 31 43 35 46 31 45 31 36 34  - d_3C4771C5F1E164
[Tue Nov 03 18:14:30 2009] [7724:3132] [debug] jk_ajp_common.c (1070): 00a0   
37 44 41 38 31 32 35 37 32 37 32 30 37 31 30 31  - 7DA8125727207101
[Tue Nov 03 18:14:30 2009] [7724:3132] [debug] jk_ajp_common.c (1070): 00b0   
37 3B 20 74 79 70 65 3D 22 61 70 70 6C 69 63 61  - 7;.type=applica
[Tue Nov 03 18:14:30 2009] [7724:3132] [debug] jk_ajp_common.c (1070): 00c0   
74 69 6F 6E 2F 78 6F 70 2B 78 6D 6C 22 3B 20 73  - tion/xop+xml;.s
[Tue Nov 03 18:14:30 2009] [7724:3132] [debug] jk_ajp_common.c (1070): 00d0   
74 61 72 74 3D 22 3C 30 2E 75 72 6E 3A 75 75 69  - tart=0.urn:uui
[Tue Nov 03 18:14:30 2009] [7724:3132] [debug] jk_ajp_common.c (1070): 00e0   
64 3A 33 43 34 37 37 31 43 35 46 31 45 31 36 34  - d:3C4771C5F1E164
[Tue Nov 03 18:14:30 2009] [7724:3132] [debug] jk_ajp_common.c (1070): 00f0   
37 44 41 38 31 32 35 37 32 37 32 30 37 31 30 31  - 7DA8125727207101
[Tue Nov 03 18:14:30 2009] [7724:3132] [debug] jk_ajp_common.c (1070): 0100   
38 40 61 70 61 63 68 65 2E 6F 72 67 3E 22 3B 20  - 8...@apache.org;.
[Tue Nov 03 18:14:30 2009] [7724:3132] [debug] jk_ajp_common.c (1070): 0110   
73 74 61 72 74 2D 69 6E 66 6F 3D 22 61 70 70 6C  - start-info=appl
[Tue Nov 03 18:14:30 2009] [7724:3132] [debug] jk_ajp_common.c (1070): 0120   
69 63 61 74 69 6F 6E 2F 73 6F 61 70 2B 78 6D 6C  - ication/soap+xml
[Tue Nov 03 18:14:30 2009] [7724:3132] [debug] jk_ajp_common.c (1070): 0130   
22 3B 20 61 63 74 69 6F 6E 3D 22 75 72 6E 3A 73  - ;.action=urn:s
[Tue Nov 03 18:14:30 2009] [7724:3132] [debug] jk_ajp_common.c (1070): 0140   
61 76 65 41 73 57 6F 72 64 22 00 A0 0E 00 05 41  - aveAsWord.A
[Tue Nov 03 18:14:30 2009] [7724:3132] [debug] jk_ajp_common.c (1070): 0150   
78 69 73 32 00 A0 0B 00 0B 69 65 64 30 33 31 3A  - xis2.ied031:
[Tue Nov 03 18:14:30 2009] [7724:3132] [debug] jk_ajp_common.c (1070): 0160   
38 30 38 30 00 00 11 54 72 61 6E 73 66 65 72 2D  - 8080...Transfer-
[Tue Nov 03 18:14:30 2009] [7724:3132] [debug] jk_ajp_common.c (1070): 0170   
45 6E 63 6F 64 69 6E 67 00 00 07 63 68 75 6E 6B  - Encoding...chunk
[Tue Nov 03 18:14:30 2009] [7724:3132] [debug] jk_ajp_common.c (1070): 0180   
65 64 00 FF 00 00 00 00 00 00 00 00 00 00 00 00  - ed..
[Tue Nov 03 18:14:30 2009] [7724:3132] [debug] jk_ajp_common.c (1560):
(worker2) request body to send 0 - request body to resend 0


So this is where it ends, this request never makes to the tomcat server.

Note 1:
The web context on the server isn't called docy.
It's the doc_(The name of the project I am working on) which I have had to
edit out. 

Note 2: 
I have a simple Helloworld.jsp also running on the server which I can send
notmal HTTP requests to via the apache server.

So I am 100% confident all the bog standard stuff is set up correctly.

Any help would be greatly appreciated.




-- 
View this message in context: 
http://old.nabble.com/Problem-forward-HTTP---Soap-request-using-mod_jk-tp26160709p26196676.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: ConnectionPool question

2009-11-04 Thread Josh Gooding
HOLY MOLY I am getting a TON of abandoned connection warnings now.  I
see I have logAbandoned=true.  My Catalina log grew fast!  Now here is a
question, everytime I recycle a connection (close RS, statement, and the
connection) does it place it back into the pool or is that what the
abandoned connection messages are for letting me know they were abandoned
and put back into the pool?

On Tue, Nov 3, 2009 at 4:06 PM, Josh Gooding josh.good...@gmail.com wrote:

 nevermind.  I get:

 javax.servlet.ServletException: 
 com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException:


 No operations allowed after connection closed.

 Guess that answers my question.


 On Tue, Nov 3, 2009 at 3:24 PM, Josh Gooding josh.good...@gmail.comwrote:

 If I close the RS, can I still use the MD?


 On Tue, Nov 3, 2009 at 3:13 PM, Elli Albek e...@sustainlane.com wrote:

 No, you do not need to close the XXXMetaData classes.

 E

 On Tue, Nov 3, 2009 at 12:02 PM, Josh Gooding josh.good...@gmail.com
 wrote:

  One more question on bleeding resources.  When closing RS / statement /
  connections.  Do I have to do anything with the MetaData if I got that
 as
  well?  (I.E Do I explicitly have to close the metadata as well?)
 
  Josh
 
  On Tue, Nov 3, 2009 at 2:01 PM, Josh Gooding josh.good...@gmail.com
  wrote:
 
   Elle,
  
   I am going to dig into this code and check it out.  I want to know
 more
   about how to use threadlocal and filters.  (Sorry I'm not as
 experienced
  in
   Tomcat as some for you gurus here).
  
   The code looks promising and I like the 2nd option due to the fact
 that
   each HTTP req. only has one connection (which should drop the
 overhead
   immensely) however for right now, I just want to fix the bleeding
 issue
   (which it seems that I have caught a good portion of them), so I'll
 use
  my
   legacy code, but during a minor code release, I can definitely look
  into
   rolling this out.  I am getting a ton of abandoned connection
 warnings
  in
   the console window, so I need to find out where these are coming from
  now.
  
   I don't know where to begin thanking you guys but thank you.  I've
 gotten
   more mentoring here on this listing than I have in 2 years at my
 current
   employer.  Thank you all again.
  
   - Josh
  
  
   On Mon, Nov 2, 2009 at 3:40 PM, Christopher Schultz 
   ch...@christopherschultz.net wrote:
  
   -BEGIN PGP SIGNED MESSAGE-
   Hash: SHA1
  
   Elli,
  
   On 11/2/2009 4:08 AM, Elli Albek wrote:
I think you can have a solution without changing your code.
   
Try something like this:
   
getConnection() static method should get the connection, and add
 it to
  a
list that you keep in threadlocal.
   
recycleConnection() should close the connection and remove the
   connection
object from thread local.
   
Add a servlet filter that closes all connections in thread local.
 The
   filter
calls next filter, and in a finally block get the connections from
   thread
local, close all of them, and clear the list in thread local.
  
   This is a horrible, nasty hack and it's entirely brilliant!
  
   I would change Elli's implementation just slightly, and actually
 write
   your own DataSource implementation that piggybacks on another one.
   Basically, you just wrap the DataSource that Tomcat provides either
 by:
  
   a. Using JNDI to look-up the Tomcat-created JNDI DataSource and just
 writing the plumbing code to pass everything through
   b. Actually subclass the DataSource class(es) provided by Tomcat and
 use /those/ in your Resource configuration.
  
   I would also not make any of this static... there's just no reason
 to do
   so, especially if your DataSource object is in the JNDI context.
  
   Although the /real/ solution is to fix the code, I really like this
   solution for a couple of reasons:
  
   1. It requires no wrapping of Connection, Statement, etc. objects
 (which is entirely miserable if you've ever had to do it)
   2. It requires no changes to your code whatsoever (if you use my
 DataSource-wrapping suggestion above)
   3. You won't end up closing your connection, statement, result set,
 etc.
 too early because your code has completed execution (unless you
 are using JDBC resources across requests, which is another story)
  
   What this won't help, unfortunately is:
  
   * Closing your ResultSet and Statement objects (though this can be
solved by wrapping the Connection, Statement, etc. objects handed-
out by your DataSource. Yes, it's miserable.)
  
This will allow you to keep your legacy code. As far as I remember
  DBCP
   has
an option to close the result sets and statements when you close
 the
connection. If not this will partly work.
  
   I don't believe commons-dbcp has this capability at all. I'm willing
 to
   read any documentation to the contrary, though.
  
Version 2: Advanced
   
Keep the actual connection in thread local. You 

Re: webapps question

2009-11-04 Thread Mikolaj Rydzewski

Joseph Morgan wrote:

So commons-logging is not safe in common lib area.
  
I think, that OP's environment is a production one. So redeployment is 
not a problem. I mean it's not common to redeploy webapps often in 
production environment.
But depending on design of webapps, classes loaded from shared 
classloader might be a problem or not.


--
Mikolaj Rydzewski m...@ceti.pl


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



Re: tomcat https

2009-11-04 Thread Torleif
Hi  

Thanks for all your help!!  

I am using Debian Lenny as OS.  

I am trying to set up a funambol server witch use Tomcat. (
http://bionicmessage.net/?q=node/18 )  

I am not sure witch version of Tomcat it uses. (I am at work right now and
cant check)  

By default place I mean /home/user/.keystore  

I run keytool -genkey -alias tomcat -keyalg RSA  

When I run this command it asks for password witch is changeit as default
and everything works ok.  

If I choose a different password and modify server.xml accordingly it does
not work.  

maybe I shuld use this command instead? ( keytool -genkey -alias tomcat
-keyalg RSA -keystore /home/user/.keystore
 -storepass mypassword ) ??
  

I am ok with using changeit as password if this is no security risk. No one
has access to my computer, but can they get access through https if they know
the changeit password?  

   

I also have a mailserver on the same ip citadel witch uses webcit for
webmail.  

The ports on my mailserver and Tomcat are different.  

   

Thanks again for all help!!  

   

Torleif  
  Wed Nov 04 2009 10:28:22 CET from  Ognjen Blagojevic
ogn...@etf.bg.ac.rs  Subject: Re: tomcat https

  Torleif wrote:
  
I am trying to set up tomcat to use https.
 I used keytool -genkey -alias tomcat -keyalg RSA
 If I use changeit as password for keystore everything works ok.
 If I use a different password it does not work.
 I have modified server.xml with keystorePass=newpassword
 My .keystore is located in default place.
 


  It could help if you tell us what Tomcat version, OS and version are you 
 using and what is default place.
 
 .keystore file should be on the home directory of the user running 
 Tomcat. E.g. /home/tomcat on Linux, or C:\Documents and 
 Settings\ognjen\ on Windows XP.
 
 Also note: Finally, you will be prompted for the key password, which is 
 the password specifically for this Certificate (as opposed to any other 
 Certificates stored in the same keystore file). You MUST use the same 
 password here as was used for the keystore password itself. (Currently, 
 the keytool prompt will tell you that pressing the ENTER key does this 
 for you automatically.) (tomcat SSL docs)
 
 
  
If I use changeit as password, will this be a security risk since this
 is a widely known password?
 


  The way I see it, the security risk is not too big. .keystore file will 
 most probably have the same access rights as your server.xml where the 
 keystore password is stored in cleartext. So, if the unauthorized user 
 is able to access .keystore file it will also be able to access the 
 server.xml, and read the keystore password.
 
 However, if your configuration, backup strategy, or anything else 
 introduces the possibility for unauthorized person to access only the 
 .keystore file (and not server.xml) - or you are simply paranoid - you 
 should change the default password.
 
 
  
Also I run a mailserver with https web interface.
 Can I use a different https certificate in tomcat or must it be the same
 as my mailserver?
 


  It really depends of your configuration.
 
 Are both webmail and Tomcat on the same port? Do you run webmail 
 application under Tomcat or not? Do you use httpd or not? Do you have 
 more than one IP address available for the server?
 
 If you use two servers, two different IP addresses OR two different 
 ports on the same IP address, you can have different certificates. In 
 other cases, you can't.
 
 Regards,
 Ognjen
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 
 


  

  

 

Re: ConnectionPool question

2009-11-04 Thread Carsten Pohl
Hi,

if you close the connection, it will be recycled. So, close() does not really 
close, but releases the connection.

Regards,
Carsten Pohl
- Original Message -
From: Josh Gooding josh.good...@gmail.com
To: Tomcat Users List users@tomcat.apache.org
Sent: Wednesday, 4 November, 2009 14:56:20 GMT +01:00 Amsterdam / Berlin / Bern 
/ Rome / Stockholm / Vienna
Subject: Re: ConnectionPool question

HOLY MOLY I am getting a TON of abandoned connection warnings now.  I
see I have logAbandoned=true.  My Catalina log grew fast!  Now here is a
question, everytime I recycle a connection (close RS, statement, and the
connection) does it place it back into the pool or is that what the
abandoned connection messages are for letting me know they were abandoned
and put back into the pool?

On Tue, Nov 3, 2009 at 4:06 PM, Josh Gooding josh.good...@gmail.com wrote:

 nevermind.  I get:

 javax.servlet.ServletException: 
 com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException:


 No operations allowed after connection closed.

 Guess that answers my question.


 On Tue, Nov 3, 2009 at 3:24 PM, Josh Gooding josh.good...@gmail.comwrote:

 If I close the RS, can I still use the MD?


 On Tue, Nov 3, 2009 at 3:13 PM, Elli Albek e...@sustainlane.com wrote:

 No, you do not need to close the XXXMetaData classes.

 E

 On Tue, Nov 3, 2009 at 12:02 PM, Josh Gooding josh.good...@gmail.com
 wrote:

  One more question on bleeding resources.  When closing RS / statement /
  connections.  Do I have to do anything with the MetaData if I got that
 as
  well?  (I.E Do I explicitly have to close the metadata as well?)
 
  Josh
 
  On Tue, Nov 3, 2009 at 2:01 PM, Josh Gooding josh.good...@gmail.com
  wrote:
 
   Elle,
  
   I am going to dig into this code and check it out.  I want to know
 more
   about how to use threadlocal and filters.  (Sorry I'm not as
 experienced
  in
   Tomcat as some for you gurus here).
  
   The code looks promising and I like the 2nd option due to the fact
 that
   each HTTP req. only has one connection (which should drop the
 overhead
   immensely) however for right now, I just want to fix the bleeding
 issue
   (which it seems that I have caught a good portion of them), so I'll
 use
  my
   legacy code, but during a minor code release, I can definitely look
  into
   rolling this out.  I am getting a ton of abandoned connection
 warnings
  in
   the console window, so I need to find out where these are coming from
  now.
  
   I don't know where to begin thanking you guys but thank you.  I've
 gotten
   more mentoring here on this listing than I have in 2 years at my
 current
   employer.  Thank you all again.
  
   - Josh
  
  
   On Mon, Nov 2, 2009 at 3:40 PM, Christopher Schultz 
   ch...@christopherschultz.net wrote:
  
   -BEGIN PGP SIGNED MESSAGE-
   Hash: SHA1
  
   Elli,
  
   On 11/2/2009 4:08 AM, Elli Albek wrote:
I think you can have a solution without changing your code.
   
Try something like this:
   
getConnection() static method should get the connection, and add
 it to
  a
list that you keep in threadlocal.
   
recycleConnection() should close the connection and remove the
   connection
object from thread local.
   
Add a servlet filter that closes all connections in thread local.
 The
   filter
calls next filter, and in a finally block get the connections from
   thread
local, close all of them, and clear the list in thread local.
  
   This is a horrible, nasty hack and it's entirely brilliant!
  
   I would change Elli's implementation just slightly, and actually
 write
   your own DataSource implementation that piggybacks on another one.
   Basically, you just wrap the DataSource that Tomcat provides either
 by:
  
   a. Using JNDI to look-up the Tomcat-created JNDI DataSource and just
 writing the plumbing code to pass everything through
   b. Actually subclass the DataSource class(es) provided by Tomcat and
 use /those/ in your Resource configuration.
  
   I would also not make any of this static... there's just no reason
 to do
   so, especially if your DataSource object is in the JNDI context.
  
   Although the /real/ solution is to fix the code, I really like this
   solution for a couple of reasons:
  
   1. It requires no wrapping of Connection, Statement, etc. objects
 (which is entirely miserable if you've ever had to do it)
   2. It requires no changes to your code whatsoever (if you use my
 DataSource-wrapping suggestion above)
   3. You won't end up closing your connection, statement, result set,
 etc.
 too early because your code has completed execution (unless you
 are using JDBC resources across requests, which is another story)
  
   What this won't help, unfortunately is:
  
   * Closing your ResultSet and Statement objects (though this can be
solved by wrapping the Connection, Statement, etc. objects handed-
out by your DataSource. Yes, it's miserable.)
  
This 

Re: Problem forward HTTP / Soap request using mod_jk

2009-11-04 Thread André Warnier

See at bottom.

breako wrote:

Thanks so much for getting back to me.

It's just a java process that is supposed to process requests from docy.
This all works when it's just one tomcat as a client and one tomcat as a
server with no apache http server infront of the server.

Here is part of the request I edited out... 


[Tue Nov 03 18:14:30 2009] [7724:3132] [debug] jk_ajp_common.c (931):
Connected socket 4536 to (127.0.0.1:23009)
[Tue Nov 03 18:14:30 2009] [7724:3132] [debug] jk_ajp_common.c (1070):
sending to ajp13 pos=4 len=388 max=8192
[Tue Nov 03 18:14:30 2009] [7724:3132] [debug] jk_ajp_common.c (1070):    
12 34 01 80 02 04 00 08 48 54 54 50 2F 31 2E 31  - .4..HTTP/1.1
[Tue Nov 03 18:14:30 2009] [7724:3132] [debug] jk_ajp_common.c (1070): 0010   
00 00 28 2F 66 69 6E 65 6F 73 2D 64 6F 63 70 72  - ..(/docy...19

...


45 6E 63 6F 64 69 6E 67 00 00 07 63 68 75 6E 6B  - Encoding...chunk
[Tue Nov 03 18:14:30 2009] [7724:3132] [debug] jk_ajp_common.c (1070): 0180   
65 64 00 FF 00 00 00 00 00 00 00 00 00 00 00 00  - ed..

[Tue Nov 03 18:14:30 2009] [7724:3132] [debug] jk_ajp_common.c (1560):
(worker2) request body to send 0 - request body to resend 0


So this is where it ends, this request never makes to the tomcat server.

Well, it probably does.  But to me, it looks like Tomcat does not know 
what to do with it.  Or else, I misinterpret what you are saying below, 
or there is a piece missing in your explanation.



Note 1:
The web context on the server isn't called docy.
It's the doc_(The name of the project I am working on) which I have had to
edit out. 

Note 2: 
I have a simple Helloworld.jsp also running on the server which I can send

notmal HTTP requests to via the apache server.

So I am 100% confident all the bog standard stuff is set up correctly.

Well yes, it looks like indeed the Apache - mod_jk - Tomcat 
communication part is set up properly and is working.
But it would seem that the request you are sending to Apache is a POST 
request, to the URL /docy (or whatever).  Then mod_jk is trying to 
forward this request to Tomcat, using the same request URL /docy.
However, I have a feeling that, although this request is a POST 
(supposed to contain a request body), and the HTTP headers seem to 
indicate that there should be a body, in fact it does not contain any 
request body.
Another thing is that for Tomcat to respond sensibly to a request for 
/docy (or whatever), should have an application at the Tomcat side 
that is set up to respond to /docy (or whatever) with something.


To tell you the truth, I am now lost, and I don't know if what you are 
testing through Apache, and for which you have been showing the logs, 
really represents what you are trying to achieve, or if maybe you are 
testing different things when going through Apache as opposed to when 
you are not.


Tell me some more things :
When you have your initial setup, where one Tomcat talks to the other 
directly,

- which port do you use on the server Tomcat ?
(can you show the corresponding Connector of your Tomcat server.xml file)
- how does the client Tomcat connect to that port and send a request 
to it ?

- is that request then pure HTTP ? (even if inside, there is a SOAP message)

- and later, when you have changed your setup to have the client 
Tomcat now talk to the Apache server, instead of to the server Tomcat 
directly, are you using the exact same request from the client Tomcat ?


Coming back on your Note 2 above : it would probably be useful to 
compare the mod_jk log between these two cases : when you are requesting 
the URL /HelloWorld and when you are requestion /docy (or whatever), and 
look where the difference is.


What may also be useful, is to configure this within your Tomcat :
http://tomcat.apache.org/tomcat-6.0-doc/config/valve.html
(AccessLogValve)
There is probably a commented-out example is your server.xml.  Uncomment 
it.  It will log the requests which Tomcat does receive, through 
whatever port.


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



Re: ConnectionPool question

2009-11-04 Thread ramzi khlil
Yes, It releases the connection back to the pool.



On Wed, Nov 4, 2009 at 9:43 AM, Carsten Pohl p...@tyntec.com wrote:

 Hi,

 if you close the connection, it will be recycled. So, close() does not
 really close, but releases the connection.

 Regards,
 Carsten Pohl
  - Original Message -
 From: Josh Gooding josh.good...@gmail.com
 To: Tomcat Users List users@tomcat.apache.org
 Sent: Wednesday, 4 November, 2009 14:56:20 GMT +01:00 Amsterdam / Berlin /
 Bern / Rome / Stockholm / Vienna
 Subject: Re: ConnectionPool question

 HOLY MOLY I am getting a TON of abandoned connection warnings now.  I
 see I have logAbandoned=true.  My Catalina log grew fast!  Now here is a
 question, everytime I recycle a connection (close RS, statement, and the
 connection) does it place it back into the pool or is that what the
 abandoned connection messages are for letting me know they were abandoned
 and put back into the pool?

 On Tue, Nov 3, 2009 at 4:06 PM, Josh Gooding josh.good...@gmail.com
 wrote:

  nevermind.  I get:
 
  javax.servlet.ServletException:
 com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException:
 
 
  No operations allowed after connection closed.
 
  Guess that answers my question.
 
 
  On Tue, Nov 3, 2009 at 3:24 PM, Josh Gooding josh.good...@gmail.com
 wrote:
 
  If I close the RS, can I still use the MD?
 
 
  On Tue, Nov 3, 2009 at 3:13 PM, Elli Albek e...@sustainlane.com
 wrote:
 
  No, you do not need to close the XXXMetaData classes.
 
  E
 
  On Tue, Nov 3, 2009 at 12:02 PM, Josh Gooding josh.good...@gmail.com
  wrote:
 
   One more question on bleeding resources.  When closing RS / statement
 /
   connections.  Do I have to do anything with the MetaData if I got
 that
  as
   well?  (I.E Do I explicitly have to close the metadata as well?)
  
   Josh
  
   On Tue, Nov 3, 2009 at 2:01 PM, Josh Gooding josh.good...@gmail.com
 
   wrote:
  
Elle,
   
I am going to dig into this code and check it out.  I want to know
  more
about how to use threadlocal and filters.  (Sorry I'm not as
  experienced
   in
Tomcat as some for you gurus here).
   
The code looks promising and I like the 2nd option due to the fact
  that
each HTTP req. only has one connection (which should drop the
  overhead
immensely) however for right now, I just want to fix the bleeding
  issue
(which it seems that I have caught a good portion of them), so I'll
  use
   my
legacy code, but during a minor code release, I can definitely
 look
   into
rolling this out.  I am getting a ton of abandoned connection
  warnings
   in
the console window, so I need to find out where these are coming
 from
   now.
   
I don't know where to begin thanking you guys but thank you.  I've
  gotten
more mentoring here on this listing than I have in 2 years at my
  current
employer.  Thank you all again.
   
- Josh
   
   
On Mon, Nov 2, 2009 at 3:40 PM, Christopher Schultz 
ch...@christopherschultz.net wrote:
   
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
   
Elli,
   
On 11/2/2009 4:08 AM, Elli Albek wrote:
 I think you can have a solution without changing your code.

 Try something like this:

 getConnection() static method should get the connection, and add
  it to
   a
 list that you keep in threadlocal.

 recycleConnection() should close the connection and remove the
connection
 object from thread local.

 Add a servlet filter that closes all connections in thread
 local.
  The
filter
 calls next filter, and in a finally block get the connections
 from
thread
 local, close all of them, and clear the list in thread local.
   
This is a horrible, nasty hack and it's entirely brilliant!
   
I would change Elli's implementation just slightly, and actually
  write
your own DataSource implementation that piggybacks on another one.
Basically, you just wrap the DataSource that Tomcat provides
 either
  by:
   
a. Using JNDI to look-up the Tomcat-created JNDI DataSource and
 just
  writing the plumbing code to pass everything through
b. Actually subclass the DataSource class(es) provided by Tomcat
 and
  use /those/ in your Resource configuration.
   
I would also not make any of this static... there's just no reason
  to do
so, especially if your DataSource object is in the JNDI context.
   
Although the /real/ solution is to fix the code, I really like
 this
solution for a couple of reasons:
   
1. It requires no wrapping of Connection, Statement, etc. objects
  (which is entirely miserable if you've ever had to do it)
2. It requires no changes to your code whatsoever (if you use my
  DataSource-wrapping suggestion above)
3. You won't end up closing your connection, statement, result
 set,
  etc.
  too early because your code has completed execution (unless you
  are using JDBC resources across 

RE: ConnectionPool question

2009-11-04 Thread Caldarale, Charles R
 From: Josh Gooding [mailto:josh.good...@gmail.com]
 Subject: Re: ConnectionPool question
 
 everytime I recycle a connection (close RS, statement, and the
 connection) does it place it back into the pool or is that what the
 abandoned connection messages are for letting me know they were
 abandoned and put back into the pool?

There are actually two sets of connection objects here: the real connection to 
the DB server, and an associated connection wrapper that's visible to the 
webapp(s).  If a webapp fails to close a connection wrapper and its associated 
real connection stays idle beyond the configured limit, the association between 
the wrapper and real connection is severed, the real connection is returned to 
the pool, and the wrapper is discarded; it's at this time that the log entry is 
made, containing the stack trace of the point where the wrapper was acquired by 
the webapp.

When the webapp closes the wrapper, both the real connection and the wrapper 
are made available for reuse.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.


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



RE: remote debug

2009-11-04 Thread Caldarale, Charles R
 From: maven apache [mailto:apachemav...@gmail.com]
 Subject: remote debug
 
 my web container is tomcat of version of 5.5
 
 %CATALINA_HOME%\bin\tomcat6w.exe //ES//tomcat6

One of the above two statements is wrong.  Which version of Tomcat are you 
really using?

 Failed to connect to remote VM. Connection refused.
 Connection refused: connect

What version of Windows are you using?  I can get JMX/JPDA working with a 
Tomcat service on XP, but not on Vista (haven't tried it on Win7 yet).  
JMX/JPDA works with Tomcat started from a command prompt on both XP and Vista.  
(The .bat scripts are only in the Tomcat .zip download, not the .exe, for some 
inexplicable reason.)

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.


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



Tomcat 5.5.20 Installation Issues for IIS Redirect

2009-11-04 Thread Corrin, Simon P
Hello,

I am new at this, but am having some trouble getting Tomcat 5.5.20 installed 
the way I would like to.  I am trying to install the Windows EXE for version 
5.5.20 which seems to work fine.  The next part is where I am having issues.  I 
am trying to set it up to run Single Sign On through IIS and need to modify the 
worker.properties file for example.  Yet, the file is not in the config folder 
and doesn't exist in the installation.  When I go to the SRC file it is in 
there, but does not get installed for some reason.  I did see the documentation 
on setting up the IIS Redirect but I don't have the files they are looking for 
as a part of my installation.  Can anyone help me out to get this version 
installed correctly so I can use IIS Redirect to set up SSO?

Thanks in advance for your help on this.

Thanks!

Simon.


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



Re: Multi-level context starting at ROOT

2009-11-04 Thread Maurice Yarrow

Hello Tomcat Users Grp and in particular, Pid and Konstantin Kolinko:

Thanks for your replies.
However, I evidently did not clearly state the problem I am having:
I can define the following context xml files in conf/Catalina/localhost:

   contextname.xml

and

   contextname#multi-level-contextname.xml

and these work as documented, i.e.:

   http://www.domain.com/contextname/servletname

and

   http://www.domain.com/contextname/multi-level-contextname/servletname

I can also create a context xml in conf/Catalina/localhost called

   ROOT.xml which defines the ROOT web app to be at www.domain.com.

This works fine at

   http://www.domain.com/servletname

for example.
But when I define a multi-level-context under ROOT with

   ROOT#multi-level-context.xml

a not-found is returned from

   http://www.domain.com/multi-level-contextname/servletname

I believe this is actually one of the (apparently) unsolved threads in
the Spring users group, and appears to an issue only with the advent
of the # hash sign instead of the _ underscore sign formerly used
in earlier Tomcats (I am using 6.0.18).

Maurice Yarrow

Pid wrote:

On 04/11/2009 11:13, Maurice Yarrow wrote:

Hello Tomcat Users Group

I have no problem configuring a multi-level context originating
at the context uri level, e.g.:

http://www.domain.com/context/multi-level-sub-context/servletname

and I have no problem creating a web-app context at the ROOT level, 
e.g.:


http://www.domain.com/servletname

These above have been configured of course using context xml
files in conf/Catalina/localhost.

Problem:
Have not been able to find any correct context xml file configuration
(or naming) that will give a multi-level sub context starting at
the ROOT level, .e.g.:

http://www.domain.com/multi-level-sub-context/servletname


It's a separate context, just not a multi-level one.

 multi-level-sub-context.war


p


as well as the above

http://www.domain.com/servletname

So: question is:
Can this be done ?
How is it configured ?
What are the respective context xml files named ?

Thanks

Maurice Yarrow

-
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



No virus found in this incoming message.
Checked by AVG - www.avg.com 
Version: 9.0.698 / Virus Database: 270.14.49/2480 - Release Date: 11/03/09 23:37:00


  



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



Re: Multi-level context starting at ROOT

2009-11-04 Thread David Smith
I'm still wondering why you'd want to do ROOT#multilevelcontext.xml when
it's functionally the same as multilevelcontext.xml.  What use case do
you have for such a thing?

--David

Maurice Yarrow wrote:
 Hello Tomcat Users Grp and in particular, Pid and Konstantin Kolinko:

 Thanks for your replies.
 However, I evidently did not clearly state the problem I am having:
 I can define the following context xml files in conf/Catalina/localhost:

contextname.xml

 and

contextname#multi-level-contextname.xml

 and these work as documented, i.e.:

http://www.domain.com/contextname/servletname

 and

http://www.domain.com/contextname/multi-level-contextname/servletname

 I can also create a context xml in conf/Catalina/localhost called

ROOT.xml which defines the ROOT web app to be at www.domain.com.

 This works fine at

http://www.domain.com/servletname

 for example.
 But when I define a multi-level-context under ROOT with

ROOT#multi-level-context.xml

 a not-found is returned from

http://www.domain.com/multi-level-contextname/servletname

 I believe this is actually one of the (apparently) unsolved threads in
 the Spring users group, and appears to an issue only with the advent
 of the # hash sign instead of the _ underscore sign formerly used
 in earlier Tomcats (I am using 6.0.18).

 Maurice Yarrow

 Pid wrote:
 On 04/11/2009 11:13, Maurice Yarrow wrote:
 Hello Tomcat Users Group

 I have no problem configuring a multi-level context originating
 at the context uri level, e.g.:

 http://www.domain.com/context/multi-level-sub-context/servletname

 and I have no problem creating a web-app context at the ROOT level,
 e.g.:

 http://www.domain.com/servletname

 These above have been configured of course using context xml
 files in conf/Catalina/localhost.

 Problem:
 Have not been able to find any correct context xml file configuration
 (or naming) that will give a multi-level sub context starting at
 the ROOT level, .e.g.:

 http://www.domain.com/multi-level-sub-context/servletname

 It's a separate context, just not a multi-level one.

  multi-level-sub-context.war


 p

 as well as the above

 http://www.domain.com/servletname

 So: question is:
 Can this be done ?
 How is it configured ?
 What are the respective context xml files named ?

 Thanks

 Maurice Yarrow



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



Hash (#) character as context delimiter '/' stand-in

2009-11-04 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

All,

I'm trying to use the foo#bar convention for a deployment path yielding
/foo/bar as my context path and everything seems to work as expected.

Except that I'm using Cocoon with one of my projects.

For Cocoon, everything is a URL. When Cocoon tries to build URLs to
point to, say, files on the disk in the deployment directory, it gets a
URL like file:///home/path/to/tomcat/webapps/foo#bar/some/file which
ends up trying to access file:///home/path/to/tomcat/webapps/foo which
is neither a file nor a directory.

:(

One obvious solution is to use a conf/Catalina/localhost/foo#bar.xml
file and deploy the webapp somewhere else. I'd honestly rather not do
that, but my only other option is to replace '/' in the URL with '-'
which I've already done because /something/ had to be done.

Any other suggestions?

Can anyone comment on the decision to use '#' as the stand-in for '/' in
the first place? Was it intentionally something that could not appear in
the path of a legit URL?

Are there any options for changing the '/' stand-in to, say, ':' or
something more URL-friendly? I suspect this would require a patch to the
Tomcat source.

Thanks,
- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEUEARECAAYFAkrxrqwACgkQ9CaO5/Lv0PA5LQCWNFarapxSaFfhGtLCkfJXLPtv
7gCgtorjbxQ6owFYx5UBxnH3nDMqmL8=
=cVEX
-END PGP SIGNATURE-

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



Re: ConnectionPool question

2009-11-04 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Josh,

On 11/3/2009 3:24 PM, Josh Gooding wrote:
 If I close the RS, can I still use the MD?

I see you've already answered this, but note the error is that the
Connection is closed, not the ResultSet.

I would expect that ResultSetMetaData requires that the ResultSet itself
still be open in order to use it.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkrxsBUACgkQ9CaO5/Lv0PA9FgCgoK27dFtvbyyF4A6M/LrxviWX
OCoAn0Uxn21O6woqtRZMbZKGOcLlHpQS
=WlcR
-END PGP SIGNATURE-

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



Re: tomcat https

2009-11-04 Thread Ognjen Blagojevic

Torleif wrote:
By default place I mean /home/user/.keystore  


/home/user/.keystore? That's strange. Is it maybe 
/home/tomcat/.keystore? Or you have a user user on your system? Under 
what user did you create .keystore file?




If I choose a different password and modify server.xml accordingly it does
not work.  


Did you choose the same password for bot keystore AND certificate, as 
pointed in the Tomcat docs?




maybe I shuld use this command instead? ( keytool -genkey -alias tomcat
-keyalg RSA -keystore /home/user/.keystore
 -storepass mypassword ) ??


No, that is not the source of the problem.



I am ok with using changeit as password if this is no security risk. No one
has access to my computer, but can they get access through https if they know
the changeit password?  


Well, anyone could access to you webapps (not to the entire file system) 
regardless of the keystore password.




I also have a mailserver on the same ip citadel witch uses webcit for
webmail.  

The ports on my mailserver and Tomcat are different.  


Then you can use different certificates.


Regards,
Ognjen




   

Thanks again for all help!!  

   

Torleif  

 Wed Nov 04 2009 10:28:22 CET from  Ognjen Blagojevic
ogn...@etf.bg.ac.rs  Subject: Re: tomcat https

 Torleif wrote:
 

I am trying to set up tomcat to use https.
I used keytool -genkey -alias tomcat -keyalg RSA
If I use changeit as password for keystore everything works ok.
If I use a different password it does not work.
I have modified server.xml with keystorePass=newpassword
My .keystore is located in default place.




 It could help if you tell us what Tomcat version, OS and version are you 
using and what is default place.


.keystore file should be on the home directory of the user running 
Tomcat. E.g. /home/tomcat on Linux, or C:\Documents and 
Settings\ognjen\ on Windows XP.


Also note: Finally, you will be prompted for the key password, which is 
the password specifically for this Certificate (as opposed to any other 
Certificates stored in the same keystore file). You MUST use the same 
password here as was used for the keystore password itself. (Currently, 
the keytool prompt will tell you that pressing the ENTER key does this 
for you automatically.) (tomcat SSL docs)



 

If I use changeit as password, will this be a security risk since this
is a widely known password?




 The way I see it, the security risk is not too big. .keystore file will 
most probably have the same access rights as your server.xml where the 
keystore password is stored in cleartext. So, if the unauthorized user 
is able to access .keystore file it will also be able to access the 
server.xml, and read the keystore password.


However, if your configuration, backup strategy, or anything else 
introduces the possibility for unauthorized person to access only the 
.keystore file (and not server.xml) - or you are simply paranoid - you 
should change the default password.



 

Also I run a mailserver with https web interface.
Can I use a different https certificate in tomcat or must it be the same
as my mailserver?





 It really depends of your configuration.

Are both webmail and Tomcat on the same port? Do you run webmail 
application under Tomcat or not? Do you use httpd or not? Do you have 
more than one IP address available for the server?


If you use two servers, two different IP addresses OR two different 
ports on the same IP address, you can have different certificates. In 
other cases, you can't.


Regards,
Ognjen

-
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: ConnectionPool question

2009-11-04 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Chuck,

On 11/4/2009 10:06 AM, Caldarale, Charles R wrote:
 If a webapp fails to close a
 connection wrapper and its associated real connection stays idle
 beyond the configured limit, the association between the wrapper and
 real connection is severed, the real connection is returned to the
 pool, and the wrapper is discarded

I believe both the real connection and the wrapper are discarded. It
would be dangerous to place the real connection back into the pool, say,
if it were in the middle of a transaction.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkrxsIoACgkQ9CaO5/Lv0PAxWQCdEqJSfWXKSi5byN07ubFJR0QR
QhAAoLHdagXCppMFjmGPVv4ReMMepwvN
=uv37
-END PGP SIGNATURE-

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



Thread issue - org.apache.tomcat.util.threads.ThreadPool logFull

2009-11-04 Thread Curtis Garman
Does anyone know what would cause the following error

Nov 4, 2009 9:30:28 AM org.apache.tomcat.util.threads.ThreadPool logFull
SEVERE: All threads (150) are currently busy, waiting. Increase
maxThreads (150) or check the servlet status

I'm fronting apache tomcat 5.5.26 with apache 2.2.8 and mod_jk

My workers.properties file looks like

--
worker.list=ajp13,status

worker.status.type=status

worker.ajp13.type=ajp13
worker.ajp13.host=localhost
worker.ajp13.port=8009
worker.ajp13.socket_keepalive=1
worker.ajp13.connection_pool_timeout=600
worker.ajp13.connect_timeout=1
worker.ajp13.prepost_timeout=1
--

My AJP connector looks like

Connector port=8009
maxThreads=150 minSpareThreads=25 maxSpareThreads=75
connectionTimeout=60 maxKeepAliveRequests=1
enableLookups=false redirectPort=8443 protocol=AJP/1.3 /

Is the 150 the error message refers to the maxThreads on my AJP
connector? Should this be increased?

Would enabling a log4j email appender cause this? I set one up today
but haven't gotten any email though.

-- 
Curtis Garman
Web Programmer
Heartland Community College

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



Re: Inactive sessions won't be removed

2009-11-04 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Christian,

On 11/4/2009 4:17 AM, Christian Stöber wrote:
 Hello list,
 
 I've the problem that some (yes, really some) HttpSessions won't be
 removed. Here are some details from the manager app of two these
 sessions. Please consider the TTL an the Inactive Time value. I've just
 take a copy of the manager output!
 
 Details for Session A2B3FF68F366B9533CFE66DBF2903DDA.www1
 Session IdA2B3FF68F366B9533CFE66DBF2903DDA.www1
 Creation Time 2009-11-04 09:20:50
 Last Accessed Time2009-11-04 09:23:03

What would help is the current time. :)

 Session Max Inactive Interval 00:35:00
 Used Time 00:02:13
 Inactive Time *00:45:43*

What version of Tomcat are you running?

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkrxs3AACgkQ9CaO5/Lv0PAc3wCeLt5EICiCO/2XVuW1xa2hCbDK
0tgAnAuNOAhXzP44ujqN81UPbpv1ta/f
=ma1w
-END PGP SIGNATURE-

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



Re: tomcat https

2009-11-04 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

All,

On 11/4/2009 11:47 AM, Ognjen Blagojevic wrote:
 Torleif wrote:
 By default place I mean /home/user/.keystore  
 
 /home/user/.keystore? That's strange. Is it maybe
 /home/tomcat/.keystore? Or you have a user user on your system? Under
 what user did you create .keystore file?

...and what do you actually have in your server.xml for keystore
configuration?

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkrxtDgACgkQ9CaO5/Lv0PD+ZgCdHRHNp7ryxfMI6ZHgYX1d8Zx1
MdUAn1zd+PfL215yv4IRi8xFyfmCWTfU
=9xK7
-END PGP SIGNATURE-

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



Re: Hash (#) character as context delimiter '/' stand-in

2009-11-04 Thread Konstantin Kolinko
2009/11/4 Christopher Schultz ch...@christopherschultz.net:

 For Cocoon, everything is a URL. When Cocoon tries to build URLs to
 point to, say, files on the disk in the deployment directory, it gets a
 URL like file:///home/path/to/tomcat/webapps/foo#bar/some/file which
 ends up trying to access file:///home/path/to/tomcat/webapps/foo which
 is neither a file nor a directory.


That URL should have been written with %23 instead of '#'.

If I remember correctly (don't have an IDE running), you can make that
one by calling
 File.toURI().toURL().

Best regards,
Konstantin Kolinko

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



Re: Problem forward HTTP / Soap request using mod_jk

2009-11-04 Thread breako

You are correct it is a post and it is missing a body.
However, I used a utility tool TCPMon, to sniff what was being sent to the
Apache Http Server.

This does include a body, wrapped in XML tags.  I do not know why Apache
Http Server does not forward this to my tomcat server.

The difference between my Tomcat client -- Tomcat server set up and my
Tomcat client -- Apache -- Tomcat server, is that the former
communicates only over HTTP ports. There is no AJP.  The Tomcat client knows
which HTTP port the Tomcat server is running on.

Whereas, in the later, Apache only knows about the AJP port of the Tomcat
Server (which is 23009). It does not know about the HTTP port  on the Tomcat
Server (which is 23080), I wonder does it need to send PUT http requests
with body?

To answer your specific questions:

When you have your initial setup, where one Tomcat talks to the other 
directly

Question 1. which port do you use on the server Tomcat ? 
(can you show the corresponding Connector of your Tomcat server.xml file) 

Connector acceptCount=100 connectionTimeout=2
disableUploadTimeout=true enableLookups=false maxHttpHeaderSize=8192
maxSpareThreads=75 maxThreads=150 minSpareThreads=25 port=23080
redirectPort=7443/
 
   Connector enableLookups=false port=23009 protocol=AJP/1.3
redirectPort=8443/

Question 2. how does the client Tomcat connect to that port and send a
request 
to it ? 

It is implemented as a Axis2 SOAP service. 

Question 3. is that request then pure HTTP ? (even if inside, there is a
SOAP message) 

I am not sure quite what you mean, by pure HTTP.  In both cases the tomcat
client sends out the same
HTTP message. The only difference is the port is being sent to.

The TCPMon sniffs this as:

POST /docy HTTP/1.1
Content-Type: application/soap+xml; charset=UTF-8; action=urn:saveAsWord
User-Agent: Axis2
Host: 127.0.0.1:8080
Transfer-Encoding: chunked

861
?xml version='1.0' encoding='UTF-8'?soapenv:Envelope
xmlns:soapenv=http://www.w3.org/2003/05/soap-envelope;soapenv:Header
wsse:Security
xmlns:wsse=http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd;
soapenv:mustUnderstand=truewsse:UsernameToken
xmlns:wsu=http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd;
wsu:Id=UsernameToken-4326799wsse:UsernameOASIS/wsse:Usernamewsse:Password
Type=http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText;OASIS/wsse:Password/wsse:UsernameToken/wsse:Security/soapenv:Headersoapenv:Bodyns1:saveAsWord
xmlns:ns1=http://www.fineos.com/frontoffice/documentproduction/operationtypes;encodedHtmlFileYmVnaW4gNjQ0IHppcGZpbGUNCk00JEwjISEwICIgICggKTIlOSNMICAgICAgICAgICAgICAgIEYgICAgOUZFTjk2XVM5Jl1DPTZVRTtHMVAKTTxGXUQ9Ni1UOjZdTj0mNU08JlFBPSY0Ti0zKFIsUz4tREVVT1ZSIDRBTlxDXjNcQFdfMCo4U01JVTtLJgpNNElIVVU6MlVKW0koTllSKFAwRDonUVowTi1GTydfQEM6VzxRNTRBUFAjU08uPlxRVDJSOkU3TEchN0I1Ck0wTUUiWF9BQDUmJ0svOS8kMExFS0haVU4nKlJVKyczM1wpSi0yUVMtIUozWyAtKUkwXFwgPTlYWDwlSkwKTVxPNEIyWyw0N0VXPlM2JjZUMFBOXFlMVTMtL0UsRFU3Vj4rWi5JXEgnLl49OlBOJE5KWStOR0ZCUzBZTQpNN00jK18wSiZcQT1JNyQ2XSVUOkhDVEspJyAkIUA+UzdAMV9RMkJPJ0UoLjs0XE0gLzZRUFstQkswWCZfCk0hPzY+JixMPFtLQkJOSyxQUlJfU14qUkRCJjNYVj5DPTlXSkZPV00zUjI9PSdaMz9PO19ZUCEwU1EmR1MKTS1dN0NVITwwLicjU0NfOTdQVz08PzAgMTcvVCRBQEZcWUgrIStdUFpMIz5MUDcmIiZKWjhNRzJMSiM2OgpNJ0ZLJ0BZSUwhNydMMV4sMUJcKEwvKT9YUU86MkNDTyFKRzUvQFxEMD4jW1M4IywqRSZCWCZDSF1DPSpaCk1UWU5DJERXWyRIV19QSD07MzRdICQrNyNdVF9QWDBbVD1fIiUoVU8oPzdHRjIkMFFPVEsyVUVULCAuNScKTTQgTUIrP1smXkFKUlg7UD0zUV5NP00pJiRFJjVWWkpUKzUmMzlOL10wTE1fTFIpOyEsJTs6Mzc8PExLQQpNRlJfWUQmSlAnLFdeWlVENzs1NkI4MFopXy4pM0hHOEgiL0UqUVJCOCcsL1BJLVlVOjFBXyAlISshUEA6Ck1NXVRfVFAkICAmWCMgICEwMlAkIiUgIDQgIEAgIiAiNEE2MFsmSz89L10sISAgIU4gUCAgKUAgICAgICAKTSAgICAgICAgICAgICAgICA5RkVOOTZdUzkmXUM9NlVFO0cxUDxGXUQ9Ni1UOjZdTj0mNU08JlFBPSY0Tgo7LTMoUixTPTAyUDQmICAgICAgJCAgMCE0ICAgIClQKCAgICAgCiAKZW5kDQo=/encodedHtmlFileparentDirName\\ied031\SharedDocs/2009/11/4//parentDirName/ns1:saveAsWord/soapenv:Body/soapenv:Envelope
0



Question 4. 
- and later, when you have changed your setup to have the client 
Tomcat now talk to the Apache server, instead of to the server Tomcat 
directly, are you using the exact same request from the client Tomcat ? 

Answer: Yes.


Question 5. it would probably be useful to 
compare the mod_jk log between these two cases : when you are requesting 
the URL /HelloWorld and when you are requestion /docy (or whatever), and 
look where the difference is. 

Answer: I have done this. The /HelloWorl comes straight from a web browser
and is a GET request. The Mod_JK shows it sent and then a response back.

again thanks for any help and apologies in the lack of clarity in my
explanations.

I wonder couild this be something do with Apache only knowing about the
tomcat server's AJP port and not it's http port?


-- 
View this message in context: 
http://old.nabble.com/Problem-forward-HTTP---Soap-request-using-mod_jk-tp26160709p26200363.html
Sent from the Tomcat - User mailing list archive 

Re: ConnectionPool question

2009-11-04 Thread Josh Gooding
Chris,

I would imagine that you are correct, unless I store the RSMD in anther
object (like a Map or AL).

Now that I have started closing my resources something strange has actually
happened now.  I've hit the connectionpool limit faster.

I was digging and realized that I changed my context.xml file for the new
DataSourceFactory, but there is a watched resource in my web.xml that is
still pointing to javax.sql.DataSource.  should this be changed to the
tomcat's DataSourceFactory as well?

Here's the snippet from the context.xml:

Resource
name=jdbc/RealmDB
auth=Container
type=javax.sql.DataSource
factory=org.apache.tomcat.jdbc.pool.DataSourceFactory
username=root
password=password
driverClassName=com.mysql.jdbc.Driver

Here's from the web.xml:

resource-ref
res-typejavax.sql.DataSource/res-type
res-ref-namejdbc/RealmDB/res-ref-name
res-authContainer/res-auth
/resource-ref

Do I need to change the res-type to the tomcat's DataSource?

On Wed, Nov 4, 2009 at 11:47 AM, Christopher Schultz 
ch...@christopherschultz.net wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Josh,

 On 11/3/2009 3:24 PM, Josh Gooding wrote:
  If I close the RS, can I still use the MD?

 I see you've already answered this, but note the error is that the
 Connection is closed, not the ResultSet.

 I would expect that ResultSetMetaData requires that the ResultSet itself
 still be open in order to use it.

 - -chris
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.10 (MingW32)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

 iEYEARECAAYFAkrxsBUACgkQ9CaO5/Lv0PA9FgCgoK27dFtvbyyF4A6M/LrxviWX
 OCoAn0Uxn21O6woqtRZMbZKGOcLlHpQS
 =WlcR
 -END PGP SIGNATURE-

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




Re: Problem forward HTTP / Soap request using mod_jk

2009-11-04 Thread breako


Note, I turned off MIME boundaries as I thought this was the problem. That
is what the HTTP request as spotted by TCPMOM does not contain MIME
boundaries. 

The corresponding Mod_JK is...
ed Nov 04 16:52:55 2009] [5024:4688] [debug] jk_ajp_common.c (1070): sending
to ajp13 pos=4 len=216 max=8192
[Wed Nov 04 16:52:55 2009] [5024:4688] [debug] jk_ajp_common.c (1070):    
12 34 00 D4 02 04 00 08 48 54 54 50 2F 31 2E 31  - .4..HTTP/1.1
[Wed Nov 04 16:52:55 2009] [5024:4688] [debug] jk_ajp_common.c (1070): 0010   
00 00 28 2F 66 69 6E 65 6F 73 2D 64 6F 63 70 72  - ..(/docy...12
[Wed Nov 04 16:52:55 2009] [5024:4688] [debug] jk_ajp_common.c (1070): 0040   
37 2E 30 2E 30 2E 31 00 FF FF 00 09 31 32 37 2E  - 7.0.0.1.127.
[Wed Nov 04 16:52:55 2009] [5024:4688] [debug] jk_ajp_common.c (1070): 0050   
30 2E 30 2E 31 00 1F 90 00 00 04 A0 07 00 3C 61  - 0.0.1.a
[Wed Nov 04 16:52:55 2009] [5024:4688] [debug] jk_ajp_common.c (1070): 0060   
70 70 6C 69 63 61 74 69 6F 6E 2F 73 6F 61 70 2B  - pplication/soap+
[Wed Nov 04 16:52:55 2009] [5024:4688] [debug] jk_ajp_common.c (1070): 0070   
78 6D 6C 3B 20 63 68 61 72 73 65 74 3D 55 54 46  - xml;.charset=UTF
[Wed Nov 04 16:52:55 2009] [5024:4688] [debug] jk_ajp_common.c (1070): 0080   
2D 38 3B 20 61 63 74 69 6F 6E 3D 22 75 72 6E 3A  - -8;.action=urn:
[Wed Nov 04 16:52:55 2009] [5024:4688] [debug] jk_ajp_common.c (1070): 0090   
73 61 76 65 41 73 57 6F 72 64 22 00 A0 0E 00 05  - saveAsWord.
[Wed Nov 04 16:52:55 2009] [5024:4688] [debug] jk_ajp_common.c (1070): 00a0   
41 78 69 73 32 00 A0 0B 00 0E 31 32 37 2E 30 2E  - Axis2.127.0.
[Wed Nov 04 16:52:55 2009] [5024:4688] [debug] jk_ajp_common.c (1070): 00b0   
30 2E 31 3A 38 30 38 30 00 00 11 54 72 61 6E 73  - 0.1:8080...Trans
[Wed Nov 04 16:52:55 2009] [5024:4688] [debug] jk_ajp_common.c (1070): 00c0   
66 65 72 2D 45 6E 63 6F 64 69 6E 67 00 00 07 63  - fer-Encoding...c
[Wed Nov 04 16:52:55 2009] [5024:4688] [debug] jk_ajp_common.c (1070): 00d0   
68 75 6E 6B 65 64 00 FF 00 00 00 00 00 00 00 00  - hunked..
[Wed Nov 04 16:52:55 2009] [5024:4688] [debug] jk_ajp_common.c (1560):
(worker2) request body to send 0 - request body to resend 0
-- 
View this message in context: 
http://old.nabble.com/Problem-forward-HTTP---Soap-request-using-mod_jk-tp26160709p26200448.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: Multi-level context starting at ROOT

2009-11-04 Thread Maurice Yarrow

Hello Tomcat User Group and in particular, David Smith:

My use-case is embedding meshcms inside my primary web app and
in a way that they can both share the same session.

David, I appear to correctly understand and use the

   contextname#multi-level-contextname.xml

context file, but I am not acquainted with multilevelcontext.xml.  How 
is this implemented

(example?) and what is its relationship to a user-defined ROOT context ?

Regards,
Maurice


David Smith wrote:

I'm still wondering why you'd want to do ROOT#multilevelcontext.xml when
it's functionally the same as multilevelcontext.xml.  What use case do
you have for such a thing?

--David

Maurice Yarrow wrote:
  

Hello Tomcat Users Grp and in particular, Pid and Konstantin Kolinko:

Thanks for your replies.
However, I evidently did not clearly state the problem I am having:
I can define the following context xml files in conf/Catalina/localhost:

   contextname.xml

and

   contextname#multi-level-contextname.xml

and these work as documented, i.e.:

   http://www.domain.com/contextname/servletname

and

   http://www.domain.com/contextname/multi-level-contextname/servletname

I can also create a context xml in conf/Catalina/localhost called

   ROOT.xml which defines the ROOT web app to be at www.domain.com.

This works fine at

   http://www.domain.com/servletname

for example.
But when I define a multi-level-context under ROOT with

   ROOT#multi-level-context.xml

a not-found is returned from

   http://www.domain.com/multi-level-contextname/servletname

I believe this is actually one of the (apparently) unsolved threads in
the Spring users group, and appears to an issue only with the advent
of the # hash sign instead of the _ underscore sign formerly used
in earlier Tomcats (I am using 6.0.18).

Maurice Yarrow

Pid wrote:


On 04/11/2009 11:13, Maurice Yarrow wrote:
  

Hello Tomcat Users Group

I have no problem configuring a multi-level context originating
at the context uri level, e.g.:

http://www.domain.com/context/multi-level-sub-context/servletname

and I have no problem creating a web-app context at the ROOT level,
e.g.:

http://www.domain.com/servletname

These above have been configured of course using context xml
files in conf/Catalina/localhost.

Problem:
Have not been able to find any correct context xml file configuration
(or naming) that will give a multi-level sub context starting at
the ROOT level, .e.g.:

http://www.domain.com/multi-level-sub-context/servletname


It's a separate context, just not a multi-level one.

 multi-level-sub-context.war


p

  

as well as the above

http://www.domain.com/servletname

So: question is:
Can this be done ?
How is it configured ?
What are the respective context xml files named ?

Thanks

Maurice Yarrow





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




No virus found in this incoming message.
Checked by AVG - www.avg.com 
Version: 9.0.698 / Virus Database: 270.14.49/2480 - Release Date: 11/03/09 23:37:00


  



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



Re: Multi-level context starting at ROOT

2009-11-04 Thread David Smith
 ... but I am not acquainted with multilevelcontext.xml.
I'm just using your description as written below w/o the hyphens.

 ROOT#multi-level-context.xml 

So what you really want is for your ROOT app and this other app to share
the same session.  H  I so rarely do much of anything with
sessions.  Maybe someone here can address that question since it appears
to be what you really want.

--David

Maurice Yarrow wrote:
 Hello Tomcat User Group and in particular, David Smith:

 My use-case is embedding meshcms inside my primary web app and
 in a way that they can both share the same session.

 David, I appear to correctly understand and use the

contextname#multi-level-contextname.xml

 context file, but I am not acquainted with multilevelcontext.xml. 
 How is this implemented
 (example?) and what is its relationship to a user-defined ROOT context ?

 Regards,
 Maurice


 David Smith wrote:
 I'm still wondering why you'd want to do ROOT#multilevelcontext.xml when
 it's functionally the same as multilevelcontext.xml.  What use case do
 you have for such a thing?

 --David

 Maurice Yarrow wrote:
  
 Hello Tomcat Users Grp and in particular, Pid and Konstantin Kolinko:

 Thanks for your replies.
 However, I evidently did not clearly state the problem I am having:
 I can define the following context xml files in
 conf/Catalina/localhost:

contextname.xml

 and

contextname#multi-level-contextname.xml

 and these work as documented, i.e.:

http://www.domain.com/contextname/servletname

 and

   
 http://www.domain.com/contextname/multi-level-contextname/servletname

 I can also create a context xml in conf/Catalina/localhost called

ROOT.xml which defines the ROOT web app to be at www.domain.com.

 This works fine at

http://www.domain.com/servletname

 for example.
 But when I define a multi-level-context under ROOT with

ROOT#multi-level-context.xml

 a not-found is returned from

http://www.domain.com/multi-level-contextname/servletname

 I believe this is actually one of the (apparently) unsolved threads in
 the Spring users group, and appears to an issue only with the advent
 of the # hash sign instead of the _ underscore sign formerly used
 in earlier Tomcats (I am using 6.0.18).

 Maurice Yarrow

 Pid wrote:

 On 04/11/2009 11:13, Maurice Yarrow wrote:
  
 Hello Tomcat Users Group

 I have no problem configuring a multi-level context originating
 at the context uri level, e.g.:

 http://www.domain.com/context/multi-level-sub-context/servletname

 and I have no problem creating a web-app context at the ROOT level,
 e.g.:

 http://www.domain.com/servletname

 These above have been configured of course using context xml
 files in conf/Catalina/localhost.

 Problem:
 Have not been able to find any correct context xml file configuration
 (or naming) that will give a multi-level sub context starting at
 the ROOT level, .e.g.:

 http://www.domain.com/multi-level-sub-context/servletname
 
 It's a separate context, just not a multi-level one.

  multi-level-sub-context.war


 p

  
 as well as the above

 http://www.domain.com/servletname

 So: question is:
 Can this be done ?
 How is it configured ?
 What are the respective context xml files named ?

 Thanks

 Maurice Yarrow

 




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



Re: Problem forward HTTP / Soap request using mod_jk

2009-11-04 Thread André Warnier

breako wrote:
...

I wonder couild this be something do with Apache only knowing about the
tomcat server's AJP port and not it's http port?


I have to go right now, but I will answer this one quickly :

You do not have to use mod_jk as a connector between Apache and Tomcat.
There are two other ways :

1) use straight HTTP proxying, using the mod_proxy and mod_proxy_http 
Apache modules.  In that case, your target Connector in Tomcat is the 
standard HTTP one, like you did from the original Tomcat client.


2) use mod_proxy and mod_proxy_ajp.  In that case, the target is the 
same Connector as for mod_jk, and the protocol is also AJP.


With both the above, you can also use balancing.

Look up httpd.apache.org - 2.2. documentation - modules - P for proxy




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



RE: Multi-level context starting at ROOT

2009-11-04 Thread Caldarale, Charles R
 From: Maurice Yarrow [mailto:maurice.yar...@comcast.net]
 Subject: Re: Multi-level context starting at ROOT
 
 My use-case is embedding meshcms inside my primary web app and
 in a way that they can both share the same session.

If you think multi-level contexts share sessions with other contexts with the 
same prefix, you're mistaken; all contexts are independent, regardless of 
whatever similarities their URL paths might have.

My understanding of the servlet spec is that session sharing across contexts is 
not allowed.  Tomcat does have provision for single sign-on, which may be what 
you're looking for.
http://tomcat.apache.org/tomcat-6.0-doc/config/valve.html#Single%20Sign%20On%20Valve

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.


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



RE: ConnectionPool question

2009-11-04 Thread Caldarale, Charles R
 From: Christopher Schultz [mailto:ch...@christopherschultz.net]
 Subject: Re: ConnectionPool question
 
 I believe both the real connection and the wrapper are discarded.

Yes; I should have said the real connection is closed and a new real one 
created for the pool.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.




RE: Thread issue - org.apache.tomcat.util.threads.ThreadPool logFull

2009-11-04 Thread Caldarale, Charles R
 From: Curtis Garman [mailto:curt.gar...@gmail.com]
 Subject: Thread issue - org.apache.tomcat.util.threads.ThreadPool
 logFull
 
 Does anyone know what would cause the following error
 
 Nov 4, 2009 9:30:28 AM org.apache.tomcat.util.threads.ThreadPool
 logFull
 SEVERE: All threads (150) are currently busy, waiting. Increase
 maxThreads (150) or check the servlet status

Likely that the threads are off stuck somewhere they shouldn't be.  Take a 
thread dump and find out what's going on.  No point in speculating when real 
data is easily available.
http://wiki.apache.org/tomcat/HowTo#How_do_I_obtain_a_thread_dump_of_my_running_webapp_.3F

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

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



Re: Multi-level context starting at ROOT

2009-11-04 Thread Maurice Yarrow

Hello Tomcat Users Group and Chuck Caldarale and David Smith:

Chuck, thanks for clearing this up for me.  I guess a simple session obj 
test

would have sufficed to test equality of the two session objects so obtained
from a context and similarly path-named multi-level-subcontext.

Nevertheless, sessions aside, I still have no working context xml 
configuration
that allow a multi-level-subcontext to be specified inside a ROOT-level 
web app,
even though such a multi-level-subcontext works fine inside a 
context-level web
app (example:   http://www.domain.com/context and 
http://www.domain.com/context/multi-level-subcontext)


Maurice


Caldarale, Charles R wrote:

From: Maurice Yarrow [mailto:maurice.yar...@comcast.net]
Subject: Re: Multi-level context starting at ROOT

My use-case is embedding meshcms inside my primary web app and
in a way that they can both share the same session.



If you think multi-level contexts share sessions with other contexts with the 
same prefix, you're mistaken; all contexts are independent, regardless of 
whatever similarities their URL paths might have.

My understanding of the servlet spec is that session sharing across contexts is 
not allowed.  Tomcat does have provision for single sign-on, which may be what 
you're looking for.
http://tomcat.apache.org/tomcat-6.0-doc/config/valve.html#Single%20Sign%20On%20Valve

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.


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




No virus found in this incoming message.
Checked by AVG - www.avg.com 
Version: 9.0.698 / Virus Database: 270.14.49/2480 - Release Date: 11/03/09 23:37:00


  



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



Re: Hash (#) character as context delimiter '/' stand-in

2009-11-04 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Konstantin,

On 11/4/2009 12:06 PM, Konstantin Kolinko wrote:
 2009/11/4 Christopher Schultz ch...@christopherschultz.net:

 For Cocoon, everything is a URL. When Cocoon tries to build URLs to
 point to, say, files on the disk in the deployment directory, it gets a
 URL like file:///home/path/to/tomcat/webapps/foo#bar/some/file which
 ends up trying to access file:///home/path/to/tomcat/webapps/foo which
 is neither a file nor a directory.

 
 That URL should have been written with %23 instead of '#'.

Yes, it should have been. The problem is that Cocoon does something
similar to the following to determine file paths (I can't confirm,
because there are 2900 classes in Cocoon and I have no idea where to start):

new URL(request.getRealPath(xsltFile))

and uses that for everything. :(

This is not a path that I have control over... it's not like I'm
setting-up a configuration file that contains # symbols and I should be
using %23 instead. Cocoon is, IMO, broken in this way because it does
not protect /itself/ from these paths.

See http://issues.apache.org/jira/browse/COCOON-2270 for more details.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkrx0G8ACgkQ9CaO5/Lv0PDQbACgpuMEjYZl/+zf4Pc3bssZxN8r
Bt4AmwWvqFmza6sKCkbF5kfQ1HQ+ksBv
=uR4g
-END PGP SIGNATURE-

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



Re: Thread issue - org.apache.tomcat.util.threads.ThreadPool logFull

2009-11-04 Thread Curtis Garman
Thanks for the link...I will look into this

Curtis

On Wed, Nov 4, 2009 at 12:20 PM, Caldarale, Charles R
chuck.caldar...@unisys.com wrote:
 From: Curtis Garman [mailto:curt.gar...@gmail.com]
 Subject: Thread issue - org.apache.tomcat.util.threads.ThreadPool
 logFull

 Does anyone know what would cause the following error

 Nov 4, 2009 9:30:28 AM org.apache.tomcat.util.threads.ThreadPool
 logFull
 SEVERE: All threads (150) are currently busy, waiting. Increase
 maxThreads (150) or check the servlet status

 Likely that the threads are off stuck somewhere they shouldn't be.  Take a 
 thread dump and find out what's going on.  No point in speculating when real 
 data is easily available.
 http://wiki.apache.org/tomcat/HowTo#How_do_I_obtain_a_thread_dump_of_my_running_webapp_.3F

  - Chuck


 THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
 MATERIAL and is thus for use only by the intended recipient. If you received 
 this in error, please contact the sender and delete the e-mail and its 
 attachments from all computers.

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





-- 
Curtis Garman
Web Programmer
Heartland Community College

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



Re: ConnectionPool question

2009-11-04 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Chuck,

On 11/4/2009 1:17 PM, Caldarale, Charles R wrote:
 From: Christopher Schultz [mailto:ch...@christopherschultz.net] 
 Subject: Re: ConnectionPool question
 
 I believe both the real connection and the wrapper are discarded.
 
 Yes; I should have said the real connection is closed and a new real
 one created for the pool.

Not to belabor the point, but I believe the real connection is simply
discarded and not even closed by DBCP.

I can't find much in the way of documentation about how the abandoned
features work, and I don't feel like reading source code right now :)

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkrx2P8ACgkQ9CaO5/Lv0PAncACfbZ8qCDWovlPVh+DjqmJQyiaq
aQAAnApF8fWXbRL+728QSVWFdmVtpEki
=NpgC
-END PGP SIGNATURE-

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



Re: ConnectionPool question

2009-11-04 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Josh,

On 11/4/2009 12:11 PM, Josh Gooding wrote:
 type=javax.sql.DataSource

[snip]

 res-typejavax.sql.DataSource/res-type

I believe it is these types that must match, and they do. Don't change a
thing.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkrx2VUACgkQ9CaO5/Lv0PCvIQCgvuD2fkIQ7iHH+xlT22SdRmnq
E7YAn0JmNbP22/rm6hwKPchNm1dbbXyj
=zIOM
-END PGP SIGNATURE-

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



Re: webapps question

2009-11-04 Thread Michele Mase'
There are 87 webservices, initially served by 2 tomcat;
The idea was, put (if possible) most of the libs in the common area and
eventually split the whole work into 4 tomcats each one serving 20
webservices.
No hope about different contexts :(
Ok for the commons-logging/log4j part
I don't know if putting the oracle jdbc thin driver into common area could
be an issue (all webservices are using the same db)
Michele


On Wed, Nov 4, 2009 at 2:17 PM, Joseph Morgan joseph.mor...@ignitesales.com
 wrote:

 Michele,

 It looks like all of the jar files you mention can safely be deployed in
 Tomcat's common lib area.

 Another question, though, to ask yourself and your developers is, do you
 really need 100 individual web apps to support the web services you
 have?

 In other words, there is no requirement to have a 1 to 1 correlation
 between applications and web services.

 Joe

 -Original Message-
 From: Michele Mase' [mailto:michele.m...@gmail.com]
 Sent: Wednesday, November 04, 2009 4:56 AM
 To: Tomcat Users List
 Subject: Re: webapps question

 Thanx 4 you answer;
 ps: there are 100 webservices, not webapps
 Pls, help me: I'm not a developer ... and I don't understand the
 disadvantages of static classes/fields loaded from common classloader
 will
 be shared among all webapps, Could you be a little more specific about
 the
 disadvantages?
 Your suggestion is to split the apps into vitualhost like, context.xml
 ecc..?
 I use the oracle odbc thin; which problem should I have putting the jdbc
 driver int the commos/lib ?
 For reference, those are the jars userd in all webservices:
 classes12.jar
 ibatis-common-2.jar ibatis-dao-2.jar ibatis-sqlmap-2.jar activation.jar
 axis-ant.jar axis.jar commons-discovery-0.2.jar
 commons-logging-1.0.4.jar
 jaxrpc.jar LEGO_CONDIVISI.jar log4j-1.2.8.jar mail.jar saaj.jar
 wsdl4j-1.5.1.jar xmlsec-1.4.0.jar
 Michele

 On Wed, Nov 4, 2009 at 11:00 AM, Mikolaj Rydzewski m...@ceti.pl wrote:

  Michele Mase' wrote:
 
  I've 100 webapps on one single tomcat instance.
  Every webapps has in his WEB-INF/lib the same jars
  I've some permgen memory problems too
  Moving all the shared libs in tomcat's root/common/lib should help me
  reducing the perm gen memory usage?
  Should it be a good pratics
 
  It will solve one problem, but will cause others, difficult to trace.
 E.g.
  static classes/fields loaded from common classloader will be shared
 among
  all webapps.
  You should rather refactor your webapp to be able to change its 'work
  context' depending on URI/domain name.
 
  --
  Mikolaj Rydzewski m...@ceti.pl
 
 
  -
  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: Multi-level context starting at ROOT

2009-11-04 Thread Caldarale, Charles R
 From: Maurice Yarrow [mailto:maurice.yar...@comcast.net]
 Subject: Re: Multi-level context starting at ROOT
 
 I still have no working context xml configuration that allow 
 a multi-level-subcontext to be specified inside a ROOT-level
 web app, even though such a multi-level-subcontext works fine
 inside a context-level web app
 (example:   http://www.domain.com/context and
 http://www.domain.com/context/multi-level-subcontext)

I think you're still confused; there's no context inside another one - all 
contexts are completely independent.  The two URI paths you cite above are for 
two separate, disjoint contexts - they do not interact, share anything, or 
otherwise have any relationship with each other beyond the names they are 
accessed with.  (Note that the term subcontext is both meaningless and 
misleading.)

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.


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



RE: Problem forward HTTP / Soap request using mod_jk

2009-11-04 Thread Jorge Medina
Did you add a load blancer worker to your workers.properties? 

Below is what I use to perform load balancing over two Tomcat servers.

I have a similar scenario: Apache in front of two (or more Tomcats). 
Apache forwards the requests using mod_jk. 
My client is sending SOAP requests using Axis2.



worker.list= wlb, jkwatch
##
# Defining a load balancer worker
##
worker.wlb.type=lb
worker.wlb.balance_workers=tomcatserver1, tomcatserver2
worker.wlb.max_reply_timeouts=3
# worker.wlb.retries=2
# worker.wlb.retry_interval=100
# worker.wlb.sticky_session=True
# worker.wlb.sticky_session_force=False
# worker.wlb.method=Request
# worker.wlb.lock=Optimistic

##
# Defining the status workers
##
# A read-only status worker
worker.jkwatch.type=status
worker.jkwatch.read_only=True
worker.jkwatch.mount=/private/admin/watch/jk
# A managing status worker
# worker.jkmanage.type=status
# worker.jkmanage.mount=/private/admin/manage/jk
##
## Balanced Workers (Tomcat Workers)
##
##
# Tomcat Worker (tomcatserver1)
##
worker.tomcatserver1.type=ajp13
worker.tomcatserver1.host=localhost
worker.tomcatserver1.port=8009
worker.tomcatserver1.lbfactor=1
# Connection pool timeout is set in seconds. (10 minutes). If you modify this
# value, you need to modify the AJP connector in the Tomcat server.xml to
# match this value. Note that the value in Tomcat must be specified in 
milliseconds.
worker.tomcatserver1.connection_pool_timeout=600
worker.tomcatserver1.socket_keepalive=True
worker.tomcatserver1.socket_timeout=60
## worker.tomcatserver1.socket_connect_timeout=60
#
# Apache will wait 30 seconds (30,000 ms) for Tomcat to respond, otherwise
# it will return error 504 - Gateway timeout to the client
worker.tomcatserver1.reply_timeout=3
#
# This recovery_options attribute is a bit mask.
# The following bits are allowed:
#  1: don't recover if Tomcat failed after getting the request
#  2: don't recover if Tomcat failed after sending the headers to client
#  4: close the connection to Tomcat, if we detect an error when writing back 
the answer to the client (browser)
#  8: always recover requests for HTTP method HEAD (even if Bits 1 or 2 are set)
# 16: always recover requests for HTTP method GET (even if Bits 1 or 2 are set)
# We will set it to 27, equivalent to the binary 11011
worker.tomcatserver1.recovery_options=27
##
# Tomcat Worker (tomcatserver2)
##
worker.tomcatserver2.type=ajp13
worker.tomcatserver2.host=localhost
worker.tomcatserver2.port=7009
worker.tomcatserver2.lbfactor=1
# Connection pool timeout is set in seconds. (10 minutes). If you modify this
# value, you need to modify the AJP connector in the Tomcat server.xml to
# match this value. Note that the value in Tomcat must be specified in 
milliseconds.
worker.tomcatserver2.connection_pool_timeout=600
worker.tomcatserver2.socket_keepalive=True
worker.tomcatserver2.socket_timeout=60
## worker.tomcatserver2.socket_connect_timeout=60
#
# Apache will wait 30 seconds (30,000 ms) for Tomcat to respond, otherwise
# it will return error 504 - Gateway timeout to the client
worker.tomcatserver2.reply_timeout=3
#
# This recovery_options attribute is a bit mask.
# The following bits are allowed:
#  1: don't recover if Tomcat failed after getting the request
#  2: don't recover if Tomcat failed after sending the headers to client
#  4: close the connection to Tomcat, if we detect an error when writing back 
the answer to the client (browser)
#  8: always recover requests for HTTP method HEAD (even if Bits 1 or 2 are set)
# 16: always recover requests for HTTP method GET (even if Bits 1 or 2 are set)
# We will set it to 27, equivalent to the binary 11011
worker.tomcatserver2.recovery_options=27










-Original Message-
From: breako [mailto:alex.stave...@fineos.com] 
Sent: Tuesday, November 03, 2009 1:35 PM
To: users@tomcat.apache.org
Subject: Problem forward HTTP / Soap request using mod_jk


Hi,
I have two tomcat servers and I can make them talk to each other using soap / 
http no problem.

However, when I put Apache infront of one my tomcat servers and set it up to 
forward http requests to the tomcat server it doesn't get any requests.

I am using the mod_jk to achieve the forwarding. I have tested other types of 
http 

RE: Problem forward HTTP / Soap request using mod_jk

2009-11-04 Thread Jorge Medina
Your uriworkermap.properties must send the requests to the laod balancer worker
Here is a sample uriworkermap.properties
-Jorge

# This file provides mapping for the wlb worker
# defined in workers.properties.
# The general syntax for this file is:
# [URL]=[Worker name]

/yourappcontext=wlb
/yourappcontext/*=wlb

# Lets also define an URI to access the status workers
/private/admin/watch/jk=jkwatch
#/private/admin/manage/jk=jkmanage 

-Original Message-
From: Jorge Medina [mailto:jmed...@e-dialog.com] 
Sent: Wednesday, November 04, 2009 3:15 PM
To: Tomcat Users List
Subject: RE: Problem forward HTTP / Soap request using mod_jk

Did you add a load blancer worker to your workers.properties? 

Below is what I use to perform load balancing over two Tomcat servers.

I have a similar scenario: Apache in front of two (or more Tomcats). 
Apache forwards the requests using mod_jk. 
My client is sending SOAP requests using Axis2.



worker.list= wlb, jkwatch
##
# Defining a load balancer worker
##
worker.wlb.type=lb
worker.wlb.balance_workers=tomcatserver1, tomcatserver2
worker.wlb.max_reply_timeouts=3
# worker.wlb.retries=2
# worker.wlb.retry_interval=100
# worker.wlb.sticky_session=True
# worker.wlb.sticky_session_force=False
# worker.wlb.method=Request
# worker.wlb.lock=Optimistic

##
# Defining the status workers
##
# A read-only status worker
worker.jkwatch.type=status
worker.jkwatch.read_only=True
worker.jkwatch.mount=/private/admin/watch/jk
# A managing status worker
# worker.jkmanage.type=status
# worker.jkmanage.mount=/private/admin/manage/jk
##
## Balanced Workers (Tomcat Workers)
##
##
# Tomcat Worker (tomcatserver1)
##
worker.tomcatserver1.type=ajp13
worker.tomcatserver1.host=localhost
worker.tomcatserver1.port=8009
worker.tomcatserver1.lbfactor=1
# Connection pool timeout is set in seconds. (10 minutes). If you modify this # 
value, you need to modify the AJP connector in the Tomcat server.xml to # match 
this value. Note that the value in Tomcat must be specified in milliseconds.
worker.tomcatserver1.connection_pool_timeout=600
worker.tomcatserver1.socket_keepalive=True
worker.tomcatserver1.socket_timeout=60
## worker.tomcatserver1.socket_connect_timeout=60
#
# Apache will wait 30 seconds (30,000 ms) for Tomcat to respond, otherwise # it 
will return error 504 - Gateway timeout to the client 
worker.tomcatserver1.reply_timeout=3
#
# This recovery_options attribute is a bit mask.
# The following bits are allowed:
#  1: don't recover if Tomcat failed after getting the request #  2: don't 
recover if Tomcat failed after sending the headers to client #  4: close the 
connection to Tomcat, if we detect an error when writing back the answer to the 
client (browser) #  8: always recover requests for HTTP method HEAD (even if 
Bits 1 or 2 are set) # 16: always recover requests for HTTP method GET (even if 
Bits 1 or 2 are set) # We will set it to 27, equivalent to the binary 11011
worker.tomcatserver1.recovery_options=27
##
# Tomcat Worker (tomcatserver2)
##
worker.tomcatserver2.type=ajp13
worker.tomcatserver2.host=localhost
worker.tomcatserver2.port=7009
worker.tomcatserver2.lbfactor=1
# Connection pool timeout is set in seconds. (10 minutes). If you modify this # 
value, you need to modify the AJP connector in the Tomcat server.xml to # match 
this value. Note that the value in Tomcat must be specified in milliseconds.
worker.tomcatserver2.connection_pool_timeout=600
worker.tomcatserver2.socket_keepalive=True
worker.tomcatserver2.socket_timeout=60
## worker.tomcatserver2.socket_connect_timeout=60
#
# Apache will wait 30 seconds (30,000 ms) for Tomcat to respond, otherwise # it 
will return error 504 - Gateway timeout to the client 
worker.tomcatserver2.reply_timeout=3
#
# This recovery_options attribute is a bit mask.
# The following bits are allowed:
#  1: don't recover if Tomcat failed after getting the request #  2: don't 
recover if Tomcat failed after sending the headers to client #  4: close the 
connection to Tomcat, if we detect an error when writing back the answer to the 
client (browser) #  8: always recover requests for HTTP method HEAD (even if 
Bits 1 or 2 are set) # 16: always recover requests for HTTP method GET (even if 
Bits 1 

Re: Tomcat hangs when reloading context if user is logged in

2009-11-04 Thread James Murphy

Chris,

Thanks for all you help :) . We tried commenting out that method (just 
to see if it was the root of the problem) and Tomcat behaved like it is 
supposed to! Now we can work on implementing a work-around for the 
functionality.


Thanks!

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



Re: tomcat https

2009-11-04 Thread Torleif


Hi again.

My server.xml:

Connector 
port=8443 minProcessors=5 maxProcessors=75
   enableLookups=true disableUploadTimeout=true
   acceptCount=100 debug=0 scheme=https secure=true;
   clientAuth=false sslProtocol=TLS 
keystoreFile=/home/user/.keystore keystorePass=mypassword /
--


I run Tomcat as user.

I followed this guide:

http://tomcat.apache.org/tomcat-5.5-doc/ssl-howto.html


Maybe my cert password is not the same as keystore??
I thougt my keystore containing the cert was created with
keytool -genkey -alias tomcat -keyalg RSA  ??

Thanks everyone!!










On Wed, 2009-11-04 at 17:47 +0100, Ognjen Blagojevic wrote:
 Torleif wrote:
  By default place I mean /home/user/.keystore  
 
 /home/user/.keystore? That's strange. Is it maybe 
 /home/tomcat/.keystore? Or you have a user user on your system? Under 
 what user did you create .keystore file?
 
 
  If I choose a different password and modify server.xml accordingly it does
  not work.  
 
 Did you choose the same password for bot keystore AND certificate, as 
 pointed in the Tomcat docs?
 
 
  maybe I shuld use this command instead? ( keytool -genkey -alias tomcat
  -keyalg RSA -keystore /home/user/.keystore
   -storepass mypassword ) ??
 
 No, that is not the source of the problem.
 
 
  I am ok with using changeit as password if this is no security risk. No 
  one
  has access to my computer, but can they get access through https if they 
  know
  the changeit password?  
 
 Well, anyone could access to you webapps (not to the entire file system) 
 regardless of the keystore password.
 
 
  I also have a mailserver on the same ip citadel witch uses webcit for
  webmail.  
  
  The ports on my mailserver and Tomcat are different.  
 
 Then you can use different certificates.
 
 
 Regards,
 Ognjen
 
 
  
 
  
  Thanks again for all help!!  
  
 
  
  Torleif  
   Wed Nov 04 2009 10:28:22 CET from  Ognjen Blagojevic
  ogn...@etf.bg.ac.rs  Subject: Re: tomcat https
 
   Torleif wrote:
   
  I am trying to set up tomcat to use https.
  I used keytool -genkey -alias tomcat -keyalg RSA
  If I use changeit as password for keystore everything works ok.
  If I use a different password it does not work.
  I have modified server.xml with keystorePass=newpassword
  My .keystore is located in default place.
 
 
  
   It could help if you tell us what Tomcat version, OS and version are you 
  using and what is default place.
 
  .keystore file should be on the home directory of the user running 
  Tomcat. E.g. /home/tomcat on Linux, or C:\Documents and 
  Settings\ognjen\ on Windows XP.
 
  Also note: Finally, you will be prompted for the key password, which is 
  the password specifically for this Certificate (as opposed to any other 
  Certificates stored in the same keystore file). You MUST use the same 
  password here as was used for the keystore password itself. (Currently, 
  the keytool prompt will tell you that pressing the ENTER key does this 
  for you automatically.) (tomcat SSL docs)
 
 
   
  If I use changeit as password, will this be a security risk since this
  is a widely known password?
 
 
  
   The way I see it, the security risk is not too big. .keystore file will 
  most probably have the same access rights as your server.xml where the 
  keystore password is stored in cleartext. So, if the unauthorized user 
  is able to access .keystore file it will also be able to access the 
  server.xml, and read the keystore password.
 
  However, if your configuration, backup strategy, or anything else 
  introduces the possibility for unauthorized person to access only the 
  .keystore file (and not server.xml) - or you are simply paranoid - you 
  should change the default password.
 
 
   
  Also I run a mailserver with https web interface.
  Can I use a different https certificate in tomcat or must it be the same
  as my mailserver?
 
 
  
   It really depends of your configuration.
 
  Are both webmail and Tomcat on the same port? Do you run webmail 
  application under Tomcat or not? Do you use httpd or not? Do you have 
  more than one IP address available for the server?
 
  If you use two servers, two different IP addresses OR two different 
  ports on the same IP address, you can have different certificates. In 
  other cases, you can't.
 
  Regards,
  Ognjen
 
  -
  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: Problem forward HTTP / Soap request using mod_jk

2009-11-04 Thread breaks

Thanks to all. I am at home now but will try your suggestions tomorrow.

I was just wondering why I would need a load balancer, uriproperties file or
a status worker just because it is a HTTP POST SOAP request?

I am able to get all other http requests forwarded to my tomcat server
without the above...

 
-- 
View this message in context: 
http://old.nabble.com/Problem-forward-HTTP---Soap-request-using-mod_jk-tp26160709p26204973.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



RE: Problem forward HTTP / Soap request using mod_jk

2009-11-04 Thread Jorge Medina
No, you don't need the load balancer if you only have one Tomcat behind your 
Apache server. 
The status worker is not needed either, but it allows you to monitor the state 
of the load balancer and the workers from a browser. (You can even 
enable/disable workers)

-Original Message-
From: breaks [mailto:astave...@yahoo.com] 
Sent: Wednesday, November 04, 2009 4:57 PM
To: users@tomcat.apache.org
Subject: RE: Problem forward HTTP / Soap request using mod_jk


Thanks to all. I am at home now but will try your suggestions tomorrow.

I was just wondering why I would need a load balancer, uriproperties file or a 
status worker just because it is a HTTP POST SOAP request?

I am able to get all other http requests forwarded to my tomcat server without 
the above...

 
--
View this message in context: 
http://old.nabble.com/Problem-forward-HTTP---Soap-request-using-mod_jk-tp26160709p26204973.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
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: ConnectionPool question

2009-11-04 Thread Elli Albek
As far as I remember, abandoned is a connection that was not closed. So if
you call recycle on a connection it will not generate abandoned message. The
messages that you see are from connections that you do not close. I also
remember that closing a connection closes statements and result sets, but it
has been a while since I read the source.

Give the filter above a shot. It would takes maybe an hour to get running
and can solve all your problems in one go. You may experience a major boost
to your system performance even comparing to closing every connection
(because you will be using a single connection per request as opposed to
multiple open/close).

E

On Wed, Nov 4, 2009 at 11:43 AM, Christopher Schultz 
ch...@christopherschultz.net wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Josh,

 On 11/4/2009 12:11 PM, Josh Gooding wrote:
  type=javax.sql.DataSource

 [snip]

  res-typejavax.sql.DataSource/res-type

 I believe it is these types that must match, and they do. Don't change a
 thing.

 - -chris
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.10 (MingW32)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

 iEYEARECAAYFAkrx2VUACgkQ9CaO5/Lv0PCvIQCgvuD2fkIQ7iHH+xlT22SdRmnq
 E7YAn0JmNbP22/rm6hwKPchNm1dbbXyj
 =zIOM
 -END PGP SIGNATURE-

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




Re: remote debug

2009-11-04 Thread maven apache
2009/11/4 Caldarale, Charles R chuck.caldar...@unisys.com

  From: maven apache [mailto:apachemav...@gmail.com]
  Subject: remote debug
 
  my web container is tomcat of version of 5.5
 
  %CATALINA_HOME%\bin\tomcat6w.exe //ES//tomcat6

 One of the above two statements is wrong.  Which version of Tomcat are you
 really using?\


I am using apache-tomcat-5.5.27(.


  Failed to connect to remote VM. Connection refused.
  Connection refused: connect

 What version of Windows are you using?  I can get JMX/JPDA working with a
 Tomcat service on XP, but not on Vista (haven't tried it on Win7 yet).
  JMX/JPDA works with Tomcat started from a command prompt on both XP and
 Vista.  (The .bat scripts are only in the Tomcat .zip download, not the
 .exe, for some inexplicable reason.)

Win xp with sp3.
That's to say if I want to use the remote debug ,I should use the
tomcat.zip? Should I uninstall the tomcat I am using?


  - Chuck


 THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
 MATERIAL and is thus for use only by the intended recipient. If you received
 this in error, please contact the sender and delete the e-mail and its
 attachments from all computers.


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




Re: What is the difference between running Tomcat 6 as a Windows Service vs. running from the command line?

2009-11-04 Thread Earl Tom


Alan Kennedy-13 wrote:
 
 [Alan]
 I need to find out what is the difference between running Tomcat 6 as
 a Windows Service and running it from the command line.

 The reason is that I'm getting a bizarre bug when a jython based
 servlet is run under Tomcat6-as-Service. But the bug does NOT appear
 when Tomcat 6 is run from the command line using bin\startup.bat.
 
 [Earl]
 Was there a solution found for this behavior?

 It is happening to me as well when I try to install Liferay portal as a
 service (Server 2008, 64-bit JVM, Tomcat 6.0.20 zip file installed with
 64-bit tomcat6 and tomcat6w.exe files substituted).

 I also get a stack overflow error when running as a service, but normal
 behavior when using startup.bat .  After getting startup.bat to run, I
 installed the service using service install.
 If I run tomcat6 from the command line still as Administrator, it also
 fails.
 
 Hi Earl,
 
 I'm not sure if we're talking about the same bug, although it's easily
 possible that it's the same bug, with differing consequences.
 
 I've made a little more progress on what is happening in jython when
 this problem occurs, namely a infinite recursion on method reflection.
 I'm guessing that this may be caused by a combination of classloading
 and security policies, not sure yet. More details from here
 
 http://bugs.jython.org/issue1489
 
 Note from that bug that we've had a report from a user who saw
 identical behaviour when running a minimal jython servlet in BEA
 WebLogic on Ubuntu, whereas the Tomcat on Ubuntu runs the code just
 fine. So this is not a problem specific to Tomcat or to Tomcat on
 Windows.
 
 I'll be continuing my investigations and reports on the jython bug
 report. Please feel free to follow that discussion and/or contribute
 to it.
 
 

Alan,

I ran into a couple more relevant links:

Here's on that actually pertains to Tomcat and Liferay, the setup I'm
trying:

http://www.liferay.com/web/guest/community/forums/-/message_boards/message/3095034

The claim is it's an artifact of compilation options.  The page mentioned
for the binaries is here:

http://www.goldhahn.info/pmwiki.php/Software/TomcatBinaries

I downloaded tomcat6_64bit.exe and tomcat6w_64bit.exe, copied them to the
bin directory, renamed them to tomcat6.exe and tomcat6w.exe, did the service
install, and everything seems to run fine.

I don't know whether you're also running 64-bit Windows, but I hope this
helps anyways.

-- Earl



-- 
View this message in context: 
http://old.nabble.com/What-is-the-difference-between-running-Tomcat-6-as-a-Windows-Service--vs.-running-from-the-command-line--tp25960450p26207815.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



RE: remote debug

2009-11-04 Thread Caldarale, Charles R
 From: maven apache [mailto:apachemav...@gmail.com]
 Subject: Re: remote debug
 
   %CATALINA_HOME%\bin\tomcat6w.exe //ES//tomcat6
 
  One of the above two statements is wrong.  Which version 
  of Tomcat are you really using?\
 
 I am using apache-tomcat-5.5.27(.

Then how it is possible you're fiddling with tomcat6w.exe, which is part of 
Tomcat 6.0, not 5.5?

 That's to say if I want to use the remote debug ,I should use the
 tomcat.zip? Should I uninstall the tomcat I am using?

I would uninstall the .exe version.  You can create the service with the 
service.bat script from the .zip download.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.


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



Re: remote debug

2009-11-04 Thread maven apache
2009/11/5 Caldarale, Charles R chuck.caldar...@unisys.com

  From: maven apache [mailto:apachemav...@gmail.com]
  Subject: Re: remote debug
 
%CATALINA_HOME%\bin\tomcat6w.exe //ES//tomcat6
  
   One of the above two statements is wrong.  Which version
   of Tomcat are you really using?\
 
  I am using apache-tomcat-5.5.27(.

 Then how it is possible you're fiddling with tomcat6w.exe, which is part of
 Tomcat 6.0, not 5.5?

I post wrong. the  command I use in command line is :
 %CATALINA_HOME%\bin\tomcat5w.exe //ES//tomcat5


  That's to say if I want to use the remote debug ,I should use the
  tomcat.zip? Should I uninstall the tomcat I am using?

 I would uninstall the .exe version.  You can create the service with the
 service.bat script from the .zip download.


In a word,I have two choice:
1 use the tomcat.zip of version 5.5  or 6.x.
2 use the tomcat.exe of version 6.x?
 isn't it?


  - Chuck


 THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
 MATERIAL and is thus for use only by the intended recipient. If you received
 this in error, please contact the sender and delete the e-mail and its
 attachments from all computers.


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




RE: remote debug

2009-11-04 Thread Caldarale, Charles R
 From: maven apache [mailto:apachemav...@gmail.com]
 Subject: Re: remote debug
 
 In a word,I have two choice:
 1 use the tomcat.zip of version 5.5  or 6.x.
 2 use the tomcat.exe of version 6.x?

The version of Tomcat doesn't matter, although unless you have a compelling 
reason to use an older level, I would go with the current 6.0.20 zip file.

Generally, things are easier to debug when starting Tomcat via the .bat scripts 
rather than as a service, partly since you get to see in a command window if 
there are any startup errors.  Create a setenv.bat script in Tomcat's bin 
directory to hold any command-line parameters you want to set.

Once you're ready to try Tomcat as a service, install it with the service.bat 
script, and use the tomcat6w.exe program to set additional options and 
start/stop the service.  No point in trying to use the tomcat6.exe program 
directly - it's too hard.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.


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



Re: remote debug

2009-11-04 Thread maven apache
2009/11/5 Caldarale, Charles R chuck.caldar...@unisys.com

  From: maven apache [mailto:apachemav...@gmail.com]
  Subject: Re: remote debug
 
  In a word,I have two choice:
  1 use the tomcat.zip of version 5.5  or 6.x.
  2 use the tomcat.exe of version 6.x?

 The version of Tomcat doesn't matter, although unless you have a compelling
 reason to use an older level, I would go with the current 6.0.20 zip file.

 Generally, things are easier to debug when starting Tomcat via the .bat
 scripts rather than as a service, partly since you get to see in a command
 window if there are any startup errors.  Create a setenv.bat script in
 Tomcat's bin directory to hold any command-line parameters you want to set.

 Once you're ready to try Tomcat as a service, install it with the
 service.bat script, and use the tomcat6w.exe program to set additional
 options and start/stop the service.  No point in trying to use the
 tomcat6.exe program directly - it's too hard.

Thanks for your reply.
I used 5.5 rather than 6.0 because I heard that 6.0 is much different with
5.5 in configuration(such as the port and ect..),I will have a try with the
6.0.zip.Thank you again :).


  - Chuck


 THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
 MATERIAL and is thus for use only by the intended recipient. If you received
 this in error, please contact the sender and delete the e-mail and its
 attachments from all computers.


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