maxWait

2013-04-30 Thread Jose María Zaragoza
Hello:

I'm using Tomcat 6.0.23
I'm using DBCP library to pooling database connections.

When I define a Resource in context.xml
and set  maxWait to 2000 ms ,
sometimes datasource.getConnection() method lasts 15 seconds.

I've to define loginTimeout parameter in JDBC driver to get the effect that
I want  : a timeout retrieving a Connection

What is the meaning of maxWait ? When is triggered this timeout (maxWait) ?


Thanks and regards


Re: maxWait

2013-04-30 Thread Mark Thomas
On 30/04/2013 12:59, Jose María Zaragoza wrote:
 Hello:
 
 I'm using Tomcat 6.0.23
 I'm using DBCP library to pooling database connections.
 
 When I define a Resource in context.xml
 and set  maxWait to 2000 ms ,
 sometimes datasource.getConnection() method lasts 15 seconds.
 
 I've to define loginTimeout parameter in JDBC driver to get the effect that
 I want  : a timeout retrieving a Connection
 
 What is the meaning of maxWait ? When is triggered this timeout (maxWait) ?

maxWait is the maximum time DBCP will wait for a connection to become
available if the pool is at full capacity (i.e. all permitted
connections have been created and are currently allocated to other clients).

In your case, no connection is available and there is still spare
capacity in the pool so a new connection is created. That will take as
long as it takes. Tomcat  DBCP have no control over it.

Mark


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



RE: Multiple tomcat containers or instance on same servers

2013-04-30 Thread Jeffrey Janner
 -Original Message-
 From: Oke Akinola swisstopo [mailto:akinola@swisstopo.ch]
 Sent: Tuesday, April 30, 2013 7:29 AM
 To: users@tomcat.apache.org
 Subject: Multiple tomcat containers or instance on same servers
 
 I would need help to configure different application in their
 respective tomcat container.
 
 Does having multiple containers is same as have multiple instances on
 the same server?
 I already have tomcat 6.0.26 installed through an installer on a
 Windows Server 2008 R2. How do I go about configuring multiple
 containers or instances?
 
 Thanks for your prompt response

First, I highly recommend upgrading to 6.0.36.
Otherwise, it is very easy.  Just run the installer again giving the new 
instance a different name and set of ports.
You should use -1 for the shutdown port on all instances, as it is really not 
needed for Tomcats running as a Windows service.
Otherwise, configure each additional instance as you would a single instance.
Just remember, each connector must have a unique IP_Address/Port combination on 
the system, when you are done.
Jeff


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



Re: Java Applet can not communicate with Java Servlet

2013-04-30 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Chuck,

On 4/29/13 11:20 AM, Caldarale, Charles R wrote:
 From: Christopher Schultz [mailto:ch...@christopherschultz.net] 
 Subject: Re: Java Applet can not communicate with Java Servlet
 
 The servlet spec says that all servlets need to be in a package.
 
 No, it doesn't - but it's still a good idea.

Hrm, I thought that was in the servlet spec, but it's definitely not.
Still a good idea and probably should be treated by most people as a
soft requirement.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJRf86jAAoJEBzwKT+lPKRYoC4QAIheShUhLc6mBGQHXcD2VleD
iE3peJwlYdXwho2xN8vWz9gXuHBLzJFrLyHOLKqZoD0d7q+dVyg2S4drBb83TP5V
+XYjizHlNT66E7kxUmNpUs9sVDXznmtJdr68jXkvFSi65k5FOvHYoWZifKfsoTWs
Rq42kGu4lJfvanyQF4brPtCrJO8DJT8N9mF0RhdBK3Eb4M5fVWuR35ckhHWKOI7p
+Qq9BcM+hxTAGQodjkM4b0TEJMFfWhzh8lknc4yzZww/Xh+hUl0vj+NndCHJjC4K
k7jV2vnQXcz0dMJpZG762jrkKxxAIPzmd1IEMQ1iA2bHv3EXOUrnmp3G4Uv/do/I
1eDM4exF7c7kGsESvStwko5uAcHioGuutTJ1b+vh/XzHo0+l3bXKiWXntb3qZvQz
xwOkB4sHghAWuxEhVdbqVZYsAX05fNBB//S+U4kv19qlLBtSWuT1PaUZ0cDFgNFc
bX6DrPnYypYRBHH2E5JYz8OI3O2ZVFHEaKSCoY6tHFvo1moyJ4QZ7lbxVojUf1ZP
yewFm8nQuQrSkpMEsUHGJ1iSiH5VS1C4jtTglRTQW52kYFx504rIeIIf3QxT5IwI
eOwlF0eNRH+hWvvYebg3cZTtMNDZdr06Uh8LAoW31awLtJwJvehNsZDYwrA60kNM
3l4YYqwavu6TMN7RFLRx
=w4tx
-END PGP SIGNATURE-

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



Re: getting the request that created the session

2013-04-30 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Leon,

