Dear, need your help -- i am confiugrint tomcat clustering on two nodes

2011-02-21 Thread spideratd

Dear,
i have configured tomcat 6.0.32 with mod_jk.so and apache on two linux
systems. multicasting works , tomcat working on both system. ie.running
examples...
but session replication not working on both systems by using session.jsp
file from net.

Dear , I need your help to achieve this.
I want to deploy a war on one tomcat server and it should automatically
deployed on second system. 

thanks a lot.
my email is emlinux...@gmail.com
 
  
-- 
View this message in context: 
http://old.nabble.com/Problem-with-tomcat-session-replication-tp28361225p30975423.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: Issue with JNDI datasources in Tomcat 6

2011-02-21 Thread Mark Thomas
On 20/02/2011 23:37, pablo.a.saave...@gmail.com wrote:
 Hi, I based myself on a Tomcat 5.5 tutorial because that's what I found on
 the net.

Try the real docs:
http://tomcat.apache.org/tomcat-6.0-doc/jndi-resources-howto.html


 I did put the driver jar file in the lib/ directory, which is the
 place it belongs. I can see the datasources using lambda probe and if I
 debug the code the datasources are there, but the ref address of the JNDI
 entry that's resolved is empty and so it can't find the actual object.

Most likely a configuration problem. Since you haven't shown us any of
your configuration files, it is impossible to help further.

Mark

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



Re: Tomcat won't serve newly created files

2011-02-21 Thread Mark Thomas
On 21/02/2011 01:18, Lanre Abiwon wrote:
 I have been trying to solve this issue now for a couple of days without any 
 progress but I now know why the problem exists.
 I updated the web app and re-deployed it and realised that it is using an 
 older version of the webapp.
 It would seem the context root of the servlet is being changed to an older 
 cached version of the app that exists somewhere (not in the webapp directory. 
 The updated war file is the only app in the webapp directory) so why it's 
 behaving this way is a mystery to me right now.
 I hope someone can shed a light on this for me.

Are you uploading the new version with Tomcat started or stopped?

What changes have you made from the default configuration settings?

Mark

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



Re: related to bad url encoding?...

2011-02-21 Thread Mark Thomas
On 21/02/2011 04:25, alex wrote:
 hi all,
 I get 404 err, if I add %D0 to url, but I get just blank page if I add
 %zD0 . I'm supposed to get bad request in this case. how do I fix this
 problem?

Check the response headers.

If you don't see a 400 response, exactly which Tomcat version are you using?

Mark

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



RE: Connecting to other internet sites from a Tomcat application via a proxy server

2011-02-21 Thread Conway Liu
Thanks Andre, I'll have a look.
Conway

-Original Message-
From: André Warnier [mailto:a...@ice-sa.com] 
Sent: Monday, 21 February 2011 8:47 p.m.
To: Tomcat Users List
Subject: Re: Connecting to other internet sites from a Tomcat application
via a proxy server

Conway Liu wrote:
 Hi,
 
 Previously our Tomcat application can create https requests and send the
request 
 to other website, which sends response back to our application with
required 
 data.
 
 Now our Tomcat appcation has been migrated to a server that is not allowed
to 
 send the requests directly to the internet, but rather needs to send
through a 
 proxy server, kind of like specifying a proxy server in web browsers.
 
 How do I tell Tomcat that When you need make a https connection, please
do it 
 via this proxy server?
 
You do not have to tell Tomcat anything, as Tomcat has nothing to do with
the matter.
It is your application which needs to be told.
To make its connection to the external server, the application uses java
network 
classes. It is those classes you need to look at, and set up properly.

-
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: Dear, need your help -- i am confiugrint tomcat clustering on two nodes

2011-02-21 Thread Mark Thomas
On 21/02/2011 09:05, spideratd wrote:
 
 Dear,
 i have configured tomcat 6.0.32 with mod_jk.so and apache on two linux
 systems. multicasting works , tomcat working on both system. ie.running
 examples...
 but session replication not working on both systems by using session.jsp
 file from net.
 
 Dear , I need your help to achieve this.
 I want to deploy a war on one tomcat server and it should automatically
 deployed on second system.

Look at the FarmWarDEployer.

The docs haven't been written for this component but the Javadoc should
be enough to get you started:
http://tomcat.apache.org/tomcat-7.0-doc/api/org/apache/catalina/ha/deploy/FarmWarDeployer.html

Mark

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



Re: Dear, need your help -- i am confiugrint tomcat clustering on two nodes

2011-02-21 Thread spideratd


Thanks a lot Mark
I am starting it just now and will post configuration settings if it
will be a  success..
hoping to listen from u if u have any link other than reading tomcat manual.

Regards
Asif
-- 
View this message in context: 
http://old.nabble.com/Problem-with-tomcat-session-replication-tp28361225p30975806.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: related to bad url encoding?...

2011-02-21 Thread alex

Mark Thomas wrote:

On 21/02/2011 04:25, alex wrote:

hi all,
I get 404 err, if I add %D0 to url, but I get just blank page if I add
%zD0 . I'm supposed to get bad request in this case. how do I fix this
problem?


Check the response headers.

If you don't see a 400 response, exactly which Tomcat version are you using?

Mark

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



I used 6.0.24 .
http://localhost:8080/examples/servlets/%D0 returns 404
http://localhost:8080/examples/servlets/%zD0 returns blank page



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



connecting jsp with mysql

2011-02-21 Thread Anup Niroula
Hi,

I am having difficulty in connecting jsp and mysql using Tomcat 7.0 .
I downloaded jdbc driver mysql-connector-java-5.1.15-bin.jar and placed it
in two locations:

   - CATALINE_HOME\lib
   - C:\Program Files\Apache Software Foundation\Tomcat
   7.0\webapps\lsc\WEB-INF\lib

I tried to connect using the following code but it always says:Cannot
connect to database server.
 Do i need to make any configurations apart from this ?
I tried to connect with the following code:
  %@page language=java import=java.sql.*%
%
  Connection conn = null;

  try
   {
   String userName = root;
   String password = nbuser;
   String url = jdbc:mysql://localhost:3306/test;
   Class.forName (com.mysql.jdbc.Driver).newInstance ();
   conn = DriverManager.getConnection (url, userName, password);
   out.println (Database connection established);
   }
   catch (Exception e)
   {
   out.println (Cannot connect to database server);
   }
   finally
   {
   if (conn != null)
   {
   try
   {
   conn.close ();
   out.println (Database connection terminated);
   }
   catch (Exception e) { /* ignore close errors */ }
   }
   }
%


Re: connecting jsp with mysql

2011-02-21 Thread Mikolaj Rydzewski


On Mon, 21 Feb 2011 07:55:05 -0600, Anup Niroula 
anup.niro...@gmail.com wrote:

   catch (Exception e)
   {
   out.println (Cannot connect to database server);
   }


I guess the answer is hidden within 'e'.

Anyway, you should rather use JNDI 
http://tomcat.apache.org/tomcat-7.0-doc/jndi-resources-howto.html

Or at least any framework (spring, dbutils, etc).

--
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: connecting jsp with mysql

2011-02-21 Thread Caldarale, Charles R
 From: Anup Niroula [mailto:anup.niro...@gmail.com] 
 Subject: connecting jsp with mysql

 I downloaded jdbc driver mysql-connector-java-5.1.15-bin.jar 
 and placed it in two locations:
- CATALINE_HOME\lib
- C:\Program Files\Apache Software Foundation\Tomcat
7.0\webapps\lsc\WEB-INF\lib

Fatal error.  Place the jar file in *one* location only.  If you're using 
Tomcat's DBCP capability, it must go into CATALINA_HOME/lib; if your webapp is 
doing all the DB connection handling, it must be in the webapp's WEB-INF/lib 
directory.

 - 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: connecting jsp with mysql

2011-02-21 Thread Martin Gainty

1)putting a lightly loaded engine light on text message is neither helpful 
nor delivers any useful information to those of us trying to determine your 
error 
always include the message from the exception object e.g.
out.println (Cannot connect to database server message=+e.getMessage());

2)
netstat -a | grep 3306
if you dont see tcp connection displayed on your output then mysql daemon is 
down..restart it

3)never put username and password on emails ..this is not a secure way to do 
business 
btw try implementing the same username to get into mysql 
$MYSQL_HOME/bin/mysql.exe --host=localhost --user=whatever_user 
--password=whatever_password --host=localhost

Martin Gainty 
__ 
Jogi és Bizalmassági kinyilatkoztatás/Verzicht und 
Vertraulichkeitanmerkung/Note de déni et de confidentialité
 Ez az
üzenet bizalmas.  Ha nem ön az akinek szánva volt, akkor kérjük, hogy
jelentse azt nekünk vissza. Semmiféle továbbítása vagy másolatának
készítése nem megengedett.  Ez az üzenet csak ismeret cserét szolgál és
semmiféle jogi alkalmazhatósága sincs.  Mivel az electronikus üzenetek
könnyen megváltoztathatóak, ezért minket semmi felelöség nem terhelhet
ezen üzenet tartalma miatt.

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.




 Date: Mon, 21 Feb 2011 07:55:05 -0600
 Subject: connecting jsp with mysql
 From: anup.niro...@gmail.com
 To: users@tomcat.apache.org
 
 Hi,
 
 I am having difficulty in connecting jsp and mysql using Tomcat 7.0 .
 I downloaded jdbc driver mysql-connector-java-5.1.15-bin.jar and placed it
 in two locations:
 
- CATALINE_HOME\lib
- C:\Program Files\Apache Software Foundation\Tomcat
7.0\webapps\lsc\WEB-INF\lib
 
 I tried to connect using the following code but it always says:Cannot
 connect to database server.
  Do i need to make any configurations apart from this ?
 I tried to connect with the following code:
   %@page language=java import=java.sql.*%
 %
   Connection conn = null;
 
   try
{
String userName = root;
String password = nbuser;
String url = jdbc:mysql://localhost:3306/test;
Class.forName (com.mysql.jdbc.Driver).newInstance ();
conn = DriverManager.getConnection (url, userName, password);
out.println (Database connection established);
}
catch (Exception e)
{
out.println (Cannot connect to database server);
}
finally
{
if (conn != null)
{
try
{
conn.close ();
out.println (Database connection terminated);
}
catch (Exception e) { /* ignore close errors */ }
}
}
 %
  

Re: connecting jsp with mysql

2011-02-21 Thread Anup Niroula
Hi,
out.println (Cannot connect to database server message +e.getMessage());
This gives following error msg:
Cannot connect to database server com.mysql.jdbc.Driver.
I am using windows 7.

On Mon, Feb 21, 2011 at 8:44 AM, Martin Gainty mgai...@hotmail.com wrote:


 1)putting a lightly loaded engine light on text message is neither
 helpful nor delivers any useful information to those of us trying to
 determine your error
 always include the message from the exception object e.g.
 out.println (Cannot connect to database server message=+e.getMessage());

 2)
 netstat -a | grep 3306
 if you dont see tcp connection displayed on your output then mysql daemon
 is down..restart it

 3)never put username and password on emails ..this is not a secure way to
 do business
 btw try implementing the same username to get into mysql
 $MYSQL_HOME/bin/mysql.exe --host=localhost --user=whatever_user
 --password=whatever_password --host=localhost

 Martin Gainty
 __
 Jogi és Bizalmassági kinyilatkoztatás/Verzicht und
 Vertraulichkeitanmerkung/Note de déni et de confidentialité
  Ez az
 üzenet bizalmas.  Ha nem ön az akinek szánva volt, akkor kérjük, hogy
 jelentse azt nekünk vissza. Semmiféle továbbítása vagy másolatának
 készítése nem megengedett.  Ez az üzenet csak ismeret cserét szolgál és
 semmiféle jogi alkalmazhatósága sincs.  Mivel az electronikus üzenetek
 könnyen megváltoztathatóak, ezért minket semmi felelöség nem terhelhet
 ezen üzenet tartalma miatt.

 Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene
 Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte
 Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht
 dient lediglich dem Austausch von Informationen und entfaltet keine
 rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von
 E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
 Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le
 destinataire prévu, nous te demandons avec bonté que pour satisfaire
 informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie
 de ceci est interdite. Ce message sert à l'information seulement et n'aura
 pas n'importe quel effet légalement obligatoire. Étant donné que les email
 peuvent facilement être sujets à la manipulation, nous ne pouvons accepter
 aucune responsabilité pour le contenu fourni.




  Date: Mon, 21 Feb 2011 07:55:05 -0600
  Subject: connecting jsp with mysql
  From: anup.niro...@gmail.com
  To: users@tomcat.apache.org
 
  Hi,
 
  I am having difficulty in connecting jsp and mysql using Tomcat 7.0 .
  I downloaded jdbc driver mysql-connector-java-5.1.15-bin.jar and placed
 it
  in two locations:
 
 - CATALINE_HOME\lib
 - C:\Program Files\Apache Software Foundation\Tomcat
 7.0\webapps\lsc\WEB-INF\lib
 
  I tried to connect using the following code but it always says:Cannot
  connect to database server.
   Do i need to make any configurations apart from this ?
  I tried to connect with the following code:
%@page language=java import=java.sql.*%
  %
Connection conn = null;
 
try
 {
 String userName = root;
 String password = nbuser;
 String url = jdbc:mysql://localhost:3306/test;
 Class.forName (com.mysql.jdbc.Driver).newInstance ();
 conn = DriverManager.getConnection (url, userName,
 password);
 out.println (Database connection established);
 }
 catch (Exception e)
 {
 out.println (Cannot connect to database server);
 }
 finally
 {
 if (conn != null)
 {
 try
 {
 conn.close ();
 out.println (Database connection terminated);
 }
 catch (Exception e) { /* ignore close errors */ }
 }
 }
  %




Re: AccessLogValve pattern (timestamp, bytes sent and time taken)

2011-02-21 Thread Antonios Kogias

On 2/18/2011 12:12 PM, Konstantin Kolinko wrote:

2011/2/18 ??G??S ???O???Sco...@hua.gr:

Tomcat 5.5 or 6.0
Win XP or Vista (32)

I've read the configuration 
(http://tomcat.apache.org/tomcat-5.5-doc/config/valve.html) and the api 
(http://tomcat.apache.org/tomcat-5.5-doc/catalina/docs/api/org/apache/catalina/valves/AccessLogValve.html)
 but there are some details that are not specified:

timestamp (%t in pattern)
In apache documentation it is stated that this is the time that the request was 
received. I'd like some simple confirmation that this also holds true for the 
tomcat (and is not, for example, the time that the response was sent).

bytes sent (either %b or %B in pattern)
Is this the number of bytes actually sent to the client, or simply the size in 
bytes of the HTTP response (which will differ, for instance, if the connection 
is aborted)? The apache httpd 2.0 provides the %O format as well to distinguish 
between these two cases, whereas in 1.3 it didn't. Since tomcat does not 
provide such an option, my guess is towards the number of bytes actually sent 
to the client, but I'd like some simple confirmation on this.

time taken (either %D or %T in pattern)
Is the network transmission time included in the processing time? To be more 
precise, is this the time the server used to process, prepare the HTTP response 
and deliver it to the underlying layer for transmission (i.e. non-blocking 
threads on tcp send)? Or does it also include the underlying layer sending time 
(e.g. blocking threads on tcp send)? Apache's documentation is also obscure on 
that point...


In short:

regarding TC 5.5 and 6.0 your hopes are wrong. The timestamp is when
the processing is the layer below the valve has ended (and the log
statement is printed), with some caching of generated timestamp string
(not worse than 1 sec).  Time taken: time spend in the layer below the
valve. The size is raw size, before gzip compression.


In latest versions of TC7 (7.0.8 and later) the access valve has
different implementation, and is directly invoked from the connector
adapter layer. That version prints timestamp when request was
received, timing for the whole request processing cycle (though '0'
when it cannot be determined), reports count of bytes sent (taking
compression into account).


Best regards,
Konstantin Kolinko

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

Thank you very much for the detailed answer. Now there's just one more 
thing to ask.
If we use tomcat 7.0.8, the timing for the whole request processing 
cycle will incorporate transmit time?
e.g. if using HTTP/1.0, will it represent the total time until the 
teardown of the connection? Or will it be the net processing time 
/before/ transmission starts (i.e. time to prepare the http response and 
push it to the network layer)?




cannot see examples

2011-02-21 Thread ken dias





I d'loaded tomcat 6.0.032 and got the homepage alright with localhost:8080. 
Then clicked on servlet and JSP examples but got 404 on both occasions. The 
error report says these examples are not available.
Please help.
 
Ken
  

RE: cannot see examples

2011-02-21 Thread Martin Gainty

if you want a webapp to be deployed then you will need to deploy that webapp 
..options for deploying webapps for tomcat are available at:
http://tomcat.apache.org/tomcat-5.5-doc/deployer-howto.html

Martin 
__ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.




 From: kend...@hotmail.com
 To: users@tomcat.apache.org
 Subject: cannot see examples
 Date: Mon, 21 Feb 2011 12:31:31 -0500
 
 
 
 
 
 
 I d'loaded tomcat 6.0.032 and got the homepage alright with localhost:8080. 
 Then clicked on servlet and JSP examples but got 404 on both occasions. The 
 error report says these examples are not available.
 Please help.
  
 Ken
 
  

400 Errors while trying to deploy manager app.

2011-02-21 Thread Dave Shevett
Hi folks, I have a relatively complex installation that I'm trying to
get the manager app deployed into.  This was working at some point, but
now I can't seem to get anything but 400 errors out of it.

The tomcat install is serving many vhosts, they are all working
properly.  Each vhost is configured with it's own ROOT.xml file with a
Context path=/ docRoot=where-the-war-file-is entry.

This particular vhost I want available for jenkins-based continuous
builds and deployments.

As it stands now, when jenkins tries to deploy, (via maven's
tomcat::deploy), I get:
[INFO] Deploying war to http://REDACTED.com/congo
[INFO] Cannot invoke Tomcat manager

Now the vhost is fronted via apache, with these rules in (just like all
the other vhosts)

VirtualHost *:80
ServerName REDACTED.com

ProxyPreserveHost On
ProxyPass / ajp://localhost:8009/
ProxyPassReverse / ajp://localhost:8009/

Proxy ajp://localhost:8009/*
  Order allow,deny
  Allow from all
/Proxy
/VirtualHost

When the hit comes in, apache logs this message:

REDACTED.com:80 172.16.1.1 - - [21/Feb/2011:12:29:38 -0500] PUT
/manager/deploy?path=%2Fcongowar=update=true HTTP/1.0 400 - -
Tomcat Maven Plugin/1.1

In the directory /var/lib/tomcat5.5/conf/Catalina/REDACTED.com, I have a
manager.xml:

?xml version=1.0 encoding=UTF-8?

Context path=/manager
docBase=/usr/share/tomcat5.5/server/webapps/manager
 privileged=true antiResourceLocking=false
antiJARLocking=false

  !-- Link to the user database we will get roles from --
  ResourceLink name=users global=UserDatabase
type=org.apache.catalina.UserDatabase/

/Context

Last but not least, there's a Host entry in the main server.xml:
  Host name=congov2.stonekeep.com appBase=webapps/REDACTED.com
unpackWARs=false autoDeploy=false
xmlValidation=false xmlNamespaceAware=false /

I'm virtually positive that the /var/lib.../Catalina directory above is
the proper place to put the manager.xml - because if I drop a ROOT.xml
file there, the vhost configures up and hitting REDACTED.com gets me the
definition from the ROOT file.

But I can't get the manager app to deploy.

Help please?  Also, I'd love to find out where to look for output for
problems with the installation.  The catalina log file in
/var/log/tomcat5.5/ has no useful information :(

Thank you!





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



RE: cannot see examples

2011-02-21 Thread ken dias

Thanks, Martin.
Will give it a try.
Regards,
 
Ken Dias
 
 From: mgai...@hotmail.com
 To: users@tomcat.apache.org
 Subject: RE: cannot see examples
 Date: Mon, 21 Feb 2011 12:49:56 -0500
 
 
 if you want a webapp to be deployed then you will need to deploy that webapp 
 ..options for deploying webapps for tomcat are available at:
 http://tomcat.apache.org/tomcat-5.5-doc/deployer-howto.html
 
 Martin 
 __ 
 Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 
 Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
 sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
 oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich 
 dem Austausch von Informationen und entfaltet keine rechtliche 
 Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen 
 wir keine Haftung fuer den Inhalt uebernehmen.
 Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
 destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
 l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci 
 est interdite. Ce message sert à l'information seulement et n'aura pas 
 n'importe quel effet légalement obligatoire. Étant donné que les email 
 peuvent facilement être sujets à la manipulation, nous ne pouvons accepter 
 aucune responsabilité pour le contenu fourni.
 
 
 
 
  From: kend...@hotmail.com
  To: users@tomcat.apache.org
  Subject: cannot see examples
  Date: Mon, 21 Feb 2011 12:31:31 -0500
  
  
  
  
  
  
  I d'loaded tomcat 6.0.032 and got the homepage alright with localhost:8080. 
  Then clicked on servlet and JSP examples but got 404 on both occasions. The 
  error report says these examples are not available.
  Please help.
  
  Ken
  
 
  

RE: cannot see examples

2011-02-21 Thread Caldarale, Charles R
 From: Martin Gainty [mailto:mgai...@hotmail.com] 
 Subject: RE: cannot see examples

 if you want a webapp to be deployed then you will need 
 to deploy that webapp ..options for deploying webapps for
 tomcat are available at:
 http://tomcat.apache.org/tomcat-5.5-doc/deployer-howto.html

More useless and dangerous information.  The OP clearly said he was running on 
6.0.32, so should be using *only* 6.0 documentation, not 5.5.  Regardless, that 
has nothing to do with the problem of the examples not working.

 - 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: cannot see examples

2011-02-21 Thread Caldarale, Charles R
 From: ken dias [mailto:kend...@hotmail.com] 
 Subject: cannot see examples

 I d'loaded tomcat 6.0.032

From where?  What JVM?  What platform?

 Then clicked on servlet and JSP examples but got 404 on 
 both occasions.

If you installed Tomcat from a 3rd-party rather than downloading a real one 
from tomcat.apache.org, it may well not contain the examples webapp, since the 
repackagers are famous for doing things their own way.  If you are using a real 
Tomcat, tell us how you installed it, and how you started it.  If you're using 
a repackaged one, you'll need to discuss this with the repackager.
 
Martin's response was, as usual, irrelevant and incorrect; please ignore 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: 400 Errors while trying to deploy manager app.

2011-02-21 Thread Caldarale, Charles R
 From: Dave Shevett [mailto:shev...@homeport.org] 
 Subject: 400 Errors while trying to deploy manager app.

Better to tell us the Tomcat version you're using right up front, rather than 
forcing people to dig through the entire message.  Also tell us the JVM and the 
platform.

 The tomcat install is serving many vhosts, they are all working
 properly.  Each vhost is configured with it's own ROOT.xml file with a
 Context path=/ docRoot=where-the-war-file-is entry.

Just as start, your sample Context element is incorrect on two counts for any 
supported version of Tomcat: the path attribute is not allowed here (even if it 
were, you've specified it incorrectly), and there is no docRoot attribute for 
Context.  Context documentation is here:

http://tomcat.apache.org/tomcat-5.5-doc/config/context.html

 Context path=/manager
 docBase=/usr/share/tomcat5.5/server/webapps/manager
  privileged=true antiResourceLocking=false
 antiJARLocking=false

Again, the path attribute is illegal here.

 Host name=congov2.stonekeep.com appBase=webapps/REDACTED.com
   unpackWARs=false autoDeploy=false
   xmlValidation=false xmlNamespaceAware=false /

 I'm virtually positive that the /var/lib.../Catalina directory above is
 the proper place to put the manager.xml

Nope - it should be in /var/lib/tomcat5.5/conf/Catalina/congov2.stonekeep.com, 
not REDACTED.com.

 - 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 debugging options set into tomcat5w.exe take no effect.

2011-02-21 Thread Caldarale, Charles R
 From: Kannan J [mailto:kannan_jayapraka...@yahoo.co.in] 
 Subject: Remote debugging options set into tomcat5w.exe take no effect.

 I have specified the jvm debuggin options in tomcat5w.exe
 -Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n
 for remote debugging tomcat.

Try putting only one option per line.

Verify that port 8000 is active with netstat.

 - 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 debugging options set into tomcat5w.exe take no effect.

2011-02-21 Thread Caldarale, Charles R
 From: Kannan J [mailto:kannan_jayapraka...@yahoo.co.in] 
 Subject: Remote debugging options set into tomcat5w.exe take no effect.

 one is tomcat5w.exe's path to executable (it is set to 
 another unused tomcat on c:\program files(x64)\Apache 
 Software Foundation\tomcat5.5\bin\tomcat5.exe (note the
 X64), which looks wrong to me but the field is UNEDITABLE)

It's not editable because it's part of the service definition (regardless of 
whether or not you're running it as a service).  You need to uninstall the 
service and reinstall it from the proper location.  The service.bat script can 
be used for this; if you don't have it, get the .zip download rather than the 
.exe one.

 - 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: 400 Errors while trying to deploy manager app.

2011-02-21 Thread Dave Shevett
Lets see if I can complete the information here in a more concise manner.

1) Debian Lenny, patched up to date
2) Tomcat 5.5, Apache 2.2.9

On 2/21/11 1:43 PM, Caldarale, Charles R wrote:
 The tomcat install is serving many vhosts, they are all working 
 properly.  Each vhost is configured with it's own ROOT.xml file
 with a Context path=/ docRoot=where-the-war-file-is entry.
 
 Just as start, your sample Context element is incorrect on two
 counts for any supported version of Tomcat: the path attribute is not
 allowed here (even if it were, you've specified it incorrectly), and
 there is no docRoot attribute for Context.  
 http://tomcat.apache.org/tomcat-5.5-doc/config/context.html

Noted, I've removed it.  That was also informative as it points out the
'filename.xml' implies the context for the definition is the 'filename'
portion of the file.  IE, 'manager.xml' will define the context
'/manager/'.  Interesting.

The 'docRoot' was again a typo on my part, apologies.  I meant 'docBase'.

 Host name=congov2.stonekeep.com appBase=webapps/REDACTED.com 
 unpackWARs=false autoDeploy=false xmlValidation=false
 xmlNamespaceAware=false /
 
 I'm virtually positive that the /var/lib.../Catalina directory
 above is the proper place to put the manager.xml
 
 Nope - it should be in
 /var/lib/tomcat5.5/conf/Catalina/congov2.stonekeep.com, not
 REDACTED.com.

I was attempted to obfuscate the site name- I'll grant that added
confusion.  The directory I'm working in is:
/var/lib/tomcat5.5/conf/Catalina/congov2.stonekeep.com/

Within that directory is 'manager.xml', which looks like this now:

?xml version=1.0 encoding=UTF-8?

Context docBase=/usr/share/tomcat5.5/server/webapps/manager
privileged=true
antiResourceLocking=false
antiJARLocking=false

  !-- Link to the user database we will get roles from --
  ResourceLink name=users global=UserDatabase
type=org.apache.catalina.UserDatabase/

/Context

There are no other files in the congov2.stonekeep.com directory.

Trying to hit either the root or the /manager/html/ url results in 400
errors in apache:

congov2.stonekeep.com:80 172.16.1.1 - - [21/Feb/2011:15:43:00 -0500]
GET / HTTP/1.0 400 - - Mozilla/5.0 (Macintosh; U; Intel Mac OS X
10_6_6; en-us) AppleWebKit/533.19.4 (KHTML, like Gecko) Version/5.0.3
Safari/533.19.4
congov2.stonekeep.com:80 172.16.1.1 - - [21/Feb/2011:15:43:04 -0500]
GET /manager/html/ HTTP/1.0 400 - - Mozilla/5.0 (Macintosh; U;
Intel Mac OS X 10_6_6; en-us) AppleWebKit/533.19.4 (KHTML, like Gecko)
Version/5.0.3 Safari/533.19.4

Suggestions?

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



RE: 400 Errors while trying to deploy manager app.

2011-02-21 Thread Caldarale, Charles R
 From: Dave Shevett [mailto:shev...@homeport.org] 
 Subject: Re: 400 Errors while trying to deploy manager app.

 2) Tomcat 5.5, Apache 2.2.9

Tomcat 5.5.what?  Also, is this a real Tomcat, or a 3rd-party repackaged 
version?

 Within that directory is 'manager.xml', which looks 
 like this now:

That looks reasonable.  Post your server.xml with comments removed so we can 
see what's in there.

 Trying to hit either the root or the /manager/html/ url 
 results in 400 errors in apache:

What happens if you skip httpd, and go directly to Tomcat on port 8080 (or 
whatever port you have configured the HTTP Connector for)?

 - 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: 400 Errors while trying to deploy manager app.

2011-02-21 Thread Dave Shevett
On 2/21/11 3:52 PM, Caldarale, Charles R wrote:
 2) Tomcat 5.5, Apache 2.2.9
 Tomcat 5.5.what?  Also, is this a real Tomcat, or a 3rd-party repackaged 
 version?

Hmm, it looks like it's installed as part of hte debian package install.
 The signature says:
ii  tomcat5.5  5.5.26-5  Servlet and JSP engine

 That looks reasonable.  Post your server.xml with comments removed so we can 
 see what's in there.

Here it is:  http://pastebin.stonekeep.com/11570

(As noted in the file - i didn't list -all- the vhosts.  All vhosts
except congov2.stonekeep.com are working properly)

 What happens if you skip httpd, and go directly to Tomcat on port 8080 (or 
 whatever port you have configured the HTTP Connector for)?

Hmmm.  I'm not sure how to trigger the vhost lookup on a direct 8080 hit?

Errr, I should preface this with one more little bit.  This tomcat
server is on a NATted network - it is being proxied to via a firewalling
Apache reverse proxy - therefore I cannot go
'http://congov2.stonekeep.com:8080/' - the firewall isn't set up to
forward that port.

VirtualHost *
SetEnv force-proxy-request-1.0 1
SetEnv proxy-nokeepalive 1
SetEnv proxy-initial-not-pooled 1

ServerAlias hudson.stonekeep.com
ServerAlias congov2.stonekeep.com
ServerAlias arisia.stonekeep.com
# other vhosts removed...

ProxyPass / http://172.16.1.3/
ProxyPassReverse / http://172.16.1.3/
ProxyPreserveHost On

Proxy http://172.16.1.3/
Order allow,deny
Allow from all
/Proxy
/VirtualHost

All the other vhosts work.


-dave

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



Secure AJP over ssl

2011-02-21 Thread Jason Pyeron
Does (or could) tomcat 5.5 support encrypted AJP? The frontend apache will be on
a different host than the tomcat server. It is required that the communications
are encrypted.

Would I be best off using stunnel?

My googleing has led me astray to
http://download.oracle.com/docs/cd/E13789_01/bh.100/e13791/ajp.htm 

--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-   -
- Jason Pyeron  PD Inc. http://www.pdinc.us -
- Principal Consultant  10 West 24th Street #100-
- +1 (443) 269-1555 x333Baltimore, Maryland 21218   -
-   -
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
This message is copyright PD Inc, subject to license 20080407P00.




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



Re: Tomcat won't serve newly created files

2011-02-21 Thread Lanre Abiwon
I always load with Tomcat stopped. I never do a hot reload.As per the settings 
from norm, I made some changes to the connector element and (added URIEncding 
and I'm using proxyports and proxyName. I also enables the SSL) and a change in 
the web.xml (added to enable the use of SSL). That's all the changes I made. 
The application is deployed by Renaming the war file to ROOT.war.

On 21 Feb 2011, at 09:21, Mark Thomas wrote:

 On 21/02/2011 01:18, Lanre Abiwon wrote:
 I have been trying to solve this issue now for a couple of days without any 
 progress but I now know why the problem exists.
 I updated the web app and re-deployed it and realised that it is using an 
 older version of the webapp.
 It would seem the context root of the servlet is being changed to an older 
 cached version of the app that exists somewhere (not in the webapp 
 directory. The updated war file is the only app in the webapp directory) so 
 why it's behaving this way is a mystery to me right now.
 I hope someone can shed a light on this for me.
 
 Are you uploading the new version with Tomcat started or stopped?
 
 What changes have you made from the default configuration settings?
 
 Mark
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 


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



RE: Tomcat won't serve newly created files

2011-02-21 Thread Caldarale, Charles R
 From: Lanre Abiwon [mailto:angeli...@gmail.com] 
 Subject: Re: Tomcat won't serve newly created files

 I always load with Tomcat stopped.

And do you manually clean out the work and temp directories?  (You should.)  
Also note that there may be a ROOT.xml in conf/Catalina/[host] which will 
override the context.xml file in your webapp's META-INF directory.

 I made some changes to the connector element and (added URIEncding 
 and I'm using proxyports and proxyName. I also enables the SSL) and 
 a change in the web.xml (added to enable the use of SSL).

Don't just describe your changes, post them (preferably your entire server.xml, 
with comments removed).

What web.xml did you change?  Be specific - we can't read your mind (at least 
not until Pid comes back online).

 The application is deployed by Renaming the war file 
 to ROOT.war.

And what did you do with Tomcat's webapps/ROOT directory?

 - 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: 400 Errors while trying to deploy manager app.

2011-02-21 Thread Caldarale, Charles R
 From: Dave Shevett [mailto:shev...@homeport.org] 
 Subject: Re: 400 Errors while trying to deploy manager app.

 it looks like it's installed as part of hte debian package install.

Unfortunate, since that muddies the water a good bit.

 Here it is:  http://pastebin.stonekeep.com/11570

Don't see anything wrong in your server.xml - but that's not a guarantee.

 I'm not sure how to trigger the vhost lookup on a direct 8080 hit?

Shouldn't need to do that; as long as congov2.stonekeep.com resolves to 
Tomcat's IP address, you can go in directly from the same machine Tomcat is 
running on (bypassing your firewall).  A temporary change to /etc/hosts to map 
congov2.stonekeep.com to 127.0.0.1 may be needed.

You might want to enable Tomcat's AccessLogValve and see if the request even 
makes it Tomcat; if it doesn't, you'll need an httpd expert (not me).

Also, check the Tomcat logs - if you can find them on a 3rd-party repackaged 
version of Tomcat.

 - 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: Tomcat won't serve newly created files

2011-02-21 Thread Mark Thomas
On 21/02/2011 21:52, Lanre Abiwon wrote:
 I always load with Tomcat stopped.

Then you need to delete the expanded ROOT directory as well as replace
ROOT.war.

Mark



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



Re: 400 Errors while trying to deploy manager app.

2011-02-21 Thread Konstantin Kolinko
2011/2/21 Dave Shevett shev...@homeport.org:
 Hi folks, I have a relatively complex installation that I'm trying to
 get the manager app deployed into.  This was working at some point, but
 now I can't seem to get anything but 400 errors out of it.

Tomcat respond with error 400 when it cannot map request to a valid
web application (and thus feels desperate).

One notorious case of it is when there is no ROOT webapp on a host:
instead of error 404 you will receive zero-length response with HTTP
response code of 400.

From a comment in your server.xml you know that you are missing the ROOT 
webapp:

!-- (...)  All vhosts except congov2 are working properly   The
difference is they have ROOT.xml files, and congov2 does not --

Do you have ROOT.xml on your default host (the localhost in your
configuration) as well?


 REDACTED.com:80 172.16.1.1 - - [21/Feb/2011:12:29:38 -0500] PUT
 /manager/deploy?path=%2Fcongowar=update=true HTTP/1.0 400 - -
 Tomcat Maven Plugin/1.1

The above is an HTTP/1.0 request. I wonder whether it is mapped to a
virtual host correctly or whether it is served by localhost instead
(that depends on what is actually sent to Tomcat, though I see
REDACTED.com in the above log line).

You say that you have manager.xml deployed on that host, but is it
actually running? (autodeploy is off on your host, so Tomcat won't
notice the new webapp, unless you restart it, or tell it through API
or JMX like the manager app does). Is the manager webapp starting up
mentioned in the logs when Tomcat starts up?

Is that manager.xml file readable by the user that runs Tomcat?

Best regards,
Konstantin Kolinko

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



Re: Secure AJP over ssl

2011-02-21 Thread Mark Thomas
On 21/02/2011 22:28, Jason Pyeron wrote:
 Where are the docs for certificate chaining with mod_proxy? I have not found
 any.

Unhelpfully, the comments in the relevant class aren't in Javadoc
format. Grr. That will be fixed shortly.

In the meantime, add the following to your SSL virtual host in httpd:
RequestHeader set SSL_CLIENT_CERT %{SSL_CLIENT_CERT}s
RequestHeader set SSL_CIPHER %{SSL_CIPHER}s
RequestHeader set SSL_SESSION_ID %{SSL_SESSION_ID}s
RequestHeader set SSL_CIPHER_USEKEYSIZE %{SSL_CIPHER_USEKEYSIZE}s

And add the SSLValve to the Engine element in server.xml

Mark



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



Re: Secure AJP over ssl

2011-02-21 Thread Mark Thomas
On 21/02/2011 22:19, Jason Pyeron wrote:
 -Original Message-
 From: Mark Thomas 
 Sent: Monday, February 21, 2011 17:15
 To: Tomcat Users List
 Subject: Re: Secure AJP over ssl

 On 21/02/2011 21:31, Jason Pyeron wrote:
 Does (or could) tomcat 5.5 support encrypted AJP?

 No.

 Would I be best off using stunnel?

 Also, no.

 Use mod_proxy_http and proxy over https.
 
 Then we would loose the is_secure handling of AJP, as well as the client
 certificates of the web application clients. That is the purpose of
 mod_proxy_ajp, among others.

No you wouldn't. That all works (with a little more configuration) with
mod_proxy_http.

Mark



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



RE: Secure AJP over ssl

2011-02-21 Thread Jason Pyeron
 

 -Original Message-
 From: Mark Thomas [mailto:ma...@apache.org] 
 Sent: Monday, February 21, 2011 17:26
 To: Tomcat Users List
 Subject: Re: Secure AJP over ssl
 
 On 21/02/2011 22:19, Jason Pyeron wrote:
  -Original Message-
  From: Mark Thomas
  Sent: Monday, February 21, 2011 17:15
  To: Tomcat Users List
  Subject: Re: Secure AJP over ssl
 
  On 21/02/2011 21:31, Jason Pyeron wrote:
  Does (or could) tomcat 5.5 support encrypted AJP?
 
  No.
 
  Would I be best off using stunnel?
 
  Also, no.
 
  Use mod_proxy_http and proxy over https.
  
  Then we would loose the is_secure handling of AJP, as well as the 
  client certificates of the web application clients. That is the 
  purpose of mod_proxy_ajp, among others.
 
 No you wouldn't. That all works (with a little more 
 configuration) with mod_proxy_http.
 