On 4/29/13 12:55 PM, Leon Rosenberg wrote:
 However, in my case, I am developing a library that is used by
 others in their projects (http://moskito.anotheria.net). It comes
 already with 8 filters and this is a lot.

If you want the effect of the filters without the stack trace(s), you
could implement your filters somewhat differently (but still implement
the Filter interface, so they can be used separately if desired) and
then wrap them into a single compound-filter... something like this:

public class SourceIPSessionFilter
implements Filter, RequestSetUp
{
public void doFilter(ServletRequest request,
 ServletResponse response,
 FilterChain chain)
{
setUpRequest(request);
chain.doFilter(request, response);
}

public void setUpRequest(ServletRequest request)
{
HttpSession session =
((HttpServletRequest)request).getSession(false);

if(null != session)
session.setAttribute(SOURCE_IP, request.getRemoteAddr());
}
}

public class MetaFilter
implements Filter
{
private ListSetUpFilter subFilters;

public void doFilter(ServletRequest request,
 ServletResponse response,
 FilterChain chain)
{
for(SetUpFilter f : subFilters)
f.setUpRequest(request);

chain.doFilter(request, response);
}
}

Obviously, this is a small glimpse into what you can do -- maybe you
want set up and tear down filters, and maybe those that do both,
etc. But the point is that you call a method that /returns/ before the
filter chain is invoked. Instead of a classic interceptor pattern,
it's more like a phased-interceptor where the first phase runs
separately from the second phase.

Implementing the individual filters as formal Filters as well as your
other customized interface allows your users to use them in either
way: with the MetaFilter to reduce stack trace clutter or individually
so they can .. I dunno.. have more control or maybe they like long
stack traces.

One more thought: stack-trace length is really irrelevant. Honestly, I
think you are coding-around something that is totally unnecessary.
Stack traces for web applications are notoriously long -- sometimes
dozens and into the hundreds of calls (especially using Weblogic in my
experience). I wouldn't kill yourself over trying to reduce your
users' stack traces from 50 nested method calls to 42... nobody is
going to notice.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJRf9FUAAoJEBzwKT+lPKRYrkYP/3bBl19qVqgrfUTBAcsYxPR0
fZr+TLjL1qahymcstMyx0PMKpwV1syq2zJNHhAu/5vH0y5W+cu9IZIqiXdY48pSm
PEizqzQ37Mbnf+HbE57HU2rDwT1ZrgM80oLIWU22OGKxWf0XNuDsfpsZ/ksbm7gt
P5XIk/qEamrszJsNGF5qys4jaGaVV4btIi0+QCKD7CMRn8z+jGFZZOiScrQ0bdJZ
Ngnv6ljBx0Dqt6PlkLzJBteC8/FBaTaY/LighSQLXt1A7pKZz/WHhiucozmJ6ZQN
ae6klVr6AY0EQ/tRdGsZbbmlRIRuwlVhYASUbQ2bMaqeh9OtQIwpQAlUuqCR1jKj
s/9703NNUL7xicQ4RmU5JNF8iRJNmvu5h9GkKHNByGbi2y9JqbhVGXcp6i07zt9J
qqWCY0Km+3rzinRwZ38eEKjHI+Idl1WdqUMuPBxjXEqsMUFa+GFo0tS8Obvsg4Nl
H5qFVb2J0XyLlVbBMd+fbS/mncOMcnpDGU1lZjxWeBPL0yrXRpz+P5b45rJio5zi
VXMtUO0OYthjekmadA8QSTEapGbxvgxXHO2W7TfrfJizDeeORMxL/rgGkHlOTzuG
UUzLs/ek++VBzjOyTk6KXFqUMOSBbwRbIlX7k7hmP/uVyo2aef3uHNBjwI/Tkt3Z
iHTcuysdAyHbNlkf6cY5
=nXLy
-END PGP SIGNATURE-

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



回复: Java Applet can not communicate with Java Servlet

2013-04-30 Thread qingtao peng
Have you any document for me to consult?



 发件人: Christopher Schultz ch...@christopherschultz.net
收件人: Tomcat Users List users@tomcat.apache.org 
发送日期: 2013年4月29日, 星期一, 11:01 下午
主题: Re: Java Applet can not communicate with Java Servlet
 

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Peng,

On 4/29/13 10:05 AM, qingtao peng wrote:
 uc.setRequestProperty(Content-type,application/xwww-form-urlencoded);

I
 
think you want:

application/x-www-form-urlencoded

 res.setContentType(text/html;charset=GB2312);

Why not use UTF-8 like you did in the Applet? What you have done is
not wrong and it should work, but it does seem a little odd to use
different character encodings in different places.

 I have started the apache-tomcat-7.0.32 server ,then I have typed
 the network address of DbApplet.htm in the  address field of the 
 browser.I click on the button in the Applet,but  receive 
 java.io.FileNotFoundException error.The error is 
 java.io.FileNotFoundException: 
 http://localhost:8080/Servlet/DbServlet.Where do I place DbServlet
 ?

The servlet spec says that all servlets need to be in a package. So
you should have a package statement at the top of your .java file,
then re-compile.

 That is, which directory  do I place under in
 apache-tomcat-7.0.32.

Assuming your package is my.pkg, then you want your .class file here:

.../mywebapp/WEB-INF/classes/my/pkg/DbServlet.class

 What is the network address of this Servlet .I thank for helps.

Network address (hostname) will be wherever you configured Tomcat to
listen (localhost? www.foo.com?). The URL will depend upon how you
have mapped the servlet in web.xml. Have you done that?

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJRfotFAAoJEBzwKT+lPKRYOLMP/0XuXo5m06m6cXUfv90Ngh+U
Vpy4L9y8WCWpHthtJqxk4EDRLT1K0Y5hV6cW0S7BzeH9ynh2VaKVvcWMR3KPcwts
Pc60/TUMj7qGLzXkTfBxxUnWGzY6fQLq4KRJdiHDQvycnw/KwYbM1FjDU9PjG2vi
yeEZQhEqMrP+fHCq8bYLAH+nuqngIGt59HGlN+1Umz5rsguSu6uq/ymaXUYEzyXZ
k1lqDwKSTGn7x4LD+AOqzJxH549bMjFVqexE5Fw4yFCfxChAP7zQwnDhL1jkKcsB
TXZJKQ5wNqQmHYg/C/9Cf+jKg7wmF6nEyw3FB4zDcYhKnGXaBBq2S8zF61Y8wKq3
QPkbyMfC8zPivXC1Jx28TyDJVQ81SLyKGB9JYfLZSuGvpN3rEV5sXOVrwKZw4+D7
mRYrwCYshm2/ueFALPXEjZbbAQHiXSqISDSdiMxYbIazMOCgxwcWcBfh7Rd2/g5+
rWU/xDdM0rUaIEkRVfA5bVQg9zNOqqoZFe7aEFNlBK0Y02LY2G9Bi2VtrfVMVnHo
gXxf0efIn7fyI9ajsh1JFm/f+NxKvZissEPqDRr7pWV0qyqcr8YfErrPT6jYMPl9
lGSF2RIFXO2zaxJ2x6pwnLxWl/EYXxayFPqoCQXTw3lBRLaCeVG+Ftw+l8ni+Gm7
aIzoBlfT46MVINdwePvB
=UAT7
-END PGP SIGNATURE-

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

Re: getting the request that created the session

2013-04-30 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Leon,

On 4/27/13 5:08 PM, Leon Rosenberg wrote:
 is there any possibility to get the first request from a session
 (or any request from a session) from the HttpSessionListener. 
 Background, I want to count sessions by top level domains. I'm
 doing it now in a combination of filter and listener. Filter for
 new sessions, putting a mark for already counted sessions, and
 listener for destroyed session. However, I would like to get rid of
 the Filter, if its possible somehow. For that, I need to get user's
 ip adress somehow.

Back to the original issue: tracking sessions.

How often do you need to search these sessions for where they came
from? Perhaps it's enough to just mark each session with the first IP
address you knew about. I mean, how often does someone change IP
addresses during their session (under normal circumstances... yes,
proxies can play games, but it's probably not going to matter for your
uses, here).

Once you've marked each session, you could use JMX to enumerate the
sessions and then search for whatever you want. That might be a better
pattern for lots of different session-manipulation strategies, anyway.

As for this particular requirement (TLDs for session-creation), that's
a fairly narrow requirement that most people aren't going to have...
so they aren't going to enable that Filter. If they don't enable it,
it doesn't appear in the stack trace. Are you suggesting that you'd
enable this filter by default?

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJRf9NGAAoJEBzwKT+lPKRYky4QAJo3Lnw95VUQdaNHWZe+9lKM
8xvsPJ2mwi9QOML+IFGYG9cxpKVF5MT2W632V6IVlght5LGX98+mKmXTsT7Dzr0k
gVBKf8Fa4QGlhsEY3AXlTzIxpuFOAWj/iNT15osBTSV6g6aaUXB4QOmKfsLhJL4B
1IC5o5Q0KR5pHIL/g7zWDCZLph+HrarW5xhVwFyBqWkAusjOz9lqlzsFdd6J6zf5
bBWCwD6OQ7JpCsOEyvJ/7i9NXF2gq3a+V9o2exfCWsh7A+ESzYKJLCU3swZRu15x
NbNLDr3TBRmNkEXSIcoBH2Jl5mv1rpp69KfZDUjZQQZHXESIl+wNbpaOj4BqdSxp
QGPI4UYJ7E1to1GSqLhXF3OE0TGcrCsctVTAy1eGGbEeO/aik4PC3zmjCSPx42k+
xNz09uO+GUyyY5jC3qmNgBz+9qfdYmC2CHruEJwQVrZRPYWyNKjxo6ceA76xC16I
LCGTQrA3888UfmS2L0cZ7KFlbkwPMI0I1lQtK72OOeLSJ+mrMaGW8d45rrbOaYR5
2UC//e18IdYZCVbw4RYsybaiNZ24U6rpkfPMA012b1CKHSlpcsDMdEfag/LxM2tk
W4UaDYbbd9rf5Sy+r8a1iyYBYBcMZ27vTdsgPPdenoYefFd7ODwNvaUAEnMgU/DE
DSu2GTToTojiQvG7grAv
=eHuL
-END PGP SIGNATURE-

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



Re: Multiple tomcat containers or instance on same servers

2013-04-30 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Oke,

On 4/30/13 8:28 AM, Oke Akinola swisstopo wrote:
 I would need help to configure different application in their 
 respective tomcat container.
 
 Does having multiple containers is same as have multiple instances
 on the same server? I already have tomcat 6.0.26 installed through
 an installer on a Windows Server 2008 R2. How do I go about
 configuring multiple containers or instances?

I thought sure that the Tomcat Windows Service page of the users' guide,
but it is /not/ there:
http://tomcat.apache.org/tomcat-7.0-doc/windows-service-howto.html

I wonder if there are any heavy Microsoft Windows users that could
offer to write a section on Multiple Tomcat Instances specifically
with Microsoft Windows Services. The file RUNNING.txt only explains
how to set up Tomcat itself (CATALINA_HOME versus CATALINA_BASE) but
says nothing about how to configure Tomcat's service runner to point
to one (other than inferring that one ought to set CATALINA_HOME and
CATALINA_BASE appropriately).

For instance, it's probably important to give the services distinct
names ;)