Where are the docs for certificate chaining with mod_proxy? I have not found
any.

--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-   -
- Jason Pyeron  PD Inc. http://www.pdinc.us -
- Principal Consultant  10 West 24th Street #100-
- +1 (443) 269-1555 x333Baltimore, Maryland 21218   -
-   -
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
This message is copyright PD Inc, subject to license 20080407P00.



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



Re: Secure AJP over ssl

2011-02-21 Thread Mark Thomas
On 21/02/2011 21:31, Jason Pyeron wrote:
 Does (or could) tomcat 5.5 support encrypted AJP?

No.

 Would I be best off using stunnel?

Also, no.

Use mod_proxy_http and proxy over https.

Mark



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



RE: Secure AJP over ssl

2011-02-21 Thread Jason Pyeron
 -Original Message-
 From: Mark Thomas 
 Sent: Monday, February 21, 2011 17:15
 To: Tomcat Users List
 Subject: Re: Secure AJP over ssl
 
 On 21/02/2011 21:31, Jason Pyeron wrote:
  Does (or could) tomcat 5.5 support encrypted AJP?
 
 No.
 
  Would I be best off using stunnel?
 
 Also, no.
 
 Use mod_proxy_http and proxy over https.

Then we would loose the is_secure handling of AJP, as well as the client
certificates of the web application clients. That is the purpose of
mod_proxy_ajp, among others.