I probably wouldn't do this myself, but can Tomcat be installed
twice (or thrice, etc.) using the installer so I don't have to
configure the service(s) manually from the command-line? Yes, I'll get
multiple copies of Tomcat installed on my disk, but I probably don't
care about that if the installer can set up the service with a unique
name, etc. If this kind of thing won't work or is a horrible idea,
that should be clear from the users' guide.

André? Jeff? Mark E?

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJRf9WIAAoJEBzwKT+lPKRY2qsP/iobjPWd35E4zhVI4qwVCzZ+
9gIKqGmv2Sm1aESWW6QbOX3d9HndP2BrogVdGoCujBy9DsA0xp/l7M5Dxv0BPr+g
9k+whMZMijbL2FjgNmh8f9fVF2XR2uN9jxH3X7bVWJ7aO7AWwciaYhtpC9jug9nV
sTPpEp4DCW2Ub8SkVc28lTWC8pC0JP6i1M4yPbpJxY99qgHZDm5C8po6GC83ThyJ
o6gdacjti/Vg750+iB9E0103eloamiPE7zLHyo2jOq+fxt0Gypf8tPoC4iffflVD
rz/5kQGWLupK2mTaa3Ab8CAfoDi7arIHQ2g7XwmOoHXmFXhB3afJVjCV6+DztxKK
gec56LUt6pxtInE2L8jxwWxPl11BA7nID2lSdzb4f7TtZ4DAR0oXqeOUz1IUCKU/
+WMxUnfOfdFRRfe1vU6yfMZ0Dh6wTcb4fnRQU6Om2fygFQ/2bXsq8d/1hYzBTcHu
z9VzyZgyjrKnxJrwCTCZTbYxGstzK3NHxmFgqdrshuLlfKRREjLQ4WseAkI1gOJH
OXohwrYfRN7YGc7B1Vpvvo4u6B2r3tC6xcA3/MoRJbsNPUK9OvY25Dxrhf0ZGcrS
pdQORfZo6ti0onID8Rx16UW9/XlnGESEk4/ii1WVRuVFM2dMluLEJ5+G43OptpgA
axpK3tkEWaQVHpFchOU8
=/7M2
-END PGP SIGNATURE-

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



Re: maxWait

2013-04-30 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Mark,

On 4/30/13 8:22 AM, Mark Thomas wrote:
 On 30/04/2013 12:59, Jose María Zaragoza wrote:
 Hello:
 
 I'm using Tomcat 6.0.23 I'm using DBCP library to pooling
 database connections.
 
 When I define a Resource in context.xml and set  maxWait to
 2000 ms , sometimes datasource.getConnection() method lasts 15
 seconds.
 
 I've to define loginTimeout parameter in JDBC driver to get the
 effect that I want  : a timeout retrieving a Connection
 
 What is the meaning of maxWait ? When is triggered this timeout
 (maxWait) ?
 
 maxWait is the maximum time DBCP will wait for a connection to
 become available if the pool is at full capacity (i.e. all
 permitted connections have been created and are currently allocated
 to other clients).
 
 In your case, no connection is available and there is still spare 
 capacity in the pool so a new connection is created. That will take
 as long as it takes. Tomcat  DBCP have no control over it.

Sounds like a resource limit in the db side. If you have, say,
maxActive=10 but your database only allows you to have 5 concurrent
connections, then your pool will essentially max-out at 5 connections
and the 6th connection will wait potentially forever to connect (if
that's the behavior of the server, which seems like an odd way to
behave rather than just rejecting the connection). I suppose it's
possible that, given a connection-failure, dbcp retries the connection
and just fails over and over. But then I'd expect it to a) give up
after a while with an exception or b) never connect, since there are 5
existing connections.

Good to know that maxWait only applies when waiting for a connection
from the existing pool and not when a new connection is being attempted.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJRf9qeAAoJEBzwKT+lPKRY90cP+gOykLSKfROhubEFTTDmkKHu
2pDAkI1YxgDTEPub7CMHS8OXiR77FwyKyrdjfrbEQ+0X09gH8FrbOefHohe4vpT7
QsmL+YKuR2cMZHBBnNCDdorQvT/csctbNsM0SbV9d2ajW1b8GtmMSugM6dBw1ot5
SsH7o/czrQ1FcCr/GrL8OXnBhwmH5bblNfIeQIvFDPselt44Q5sXytEo9Sw/we5E
3GD4s/18m/o0nFBcJ5QiAtVlGu7ZjGQVfJB+ydu7PLjZDWfSZl4mY1qSQoMBdPzM
vVgBZ3O68UekHH/cU6DuSBWPaqa1Ue2J72BRXRkM62r5VvzMJRakJU8zzWQofWmL
KbyEfNKapK4LY9wKPg7tjQpKJltUk2jjtbPgpC2bILISl7sGegkSed22bE0L4Zhc
6SvmGms7YyWB0H0xmk21PaY3vcF5+uLmyCccfLNnZThqKHmwwDLeYiGm3DSbFpRn
Wm2yNn07eeW8IYrvx+tMg9PZYw+IyjlESjIwWOx08/zJ9Ubw5TknqB00g3eD8eWh
7lbQNesaVuhBfQ9omcbBbmuyCKUGUGlEuLYdEhN2pXHBiXVzzEocZ5rg5MACJ4Iq
k2LVw80QcFdLcgKPeYmovWNkvydaATR5HUXdBd70yYdBIYvx6hy6ZcDvK/AyR8YW
OWBKrlWot3ZiK9CxWSVl
=b0eN
-END PGP SIGNATURE-

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