--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-   -
- Jason Pyeron  PD Inc. http://www.pdinc.us -
- Principal Consultant  10 West 24th Street #100-
- +1 (443) 269-1555 x333Baltimore, Maryland 21218   -
-   -
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
This message is copyright PD Inc, subject to license 20080407P00.



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



Re: 400 Errors while trying to deploy manager app.

2011-02-21 Thread Dave Shevett
On 2/21/11 6:03 PM, Konstantin Kolinko wrote:
 Tomcat respond with error 400 when it cannot map request to a valid
 web application (and thus feels desperate).

Interesting...

 One notorious case of it is when there is no ROOT webapp on a host:
 instead of error 404 you will receive zero-length response with HTTP
 response code of 400.
 
From a comment in your server.xml you know that you are missing the ROOT 
webapp:
 
 !-- (...)  All vhosts except congov2 are working properly   The
 difference is they have ROOT.xml files, and congov2 does not --
 
 Do you have ROOT.xml on your default host (the localhost in your
 configuration) as well?

Nope, here's what's in localhost:

dbs@nimitz:/etc/tomcat5.5/Catalina/localhost$ ls -l
total 12
-rwxrwx--- 1 tomcat55 adm 795 2007-06-04 17:06 admin.xml
-rwxrwx--- 1 tomcat55 adm 266 2007-06-04 17:06 host-manager.xml
-rwxrwx--- 1 tomcat55 adm 370 2007-06-04 17:06 manager.xml

 REDACTED.com:80 172.16.1.1 - - [21/Feb/2011:12:29:38 -0500] PUT
 /manager/deploy?path=%2Fcongowar=update=true HTTP/1.0 400 - -
 Tomcat Maven Plugin/1.1
 
 The above is an HTTP/1.0 request. I wonder whether it is mapped to a
 virtual host correctly or whether it is served by localhost instead
 (that depends on what is actually sent to Tomcat, though I see
 REDACTED.com in the above log line).

So the 1.0 request was due to a proxy problem I was working on elsewhere
that was forcing the proxy to 1.0.  I've removed that setting, but still
getting the error:

congov2.stonekeep.com:80 172.16.1.1 - - [21/Feb/2011:20:28:56 -0500]
GET / HTTP/1.1 400 - - Mozilla/5.0 (Macintosh; U; Intel Mac OS X
10_6_6; en-us) AppleWebKit/533.19.4 (KHTML, like Gecko) Version/5.0.3
Safari/533.19.4
congov2.stonekeep.com:80 172.16.1.1 - - [21/Feb/2011:20:29:00 -0500]
GET /manager/ HTTP/1.1 400 - - Mozilla/5.0 (Macintosh; U; Intel Mac
OS X 10_6_6; en-us) AppleWebKit/533.19.4 (KHTML, like Gecko)
Version/5.0.3 Safari/533.19.4

 You say that you have manager.xml deployed on that host, but is it
 actually running? (autodeploy is off on your host, so Tomcat won't
 notice the new webapp, unless you restart it, or tell it through API
 or JMX like the manager app does). Is the manager webapp starting up
 mentioned in the logs when Tomcat starts up?
 
 Is that manager.xml file readable by the user that runs Tomcat?

-rwxr-x--- 1 dbs dbs 364 2011-02-21 15:41 manager.xml