Re: 回复: Java Applet can not communicate with Java Servlet

2013-04-30 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Peng,

On 4/30/13 10:15 AM, qingtao peng wrote:
 Have you any document for me to consult?

Please don't top-post.

Were my responses helpful? I'm not sure you need any document to
consult, though you probably should read the Servlet Specification.
It's quite readable.

- -chris

  发件人: Christopher Schultz
 ch...@christopherschultz.net 收件人: Tomcat Users List
 users@tomcat.apache.org 发送日期: 2013年4月29日, 星期一, 11:01 下午 主题: Re:
 Java Applet can not communicate with Java Servlet
 
 
 Peng,
 
 On 4/29/13 10:05 AM, qingtao peng wrote:
 uc.setRequestProperty(Content-type,application/xwww-form-urlencoded);

 
 I
 
 think you want:
 
 application/x-www-form-urlencoded
 
 res.setContentType(text/html;charset=GB2312);
 
 Why not use UTF-8 like you did in the Applet? What you have done
 is not wrong and it should work, but it does seem a little odd to
 use different character encodings in different places.
 
 I have started the apache-tomcat-7.0.32 server ,then I have
 typed the network address of DbApplet.htm in the  address field
 of the browser.I click on the button in the Applet,but  receive 
 java.io.FileNotFoundException error.The error is 
 java.io.FileNotFoundException: 
 http://localhost:8080/Servlet/DbServlet.Where do I place
 DbServlet ?
 
 The servlet spec says that all servlets need to be in a package.
 So you should have a package statement at the top of your .java
 file, then re-compile.
 
 That is, which directory  do I place under in 
 apache-tomcat-7.0.32.
 
 Assuming your package is my.pkg, then you want your .class file
 here:
 
 .../mywebapp/WEB-INF/classes/my/pkg/DbServlet.class
 
 What is the network address of this Servlet .I thank for helps.
 
 Network address (hostname) will be wherever you configured Tomcat
 to listen (localhost? www.foo.com?). The URL will depend upon how
 you have mapped the servlet in web.xml. Have you done that?
 
 -chris
 
 -

 
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJRf9r+AAoJEBzwKT+lPKRY7n4QAKd9JFL5NXpjukyS5zgq4jni
QfrRiAooLl/2OQuO6II3TM7sYMEZFOM6b0eVhYUpeaguXFVqXslEANaEbkY2+Ng3
a/b+sPB2Nx7yszv4qtRbbR4uge/YzUJ1pYmtqDtMDXU7qeh3zjdEkSqgM76CXfjh
8a1gPjXFkjeoFCvdf0wUwZI0C8tChvWK33omAAFvmoQSqYKQcHSXVi7gIKf+wYcs
Sq+4oy//LZnegGLON/LqH2CAbBblPw3vd/eaGVmDcavtSpvz0rBc2bis7R6ejpjx
s54dN+doJSrZfaQPqC4RfpeFubdvPpwW5OEKWzPNZ/UhrnZ4/nx/RPDwDdRkZOyF
l9RxPH2i4xY6n0HUNIg+EaQPXzdsPkH45/6hNz+2uOeeJc4u7DFZHT2ieF8ATt4T
JfrcsNdIgvvvht/shXOL+8ebbql7Azudtv2PXBWgs4AxIzj4sO6cschmKKgNzc+A
p6DGi/TMlsiMHlt/DqKND66UZHNete9hTwkeQsfuEpnL6Lb6QfSPOZePirCBx4Se
yFLPExKmNYDWWrAvIJMDPyEhDzHapO1n1uvXCvv5Iw9hw0BhfVtr3a4MTVyVGE9n
J7nhwtT5kvExUGSm+BVEUOpxcvsYgtN3kInRU9HsinPC8s3DLz4rb0TNZtnBM6ml
Xe3z87i4JLKr28g5kyMK
=glbJ
-END PGP SIGNATURE-

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



Re: Multiple tomcat containers or instance on same servers

2013-04-30 Thread David kerber

On 4/30/2013 10:30 AM, Christopher Schultz wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Oke,

On 4/30/13 8:28 AM, Oke Akinola swisstopo wrote:

I would need help to configure different application in their
respective tomcat container.

Does having multiple containers is same as have multiple instances
on the same server? I already have tomcat 6.0.26 installed through
an installer on a Windows Server 2008 R2. How do I go about
configuring multiple containers or instances?


I thought sure that the Tomcat Windows Service page of the users' guide,
but it is /not/ there:
http://tomcat.apache.org/tomcat-7.0-doc/windows-service-howto.html

I wonder if there are any heavy Microsoft Windows users that could
offer to write a section on Multiple Tomcat Instances specifically
with Microsoft Windows Services. The file RUNNING.txt only explains
how to set up Tomcat itself (CATALINA_HOME versus CATALINA_BASE) but
says nothing about how to configure Tomcat's service runner to point
to one (other than inferring that one ought to set CATALINA_HOME and
CATALINA_BASE appropriately).

For instance, it's probably important to give the services distinct
names ;)

I probably wouldn't do this myself, but can Tomcat be installed
twice (or thrice, etc.) using the installer so I don't have to
configure the service(s) manually from the command-line? Yes, I'll get
multiple copies of Tomcat installed on my disk, but I probably don't
care about that if the installer can set up the service with a unique
name, etc. If this kind of thing won't work or is a horrible idea,
that should be clear from the users' guide.

André? Jeff? Mark E?


I might be able to put some time into this over the nest few days; I 
have a system with about a dozen services all running from the same 
installation of TC.  I have written some batch files that handle the 
service creation for me, though I tweak the TC configuration .xml files 
manually.


D

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



Which version of tomcat for apache 2.2.24 and JDK 1.6.0

2013-04-30 Thread Dariusz Dolecki
Hi,

Which version of Tomcat is best for compatibility with these releases of
apache and JDK. Please help, we are on a deadline.

Regards,

Dariusz


RE: Which version of tomcat for apache 2.2.24 and JDK 1.6.0

2013-04-30 Thread Carrillo, Dan
If you want to utilize Servlet spec 3.0 or JSP spec 2.2 then use Tomcat version 
7.0.39.  This is compatible with Java 1.6.

If you prefer or are constrained to using the older servlet or JSP 
specifications, then use Tomcat version 6.0.36.

If you don't know or don't care, then my recommendation would be to use the 
latest stable version of Tomcat 7 because of the bug fixes and security 
enhancements.

Both Tomcat 6 and 7 are solid.

Do you plan on using the AJP connector with Apache httpd?

-Original Message-
From: Dariusz Dolecki [mailto:dariusz.dole...@gmail.com] 
Sent: Tuesday, April 30, 2013 8:09 AM
To: users@tomcat.apache.org
Subject: Which version of tomcat for apache 2.2.24 and JDK 1.6.0

Hi,

Which version of Tomcat is best for compatibility with these releases of apache 
and JDK. Please help, we are on a deadline.

Regards,

Dariusz


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



context.xml vs ROOT.xml

2013-04-30 Thread Jason Aleski
I'm wanting to configure a database connection.  I've got my 
configurations stored in the META-INF/context.xml file, but because I'm 
not deploying my application as a WAR, the context.xml is ignored.


I can copy my application's context.xml and place it in the 
tomcat/conf/context.xml and it works.  I can also place the database 
connection in the tomcat/conf/Catalina/localhost/ROOT.xml and it works.


My question is, which one should I be using?  I see examples of both 
types of configuration files.  With some of the off-the-shelf 
applications we use, I see it in the ROOT.xml.  But I'm reading a lot 
where people are using the context.xml.  I'm using Tomcat7 and really 
can't find anything that says one file is better than the other.  The 
only thing it looks like is that the ROOT.xml is strictly for that 
particular application container, whereas the context.xml seems more 
global.  If I'm only running one application, does it really matter?  
I've got it working in either case, just more-less curious.


-JA-



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



RE: Which version of tomcat for apache 2.2.24 and JDK 1.6.0

2013-04-30 Thread Caldarale, Charles R
 From: Carrillo, Dan [mailto:dcarri...@idanalytics.com] 
 Subject: RE: Which version of tomcat for apache 2.2.24 and JDK 1.6.0

 If you want to utilize Servlet spec 3.0 or JSP spec 2.2 then use Tomcat 
 version 
 7.0.39.  This is compatible with Java 1.6.

 If you prefer or are constrained to using the older servlet or JSP 
 specifications,
 then use Tomcat version 6.0.36.

No, Tomcat 7 supports the older specs as well.  No reason to use Tomcat 6 at 
this point.

 - 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: Which version of tomcat for apache 2.2.24 and JDK 1.6.0

2013-04-30 Thread Dariusz Dolecki
Does it matter if we are using AJP connector?


On Tue, Apr 30, 2013 at 10:56 AM, Caldarale, Charles R 
chuck.caldar...@unisys.com wrote:

  From: Carrillo, Dan [mailto:dcarri...@idanalytics.com]
  Subject: RE: Which version of tomcat for apache 2.2.24 and JDK 1.6.0

  If you want to utilize Servlet spec 3.0 or JSP spec 2.2 then use Tomcat
 version
  7.0.39.  This is compatible with Java 1.6.

  If you prefer or are constrained to using the older servlet or JSP
 specifications,
  then use Tomcat version 6.0.36.

 No, Tomcat 7 supports the older specs as well.  No reason to use Tomcat 6
 at this point.

  - 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: Which version of tomcat for apache 2.2.24 and JDK 1.6.0

2013-04-30 Thread Carrillo, Dan
Then documentation needs to be updated
http://tomcat.apache.org/whichversion.html


-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] 
Sent: Tuesday, April 30, 2013 8:57 AM
To: Tomcat Users List
Subject: RE: Which version of tomcat for apache 2.2.24 and JDK 1.6.0

 From: Carrillo, Dan [mailto:dcarri...@idanalytics.com]
 Subject: RE: Which version of tomcat for apache 2.2.24 and JDK 1.6.0

 If you want to utilize Servlet spec 3.0 or JSP spec 2.2 then use 
 Tomcat version 7.0.39.  This is compatible with Java 1.6.

 If you prefer or are constrained to using the older servlet or JSP 
 specifications, then use Tomcat version 6.0.36.

No, Tomcat 7 supports the older specs as well.  No reason to use Tomcat 6 at 
this point.

 - 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




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



Re: Which version of tomcat for apache 2.2.24 and JDK 1.6.0

2013-04-30 Thread Mark Thomas
On 30/04/2013 17:14, Carrillo, Dan wrote:
 Then documentation needs to be updated
 http://tomcat.apache.org/whichversion.html

No it doesn't.

The Servlet specifications are backwards compatible so, for example, any
Servlet 2.5 app will run on container that implements Servlet 3.0 such
as Tomcat 7.

Mark

 
 
 -Original Message-
 From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] 
 Sent: Tuesday, April 30, 2013 8:57 AM
 To: Tomcat Users List
 Subject: RE: Which version of tomcat for apache 2.2.24 and JDK 1.6.0
 
 From: Carrillo, Dan [mailto:dcarri...@idanalytics.com]
 Subject: RE: Which version of tomcat for apache 2.2.24 and JDK 1.6.0
 
 If you want to utilize Servlet spec 3.0 or JSP spec 2.2 then use 
 Tomcat version 7.0.39.  This is compatible with Java 1.6.
 
 If you prefer or are constrained to using the older servlet or JSP 
 specifications, then use Tomcat version 6.0.36.
 
 No, Tomcat 7 supports the older specs as well.  No reason to use Tomcat 6 at 
 this point.
 
  - 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
 
 
 
 
 -
 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



tomcat apr openssl logging

2013-04-30 Thread Jeremy Bowers
My searches for the answer to this question have so far not turned up a 
solution.  I've found others asking the same question but the only non-answers 
I've found are to utilize a full apache httpd server or go back to jsse for 
logging.  If this has been answered before, I sincerely apologize, but my 
search terms haven't found an answer as of yet.  I'm hoping someone on here can 
help:

How do I go about setting up server side logging to gain more detailed 
information about ssl connections when using tomcat with apache tomcat native, 
apr, and openssl for https?

Thanks!
-Jeremy


RE: context.xml vs ROOT.xml

2013-04-30 Thread Caldarale, Charles R
 From: Jason Aleski [mailto:jason.ale...@gmail.com] 
 Subject: context.xml vs ROOT.xml

 I've got my configurations stored in the META-INF/context.xml 
 file, but because I'm not deploying my application as a WAR,
 the context.xml is ignored.

Why do you think it's ignored?

 I can copy my application's context.xml and place it in the 
 tomcat/conf/context.xml and it works.

And is exposed to _all_ of your webapps, since conf/context.xml is implicitly 
included in every webapp.

 I can also place the database connection in the 
 tomcat/conf/Catalina/localhost/ROOT.xml and it works.

Which is where it belongs, when it's supposed to apply to the default webapp 
only.

 If I'm only running one application, does it really matter?

Are you really running only one application?  Have you actually removed all of 
the others that come with Tomcat, including the manager?

Think about what happens when you decide to install a second webapp; best 
practice dictates that you not have to modify the global config to do so.

 - 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: Which version of tomcat for apache 2.2.24 and JDK 1.6.0

2013-04-30 Thread Caldarale, Charles R
 From: Dariusz Dolecki [mailto:dariusz.dole...@gmail.com] 
 Subject: Re: Which version of tomcat for apache 2.2.24 and JDK 1.6.0

Don't top post.

 Does it matter if we are using AJP connector?