You sir, are a god.

Now when I hit /manager/html, I get a login prompt - and my Jenkins
build just did a successful push of the app:

[INFO] [tomcat:deploy]
[INFO] Deploying war to http://congov2.stonekeep.com/congo
[INFO] OK - Undeployed application at context path /congo
[INFO] OK - Deployed application at context path /congo
[INFO]

[INFO] BUILD SUCCESSFUL

HOORAY!


So in all honesty, this is now going back to a question I was trying to
solve to begin with - this may hijack the thread, but here goes anyway.

The other vhosts have fixed deployments.  They have ROOT.xml's that
deploy the .war file for each vhost:

Context path=/ docBase=/var/lib/tomcat5.5/webapps/congo-2.0.3.6.war
Parameter name=congo.home
value=/var/lib/congo/arisia.stonekeep.com/ override=false /
Parameter name=log4j.xml.url
value=file:/var/lib/congo/arisia.stonekeep.com/log4j.xml
override=false /
/Context

The Parameter is needed for the vhost to specify where to write
configuration files.

If jenkins is forcing the deploy via the app manager, how do I specify
parameters for the vhost context path
http://congov2.stonekeep.com/congo/;  ?

(I've also been informed the 'path=/' here is illegal.  It was left
over by the first person who built this setup - haven't tried removing
it yet :)