No.

 - 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: Multiple tomcat containers or instance on same servers

2013-04-30 Thread Jeffrey Janner
 -Original Message-
 From: Christopher Schultz [mailto:ch...@christopherschultz.net]
 Sent: Tuesday, April 30, 2013 9:31 AM
 To: Tomcat Users List
 Subject: Re: Multiple tomcat containers or instance on same servers
 
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA256
 
 Oke,
 
 On 4/30/13 8:28 AM, Oke Akinola swisstopo wrote:
  I would need help to configure different application in their
  respective tomcat container.
 
  Does having multiple containers is same as have multiple instances on
  the same server? I already have tomcat 6.0.26 installed through an
  installer on a Windows Server 2008 R2. How do I go about configuring
  multiple containers or instances?
 
 I thought sure that the Tomcat Windows Service page of the users'
 guide, but it is /not/ there:
 http://tomcat.apache.org/tomcat-7.0-doc/windows-service-howto.html
 
 I wonder if there are any heavy Microsoft Windows users that could
 offer to write a section on Multiple Tomcat Instances specifically with
 Microsoft Windows Services. The file RUNNING.txt only explains how to
 set up Tomcat itself (CATALINA_HOME versus CATALINA_BASE) but says
 nothing about how to configure Tomcat's service runner to point to one
 (other than inferring that one ought to set CATALINA_HOME and
 CATALINA_BASE appropriately).
 
 For instance, it's probably important to give the services distinct
 names ;)
 
 I probably wouldn't do this myself, but can Tomcat be installed
 twice (or thrice, etc.) using the installer so I don't have to
 configure the service(s) manually from the command-line? Yes, I'll get
 multiple copies of Tomcat installed on my disk, but I probably don't
 care about that if the installer can set up the service with a unique
 name, etc

The Windows installer allows for this.
In fact, after years of doing it the RUNNING.txt way, i.e. manually, I was 
really grateful when this became supported in the installer.  It's the only way 
I do it now, and now have fewer headaches.
These days, the disk space requirement of a full instance takes up is trivial 
compared to the minimal size of disk drives.
It does make for a little more work monitoring log multiple log files, but 
you'd be doing that anyway.


RE: tomcat apr openssl logging

2013-04-30 Thread Adamus, Steven J.
Jeremy, 

I've been down the same road and never found any acceptable logging
solution within the APR. Every APR/OpenSSL issue we've had over the last
3 years has been resolved using WireShark. Wireshark is indispensable. 

Steve

-Original Message-
From: users-return-241544-STEVEN.J.ADAMUS=saic@tomcat.apache.org
[mailto:users-return-241544-STEVEN.J.ADAMUS=saic@tomcat.apache.org]
On Behalf Of Jeremy Bowers
Sent: Tuesday, April 30, 2013 10:47 AM
To: users@tomcat.apache.org
Subject: tomcat apr openssl logging

My searches for the answer to this question have so far not turned up a
solution.  I've found others asking the same question but the only
non-answers I've found are to utilize a full apache httpd server or go
back to jsse for logging.  If this has been answered before, I sincerely
apologize, but my search terms haven't found an answer as of yet.  I'm
hoping someone on here can help:

How do I go about setting up server side logging to gain more detailed
information about ssl connections when using tomcat with apache tomcat
native, apr, and openssl for https?

Thanks!
-Jeremy

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



Re: context.xml vs ROOT.xml

2013-04-30 Thread Jason Aleski

Chuck,

Thank you for your feedback.  I'll reply in order.

1)  I believe it is being ignored because it doesn't see the database 
connection when it is in the META-INF/context.xml.  It does see them 
when I copy the configurations to the other files.  What I read and 
understand is the META-INF/context.xml file is used only when the 
application is deployed via a WAR file.  Have I missed something?


2)  Yes, I did remove the default Tomcat applications.  This is the only 
app I have.


3)  Yea, I want to avoid editing the global config.  That is why I was 
hoping the META-INF method would work.  I guess I will stay with placing 
the configurations in the ROOT.XML.


-JA-



On 4/30/2013 1:16 PM, Caldarale, Charles R wrote:

From: Jason Aleski [mailto:jason.ale...@gmail.com]
Subject: context.xml vs ROOT.xml
I've got my configurations stored in the META-INF/context.xml
file, but because I'm not deploying my application as a WAR,
the context.xml is ignored.

Why do you think it's ignored?


I can copy my application's context.xml and place it in the
tomcat/conf/context.xml and it works.

And is exposed to _all_ of your webapps, since conf/context.xml is implicitly 
included in every webapp.


I can also place the database connection in the
tomcat/conf/Catalina/localhost/ROOT.xml and it works.

Which is where it belongs, when it's supposed to apply to the default webapp 
only.


If I'm only running one application, does it really matter?

Are you really running only one application?  Have you actually removed all of 
the others that come with Tomcat, including the manager?

Think about what happens when you decide to install a second webapp; best 
practice dictates that you not have to modify the global config to do so.

  - 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





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



RE: Multiple tomcat containers or instance on same servers

2013-04-30 Thread Oke Akinola swisstopo
Thanks for all your feedbacks.

Is multiple versions supported or all instances have to be the same build.

Sent from my Windows Phone

From: David kerber
Sent: 30.04.2013 16:57
To: Tomcat Users List
Subject: Re: Multiple tomcat containers or instance on same servers

On 4/30/2013 10:30 AM, Christopher Schultz wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA256

 Oke,

 On 4/30/13 8:28 AM, Oke Akinola swisstopo wrote:
 I would need help to configure different application in their
 respective tomcat container.

 Does having multiple containers is same as have multiple instances
 on the same server? I already have tomcat 6.0.26 installed through
 an installer on a Windows Server 2008 R2. How do I go about
 configuring multiple containers or instances?

 I thought sure that the Tomcat Windows Service page of the users' guide,
 but it is /not/ there:
 http://tomcat.apache.org/tomcat-7.0-doc/windows-service-howto.html

 I wonder if there are any heavy Microsoft Windows users that could
 offer to write a section on Multiple Tomcat Instances specifically
 with Microsoft Windows Services. The file RUNNING.txt only explains
 how to set up Tomcat itself (CATALINA_HOME versus CATALINA_BASE) but
 says nothing about how to configure Tomcat's service runner to point
 to one (other than inferring that one ought to set CATALINA_HOME and
 CATALINA_BASE appropriately).

 For instance, it's probably important to give the services distinct
 names ;)

 I probably wouldn't do this myself, but can Tomcat be installed
 twice (or thrice, etc.) using the installer so I don't have to
 configure the service(s) manually from the command-line? Yes, I'll get
 multiple copies of Tomcat installed on my disk, but I probably don't
 care about that if the installer can set up the service with a unique
 name, etc. If this kind of thing won't work or is a horrible idea,
 that should be clear from the users' guide.

 André? Jeff? Mark E?

I might be able to put some time into this over the nest few days; I
have a system with about a dozen services all running from the same
installation of TC.  I have written some batch files that handle the
service creation for me, though I tweak the TC configuration .xml files
manually.

D

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



Re: Multiple tomcat containers or instance on same servers

2013-04-30 Thread chris derham
 Thanks for all your feedbacks.

 Is multiple versions supported or all instances have to be the same build.

You can have it any which way you wish, e.g. single tomcat in single
catalina_home with multiple instances each with own catalina_base, or
multiple versions of tomcat each in own catalina_home each with one or
more instance each with own catalina_base. You can setup a right mess
if you wish...

 I thought sure that the Tomcat Windows Service page of the users' guide,
 but it is /not/ there:
 http://tomcat.apache.org/tomcat-7.0-doc/windows-service-howto.html

 I wonder if there are any heavy Microsoft Windows users that could
 offer to write a section on Multiple Tomcat Instances specifically
 with Microsoft Windows Services. The file RUNNING.txt only explains
 how to set up Tomcat itself (CATALINA_HOME versus CATALINA_BASE) but
 says nothing about how to configure Tomcat's service runner to point
 to one (other than inferring that one ought to set CATALINA_HOME and
 CATALINA_BASE appropriately).

 For instance, it's probably important to give the services distinct
 names ;)

The only things that seem to be missing are

a) set CATALINA_HOME and CATALINA_BASE before running service.bat
b) when run service.bat, specific a unique service name
c) you need to copy some files around to allow the CATALINA_BASE to be
different from each other, e.g. port config

e.g.

set CATALINA_HOME=c:\tomcat
set CATALINA_BASE=c:\tomcat\instances\instance1
service install tomcat1

Then to install instance two, just run

set CATALINA_BASE=c:\tomcat\instances\instance2
service install tomcat2

If anyone else wants to chip in with any relevant additions, let me
know. I might be able to have a look at updating the documentation
page later, but being as I'm a developer my linguistic skills have
never really been approved off so not sure any changes will be
approved :-)

HTH

Chris

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



RE: context.xml vs ROOT.xml

2013-04-30 Thread Caldarale, Charles R
 From: Jason Aleski [mailto:jason.ale...@gmail.com] 
 Subject: Re: context.xml vs ROOT.xml

Don't top post.

 I believe it is being ignored because it doesn't see the database 
 connection when it is in the META-INF/context.xml.

I believe you must be doing something else that's causing the DB connection to 
go missing.  If you look at a standard Tomcat download, you'll see that the 
manager and host-manager webapps are included as unpacked directories, 
including META-INF/context.xml files; if those were being ignored, those 
webapps could not function.

Note that if you have a ROOT.xml file in conf/Catalina/[host], that will 
override what's in webapps/ROOT/META-INF/context.xml.

 - 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



Standalone use of WebSocket client

2013-04-30 Thread Rossen Stoyanchev

Is the (JSR-356) WebSocket client in trunk meant to be usable in a standalone 
app? I have a Maven app that depends on tomcat-websocket and 
tomcat-websocket-api that gives the below exception.

java.lang.NoClassDefFoundError: org/apache/tomcat/util/codec/binary/Base64
at 
org.apache.tomcat.websocket.WsWebSocketContainer.generateWsKeyValue(WsWebSocketContainer.java:348)
at 
org.apache.tomcat.websocket.WsWebSocketContainer.createRequestHeaders(WsWebSocketContainer.java:338)
at 
org.apache.tomcat.websocket.WsWebSocketContainer.connectToServer(WsWebSocketContainer.java:169)

The tomcat-util jar in the lib folder of Tomcat contains this class but the 
tomcat-util jar in Maven doesn't.

thanks,
Rossen

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



Re: tomcat apr openssl logging

2013-04-30 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Jeremy,

On 4/30/13 1:47 PM, Jeremy Bowers wrote:
 How do I go about setting up server side logging to gain more 
 detailed information about ssl connections when using tomcat with 
 apache tomcat native, apr, and openssl for https?

Can you explain in a little more detail? Do you want something other
than what AccessLogValve[1] can provide? You can learn a lot from the
standard request attributes that the servlet spec mandates[2] such as
javax.servlet.request.cipher_suite,
javax.servlet.request.key_size, etc.

What kind of information are you looking for specifically?

- -chris

[1]
https://tomcat.apache.org/tomcat-7.0-doc/config/valve.html#Access_Log_Valve
[2] See Servlet Spec 3.0, Section 3.8
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJRgDZqAAoJEBzwKT+lPKRYmncP+wUidTM08lHoTLWz1mIddGPv
e6IdOGw6iet8sjRCU2vBcV414aZMqafJCfoZLmemAtj1KfUpR85sCiF06fTPq9Q+
g1SrXGGHJPu6VQL9FlYi2yJoMLL1VCayjhRgnIKStqi2kgdhdaGE9AaMa/SKbNOM
zNa3COy35M4TcmsCKPuI/oEsgEG7oLk8dOimh8FAHKc/pdOhvamfFmXH9mXakIpE
ShUVFKFCewTRILjEYoCh1GU7++Rs89BPVKS6UKy4c4tAYVB87ev6pZFwPs2UsAjb
7StW9lrxDQdMvsKDY5iuR0prcpiTQaK+EV+SODC4rFygPKMmyMWnNS3Qx09AcBO5
TzWBr9hSjeyNMAypogIUXZ1L0u4uTm/owCjagr8NXixfdeOIDvAdiifRlrTjVAQQ
eu8XpkzTNMpDbdD43d60186hY7yyMF3o5fFxuYb2A5J6SETV5NU7ORjwR6fStsmU
6IId38lZcrhxyA8HE2q2/0v/r7MEwOPxKEPxysSnKwxvEjcWW6Z1oEDnNiM/pw6t
RkDUNTMQaJBWhOkNwcuZiGy7JM5DqZDB1tltbNSFgDcbFFXjG3AWnkY4qldP765K
lPEsrwZVfGxVnTZf6fYMNQhYFNEnjFu5Q2BbqXT+hOkRrLn/r9LH2h/8SpCvDkGd
A46SO3D5/pc/kjsR4/cc
=KLRM
-END PGP SIGNATURE-

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



Re: Standalone use of WebSocket client

2013-04-30 Thread Mark Thomas
On 30/04/2013 22:20, Rossen Stoyanchev wrote:
 
 Is the (JSR-356) WebSocket client in trunk meant to be usable in a standalone 
 app?
Yes.

 I have a Maven app that depends on tomcat-websocket and tomcat-websocket-api 
 that gives the below exception.
 
 java.lang.NoClassDefFoundError: org/apache/tomcat/util/codec/binary/Base64
   at 
 org.apache.tomcat.websocket.WsWebSocketContainer.generateWsKeyValue(WsWebSocketContainer.java:348)
   at 
 org.apache.tomcat.websocket.WsWebSocketContainer.createRequestHeaders(WsWebSocketContainer.java:338)
   at 
 org.apache.tomcat.websocket.WsWebSocketContainer.connectToServer(WsWebSocketContainer.java:169)
 
 The tomcat-util jar in the lib folder of Tomcat contains this class but the 
 tomcat-util jar in Maven doesn't.

The Maven snapshot probably isn't recent enough.

Mark


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



Re: Standalone use of WebSocket client