Again, ENORMOUS thanks.

-d

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



Re: Tomcat won't serve newly created files

2011-02-21 Thread angelicos
I always do. The problem is, it undeploys the new war file, but it's not
using it. It seems to have an old copy of the app stored somewhere else and
is using that or context root is being switched to it. Why this is I don't
know. But the behaviour is thus; any new files created by the app is created
in the nnew undeployed application's directory but attempting to access it
means it resolves the file path to the ghost app directory.

On 21 February 2011 22:16, Mark Thomas ma...@apache.org wrote:

 On 21/02/2011 21:52, Lanre Abiwon wrote:
  I always load with Tomcat stopped.

 Then you need to delete the expanded ROOT directory as well as replace
 ROOT.war.

 Mark



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




-- 
A Hundred Elephants can knock down the walls of a fortress.
One diseased rat can kill everyone inside


RE: Tomcat won't serve newly created files

2011-02-21 Thread Caldarale, Charles R
 From: angelicos [mailto:angeli...@gmail.com] 
 Subject: Re: Tomcat won't serve newly created files

 The problem is, it undeploys the new war file, but it's 
 not using it.

What's the it in the above sentence?  Why would a new war file be undeployed?

 It seems to have an old copy of the app stored somewhere 
 else and is using that or context root is being switched
 to it.

You've picked one very unlikely scenario that doesn't really fit any known 
Tomcat behavior.

 any new files created by the app is created in the nnew 
 undeployed application's directory

What does new undeployed application mean?

 but attempting to access it means it resolves the file 
 path to the ghost app directory.

Any actual evidence of that?  Do you see file references to an unexpected 
location?

Still have to think that your redeployment procedure is flawed.

 - 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: Tomcat won't serve newly created files

2011-02-21 Thread angelicos
Apologies.

 I meant Tomcat Deploys the new warfile but doesn't use the newly deployed
app (very tired. Really really long day).
Anyway, the reason I know that tomcat is serving the wrong app version is
because the login page for the updated app is different to the one tomcat is
serving along with several other pages served after logging in, and there
are no others apps deployed in the webapp folder.
The following are the server and context.xml fies: http://fpaste.org/uIsJ/


On 22 February 2011 03:35, Caldarale, Charles R
chuck.caldar...@unisys.comwrote:

  From: angelicos [mailto:angeli...@gmail.com]
  Subject: Re: Tomcat won't serve newly created files

  The problem is, it undeploys the new war file, but it's
  not using it.

 What's the it in the above sentence?  Why would a new war file be
 undeployed?

  It seems to have an old copy of the app stored somewhere
  else and is using that or context root is being switched
  to it.

 You've picked one very unlikely scenario that doesn't really fit any known
 Tomcat behavior.

  any new files created by the app is created in the nnew
  undeployed application's directory

 What does new undeployed application mean?

  but attempting to access it means it resolves the file
  path to the ghost app directory.

 Any actual evidence of that?  Do you see file references to an unexpected
 location?

 Still have to think that your redeployment procedure is flawed.

  - 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




-- 
A Hundred Elephants can knock down the walls of a fortress.
One diseased rat can kill everyone inside


RE: Tomcat won't serve newly created files

2011-02-21 Thread Caldarale, Charles R
 From: angelicos [mailto:angeli...@gmail.com] 
 Subject: Re: Tomcat won't serve newly created files

 the reason I know that tomcat is serving the wrong app 
 version is because the login page for the updated app is
 different to the one tomcat is serving along with several
 other pages served after logging in, and there are no
 others apps deployed in the webapp folder.

One possibility is that you have a ROOT.xml in conf/Catalina/localhost that 
defines a different docBase for your webapp.  (This was mentioned previously, 
but you didn't respond to it.)

Are you sure you're using the same Tomcat that you place the updated webapp in? 
 (Don't laugh; it happens a lot.)

You may also be encountering browser or proxy caching issues.  It might be 
useful to configure a non-proxied Connector, and test with that directly from 
inside the firewall.

 The following are the server and context.xml fies: 
 http://fpaste.org/uIsJ/

You actually posted a (possibly partial) web.xml, not a Context element.  
Where does this web.xml come from?  If it's Tomcat's conf/web.xml, be aware 
that you really shouldn't be putting app-specific security constraints there; 
they belong in the webapp's WEB-INF/web.xml file.  Also, the security settings 
are incomplete: there's no indication that any form of login is required - but 
perhaps you're doing that programmatically.  If what you posted is the webapp's 
WEB-INF/web.xml, why did you duplicate so much from the default on in 
conf/web.xml?

In your server.xml, you have both AccessLogValve and FastCommonAccessLogValve 
enabled; choose one or the other, not both.

 - 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: Secure AJP over ssl

2011-02-21 Thread Mladen Turk

On 02/21/2011 10:31 PM, Jason Pyeron wrote:

Does (or could) tomcat 5.5 support encrypted AJP? The frontend apache will be on
a different host than the tomcat server. It is required that the communications
are encrypted.



I would suggest you reconsider your security requirements.
Unless your frontend and backend are on different continents
the best way to fight wire tapping (only reason why would you
secure the communication at the first place) is much better
done with securing your infrastructure.


Regards
--
^TM

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



RE: Remote debugging options set into tomcat5w.exe take no effect.

2011-02-21 Thread Kannan J


Yes, separate line was the problem. tomcat5w.exe makers are frigging idiots and 
SAW 1,2,3,4,5 movie fans who love to torture their users.with meaningless 
issues like this.
Thanks for your help.

--- On Tue, 22/2/11, Caldarale, Charles R chuck.caldar...@unisys.com wrote:


From: Caldarale, Charles R chuck.caldar...@unisys.com
Subject: RE: Remote debugging options set into tomcat5w.exe take no effect.
To: Tomcat Users List users@tomcat.apache.org
Date: Tuesday, 22 February, 2011, 1:18 AM


 From: Kannan J [mailto:kannan_jayapraka...@yahoo.co.in] 
 Subject: Remote debugging options set into tomcat5w.exe take no effect.

 I have specified the jvm debuggin options in tomcat5w.exe
 -Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n
 for remote debugging tomcat.

Try putting only one option per line.

Verify that port 8000 is active with netstat.

- 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