2013-04-30 Thread Mark Thomas
On 30/04/2013 22:29, Mark Thomas wrote:
 On 30/04/2013 22:20, Rossen Stoyanchev wrote:

 Is the (JSR-356) WebSocket client in trunk meant to be usable in a 
 standalone app?
 Yes.
 
 I have a Maven app that depends on tomcat-websocket and tomcat-websocket-api 
 that gives the below exception.

 java.lang.NoClassDefFoundError: org/apache/tomcat/util/codec/binary/Base64
  at 
 org.apache.tomcat.websocket.WsWebSocketContainer.generateWsKeyValue(WsWebSocketContainer.java:348)
  at 
 org.apache.tomcat.websocket.WsWebSocketContainer.createRequestHeaders(WsWebSocketContainer.java:338)
  at 
 org.apache.tomcat.websocket.WsWebSocketContainer.connectToServer(WsWebSocketContainer.java:169)

 The tomcat-util jar in the lib folder of Tomcat contains this class but the 
 tomcat-util jar in Maven doesn't.
 
 The Maven snapshot probably isn't recent enough.

Yep. That is it. Let me know if you want me to push another snapshot.

Mark


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



Re: Standalone use of WebSocket client

2013-04-30 Thread Rossen Stoyanchev

- Original Message -
 From: Mark Thomas ma...@apache.org
 To: Tomcat Users List users@tomcat.apache.org
 Sent: Tuesday, April 30, 2013 5:35:55 PM
 Subject: Re: Standalone use of WebSocket client

  The Maven snapshot probably isn't recent enough.
 
 Yep. That is it. Let me know if you want me to push another snapshot.

I'd like another snapshot but I'm okay waiting till tomorrow if there is an 
automated nightly build.

Thanks

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



Re: Standalone use of WebSocket client

2013-04-30 Thread Mark Thomas
On 30/04/2013 22:45, Rossen Stoyanchev wrote:
 
 - Original Message -
 From: Mark Thomas ma...@apache.org
 To: Tomcat Users List users@tomcat.apache.org
 Sent: Tuesday, April 30, 2013 5:35:55 PM
 Subject: Re: Standalone use of WebSocket client
 
 The Maven snapshot probably isn't recent enough.

 Yep. That is it. Let me know if you want me to push another snapshot.
 
 I'd like another snapshot but I'm okay waiting till tomorrow if there is an 
 automated nightly build.

There isn't. I'll kick of a build now. Should be uploaded in around an hour.

Mark


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



Re: Multiple tomcat containers or instance on same servers

2013-04-30 Thread David Kerber

On 4/30/2013 4:34 PM, chris derham wrote:

Thanks for all your feedbacks.

Is multiple versions supported or all instances have to be the same build.


You can have it any which way you wish, e.g. single tomcat in single
catalina_home with multiple instances each with own catalina_base, or
multiple versions of tomcat each in own catalina_home each with one or
more instance each with own catalina_base. You can setup a right mess
if you wish...


Yeah, what he said...

I have done it both ways, depending on the requirements of the apps 
being hosted.  I prefer to have only one instance of TC installed, but 
have at times had multiple versions running during transition periods.






I thought sure that the Tomcat Windows Service page of the users' guide,
but it is /not/ there:
http://tomcat.apache.org/tomcat-7.0-doc/windows-service-howto.html

I wonder if there are any heavy Microsoft Windows users that could
offer to write a section on Multiple Tomcat Instances specifically
with Microsoft Windows Services. The file RUNNING.txt only explains
how to set up Tomcat itself (CATALINA_HOME versus CATALINA_BASE) but
says nothing about how to configure Tomcat's service runner to point
to one (other than inferring that one ought to set CATALINA_HOME and
CATALINA_BASE appropriately).

For instance, it's probably important to give the services distinct
names ;)


The only things that seem to be missing are

a) set CATALINA_HOME and CATALINA_BASE before running service.bat
b) when run service.bat, specific a unique service name
c) you need to copy some files around to allow the CATALINA_BASE to be
different from each other, e.g. port config

e.g.

set CATALINA_HOME=c:\tomcat
set CATALINA_BASE=c:\tomcat\instances\instance1
service install tomcat1

Then to install instance two, just run

set CATALINA_BASE=c:\tomcat\instances\instance2
service install tomcat2

If anyone else wants to chip in with any relevant additions, let me
know. I might be able to have a look at updating the documentation
page later, but being as I'm a developer my linguistic skills have
never really been approved off so not sure any changes will be
approved :-)

HTH

Chris

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






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



RE: Multiple tomcat containers or instance on same servers

2013-04-30 Thread Oke Akinola swisstopo
The new application I wanted to add to tomcat environment actually required its 
own container. My understanding so far is configuring multiples applications, 
even with different listening ports  in a single installation is still one 
container. Once a different container is required, there has to be a second 
tomcat installation instance.

Please feel free to correct me.

David's offer to put something together will be appreciate for the none tomcat 
specialist.



Sent from my Windows Phone

From: David Kerber
Sent: 01.05.2013 02:45
To: Tomcat Users List
Subject: Re: Multiple tomcat containers or instance on same servers

On 4/30/2013 4:34 PM, chris derham wrote:
 Thanks for all your feedbacks.

 Is multiple versions supported or all instances have to be the same build.

 You can have it any which way you wish, e.g. single tomcat in single
 catalina_home with multiple instances each with own catalina_base, or
 multiple versions of tomcat each in own catalina_home each with one or
 more instance each with own catalina_base. You can setup a right mess
 if you wish...

Yeah, what he said...

I have done it both ways, depending on the requirements of the apps
being hosted.  I prefer to have only one instance of TC installed, but
have at times had multiple versions running during transition periods.



 I thought sure that the Tomcat Windows Service page of the users' guide,
 but it is /not/ there:
 http://tomcat.apache.org/tomcat-7.0-doc/windows-service-howto.html

 I wonder if there are any heavy Microsoft Windows users that could
 offer to write a section on Multiple Tomcat Instances specifically
 with Microsoft Windows Services. The file RUNNING.txt only explains
 how to set up Tomcat itself (CATALINA_HOME versus CATALINA_BASE) but
 says nothing about how to configure Tomcat's service runner to point
 to one (other than inferring that one ought to set CATALINA_HOME and
 CATALINA_BASE appropriately).

 For instance, it's probably important to give the services distinct
 names ;)

 The only things that seem to be missing are

 a) set CATALINA_HOME and CATALINA_BASE before running service.bat
 b) when run service.bat, specific a unique service name
 c) you need to copy some files around to allow the CATALINA_BASE to be
 different from each other, e.g. port config

 e.g.

 set CATALINA_HOME=c:\tomcat
 set CATALINA_BASE=c:\tomcat\instances\instance1
 service install tomcat1

 Then to install instance two, just run

 set CATALINA_BASE=c:\tomcat\instances\instance2
 service install tomcat2

 If anyone else wants to chip in with any relevant additions, let me
 know. I might be able to have a look at updating the documentation
 page later, but being as I'm a developer my linguistic skills have
 never really been approved off so not sure any changes will be
 approved :-)

 HTH

 Chris

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





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