Re: hello world

2008-09-19 Thread André Warnier

Caldarale, Charles R wrote:

From: news [mailto:[EMAIL PROTECTED] On Behalf Of thufir
Subject: Re: hello world

If Apache installs then why not tomcat?


Apache is a software organization with numerous products; if by Apache you 
mean httpd, it may be because the 3rd-party developers are more familiar with it so less 
likely to screw it up.  For Tomcat, they seem to take great delight in scattering its 
files all over, using symlinks to try to link it all back up, along with highly modified 
startup/shutdown scripts that add minor niceties but break anything but basic operation.

Use a real Tomcat, and see what happens.

 - Chuck

Hi.
I usually do not agree with Chuck on the subject of the 
benefits/inconvenients of third-party Tomcat packages.


But I must admit that, concerning Tomcat 5.x and Debian/Ubuntu, I do 
agree with the comment above.  The packager in that instance seems to 
have a great imagination and a lot of fun scattering Tomcat all over the 
place, in a way that makes it hard even to find out where to begin 
unraveling the spaghetti-bowl of symlinks and directories.


Apparently, for Tomcat5.5, it is even so that installing the basic 
Tomcat5.5 package (tomcat5.5) results in a Tomcat which starts up, but 
answers with a blank page and an error 400 no Host matches servername 
localhost when you try to access it via localhost:8180 (although there 
is only one Host in server.xml, named localhost).


You need to install the additional package tomcat5.5-webapps (which 
installs the webapps in some base directory different from Tomcat 
itself) to start seeing something (the basic Tomcat Welcome page).


I kind of imagine that this is because if Tomcat starts, but has 
absolutely no documents or applications to serve in its document root, 
it answers with that cryptic error message.


Now rather than recriminating at aeternum, does anyone know how to track 
down said packager, so that maybe he could come here and see the errors 
of his ways, or at least explain his logic here ? Same as for Debian 
Tomcat5.5 itself, I haven't a clue where to start.




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat 5.5, JNDI Connection Pooling, Active connections keep increasing....

2008-09-19 Thread sinoea kaabi

 You aren't using any class-level
members in your static methods so you should be fine.

This means that I cannot declare a:

public class Data {

private static DataSource datasource = null;

public static DataSource getDataSource() {
  if (datasource == null) {
 // create a datasource
  }
  return datasource;
}

}

In the code above the class-level member is the datasource.

Do you mean I should do like this instead:

public class Data {


public static DataSource getDataSource() {

  // create a new datasource for each call to this method

  return datasource;

}



}

 Date: Thu, 18 Sep 2008 11:56:33 -0400
 From: [EMAIL PROTECTED]
 To: users@tomcat.apache.org
 Subject: Re: Tomcat 5.5, JNDI Connection Pooling, Active connections keep 
 increasing
 
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 sinoea,
 
 sinoea kaabi wrote:
  The static methods are not thread-safe you say!
 
 No, your static methods are perfectly threadsafe. Johnny is just getting
 itchy because it's not what he'd do. You aren't using any class-level
 members in your static methods so you should be fine.
 
  Or in fact, you must be right, should I declare them synchronized?
 
 No! This will limit your code to serialized database access, in which
 case you are really only allowing a single connection to be used at a time.
 
 - -chris
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.9 (MingW32)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
 
 iEYEARECAAYFAkjSejEACgkQ9CaO5/Lv0PDPUACggEWdUUKYajU1uRr8YgO/u+2J
 //gAoLGPZqMvl6WDyEKQWnNkYpV2Tdrp
 =ewSc
 -END PGP SIGNATURE-
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

_
Win New York holidays with Kellogg’s  Live Search
http://clk.atdmt.com/UKM/go/111354033/direct/01/

Re: j_security_check Tomcat user status

2008-09-19 Thread Mark Thomas
Tokajac wrote:
 Hello!
 
 For Connection on database i initialize in context.xml: 
 [CODE]
 Realm className=org.apache.catalina.realm.JDBCRealm debug=0
  driverName=com.Driver
  connectionURL=jdbc:url
  connectionName=CONNAME connectionPassword=CONPASS userTable=BFWBBUSR
  userNameCol=LOGINNM userCredCol=USRPASS   
  userRoleTable=BFWBBUSR
  roleNameCol=ROLEID/
 [/CODE]
 j_security_check works fine.
 
 Now, i want to check another column on login: userstatus. Value of the
 column can be 0 or 1. Only users with correct username and status 1 can
 login.
 
 How can i do this with j_security_check?

Use a view rather than a table for userTable that is based on something
along the lines of:
SELECT * FROM BFWBBUSR WHERE userstatus=1;

Mark



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: html entities and urls with spaces

2008-09-19 Thread Mark Thomas
Brendan Martens wrote:
 Hmmm, here are my jk settings:
 
 JKWorkersFile/etc/libapache2-mod-jk/workers.properties
 JkLogFile/var/log/apache2/mod_jk.log
 JkLogLevelinfo
 JkShmFile/var/log/apache2/mod_jk.shm
 JkOptions+ForwardURICompatUnparsed

That value of JkOptions should be OK.

 The JK connector is the one from the mod_jk debian package. Could that
 be an issue if it was not compiled for the write version of tomcat? I'm
 not really sure how the jk connector builds work.

If the debian docs don't tell you what version they are using then your
guess is as good as mine.

From what you say this is easy to repeat. Have you tried accessing the same
file directly on Tomcat? Another option is to enable access logging in
httpd and Tomcat and turn up the mod_jk log level to debug, run the test
and analyse the results. It should be obvious quite quickly where it id
going wrong.

Mark



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Tomcat clustering: Don't see Cluster MBean

2008-09-19 Thread Landry Stephane Zeng Eyindanga

Mark Thomas a écrit :

Brendan Martens wrote:
  

Hmmm, here are my jk settings:

JKWorkersFile/etc/libapache2-mod-jk/workers.properties
JkLogFile/var/log/apache2/mod_jk.log
JkLogLevelinfo
JkShmFile/var/log/apache2/mod_jk.shm
JkOptions+ForwardURICompatUnparsed



That value of JkOptions should be OK.

  

The JK connector is the one from the mod_jk debian package. Could that
be an issue if it was not compiled for the write version of tomcat? I'm
not really sure how the jk connector builds work.



If the debian docs don't tell you what version they are using then your
guess is as good as mine.

From what you say this is easy to repeat. Have you tried accessing the same
file directly on Tomcat? Another option is to enable access logging in
httpd and Tomcat and turn up the mod_jk log level to debug, run the test
and analyse the results. It should be obvious quite quickly where it id
going wrong.

Mark



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




  

Hi all,
I am trying to use a tomcat6 cluster. I've just set my configuration 
(with two tomcat nodes) just as indicated in the tomcat clustering guide 
(http://tomcat.apache.org/tomcat-6.0-doc/cluster-howto.html).
Unfortunately, I see all MBeans that I should see, but the Cluster MBean 
(|type=Cluster,host=${HOST}|).
I'm in a urge, I'm working on an application that needs this MBean, or a 
cluster dedicated one.

Is it a bug ? what should I do ?



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat clustering: Don't see Cluster MBean

2008-09-19 Thread Mark Thomas
Landry Stephane Zeng Eyindanga wrote:
 Hi all,
 I am trying to use a tomcat6 cluster. I've just set my configuration
 (with two tomcat nodes) just as indicated in the tomcat clustering guide
 (http://tomcat.apache.org/tomcat-6.0-doc/cluster-howto.html).
 Unfortunately, I see all MBeans that I should see, but the Cluster MBean
 (|type=Cluster,host=${HOST}|).
 I'm in a urge, I'm working on an application that needs this MBean, or a
 cluster dedicated one.
 Is it a bug ? what should I do ?

Please do not hijack threads.

Mark



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat clustering: Don't see Cluster MBean

2008-09-19 Thread André Warnier

Hi Landry Stephane.

Hijacking a thread usually means hitting the reply button on a forum 
message, leave the subject as it was, and then ask a totally unrelated 
question in the message.
You should not do that, because it is confusing for people who try to 
help the original poster of the original question, and because it also 
confuses users who try to follow a conversation.


What you did here however was not really hijacking a thread, since you 
also changed the subject of the messsage.
But you left the original message in, and just asked your new unrelated 
question below.

I don't know if there is an official jargon term for that.
But it is totally confusing also, and your chances of getting an answer 
are severely diminished.


So why do you not start a totally new message, with the correct subject 
and content, and let's see from there, yes ?




Landry Stephane Zeng Eyindanga wrote:

Mark Thomas a écrit :

Brendan Martens wrote:
 

Hmmm, here are my jk settings:

JKWorkersFile/etc/libapache2-mod-jk/workers.properties
JkLogFile/var/log/apache2/mod_jk.log
JkLogLevelinfo
JkShmFile/var/log/apache2/mod_jk.shm
JkOptions+ForwardURICompatUnparsed



That value of JkOptions should be OK.

 

The JK connector is the one from the mod_jk debian package. Could that
be an issue if it was not compiled for the write version of tomcat? I'm
not really sure how the jk connector builds work.



If the debian docs don't tell you what version they are using then your
guess is as good as mine.

From what you say this is easy to repeat. Have you tried accessing 
the same

file directly on Tomcat? Another option is to enable access logging in
httpd and Tomcat and turn up the mod_jk log level to debug, run the test
and analyse the results. It should be obvious quite quickly where it id
going wrong.

Mark



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




  

Hi all,
I am trying to use a tomcat6 cluster. I've just set my configuration 
(with two tomcat nodes) just as indicated in the tomcat clustering guide 
(http://tomcat.apache.org/tomcat-6.0-doc/cluster-howto.html).
Unfortunately, I see all MBeans that I should see, but the Cluster MBean 
(|type=Cluster,host=${HOST}|).
I'm in a urge, I'm working on an application that needs this MBean, or a 
cluster dedicated one.

Is it a bug ? what should I do ?



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: html entities and urls with spaces

2008-09-19 Thread André Warnier

Brendan Martens wrote:
[...]


I am migrating this site from an older RHEL server where it works fine.
I am migrating to a Debian server with up to date Debian packages of
apache2, tomcat5, and java6.


For all their perceived faults, it is unlikely that Debian packagers 
would package mutually incompatible versions of Apache, Tomcat, Java, 
and mod_jk.  They may do funny things with the locations of files, but 
incompatible versions is something I have not seen often yet.
As to up-to-date, that is another question.  The versions of Apache, 
Tomcat, Java and mod_jk might not be the latest ones available on the 
respective original sites for all these packages. (*)
So it might help if you tracked down which exact version of each is 
really installed on your system, and listed them.

Like :
uname -a
java -version
for the version of Apache and mod_jk, look at the first line that Apache 
writes to it error.log file when it starts.

For the precise version of Tomcat ?...


This being said, for Apache/mod_jk/Tomcat, the respective probabilities 
of configuration errors versus incompatible versions would be something 
like 100 to 1.



(*) That is because it takes time and work to prepare packages, and make 
sure that the individual components that are supposed to work together 
really do. And by the time that is done, it might well be that a new 
original version of one of the individual packages has come to be available.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat 5.5, JNDI Connection Pooling, Active connections keep increasing....

2008-09-19 Thread Johnny Kewl


- Original Message - 
From: sinoea kaabi [EMAIL PROTECTED]

To: Tomcat Users List users@tomcat.apache.org
Sent: Friday, September 19, 2008 9:18 AM
Subject: RE: Tomcat 5.5, JNDI Connection Pooling, Active connections keep 
increasing




You aren't using any class-level
members in your static methods so you should be fine.

This means that I cannot declare a:

public class Data {

private static DataSource datasource = null;

public static DataSource getDataSource() {
 if (datasource == null) {
// create a datasource
 }
 return datasource;
}

}

In the code above the class-level member is the datasource.

Do you mean I should do like this instead:

public class Data {


public static DataSource getDataSource() {

 // create a new datasource for each call to this method

 return datasource;

}



}

---

Hi sinoea

If a datasource in DBCP represents the pool... you cant, you'd make a 
million data pools...


These are the innocent looking things that can give problems...

The new trick to isolate the class global vars wont help in this case
So in theory... all access to that datasource variable should be synch'd...

In the routine you showing and in all the others that use it...

You dont sync at method level
public static DataSource getDataSource()

you just sync access to that shared global

The Java tut has examples of the various ways to sync method and code 
sections...


As soon as more than one thread is sharing something... you either try 
change the structure so that its not shared
or you sync it... it is normally too difficult to imagine the possible race 
conditions...

The java tut has some example on just how tricky it can be as well...

---
HARBOR : http://www.kewlstuff.co.za/index.htm
The most powerful application server on earth.
The only real POJO Application Server.
See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm
---


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat 5.5, JNDI Connection Pooling, Active connections keep increasing....

2008-09-19 Thread Johnny Kewl

Heres the blurb on the stuff...

http://java.sun.com/docs/books/tutorial/essential/concurrency/index.html/01/

Where I spoke about the New Trick... they blab on about immutable..
The stuff you prbably want to look at is
Synchronized Statements

In C they talk about semisphores and stuff... if you come from there, its 
that made easier...


You cant jam sync statements everywhere... that will have some surprizing 
results as well... just where they needed...


... no expert... I just try avoid shared stuff to begin with

... the book has the truth ;)

---
HARBOR : http://www.kewlstuff.co.za/index.htm
The most powerful application server on earth.
The only real POJO Application Server.
See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm
---


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat clustering: Don't see Cluster MBean

2008-09-19 Thread Landry Stephane Zeng Eyindanga

Mark Thomas a écrit :

Landry Stephane Zeng Eyindanga wrote:
  

Hi all,
I am trying to use a tomcat6 cluster. I've just set my configuration
(with two tomcat nodes) just as indicated in the tomcat clustering guide
(http://tomcat.apache.org/tomcat-6.0-doc/cluster-howto.html).
Unfortunately, I see all MBeans that I should see, but the Cluster MBean
(|type=Cluster,host=${HOST}|).
I'm in a urge, I'm working on an application that needs this MBean, or a
cluster dedicated one.
Is it a bug ? what should I do ?



Please do not hijack threads.

  

sorry

Mark



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




  




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Tomcat clustering: Don't see Cluster MBean

2008-09-19 Thread Landry Stephane Zeng Eyindanga

Hi all,
I am trying to use a tomcat6 cluster. I've just set my configuration 
(with two tomcat nodes) just as indicated in the tomcat clustering guide 
(http://tomcat.apache.org/tomcat-6.0-doc/cluster-howto.html).
Unfortunately, I see all MBeans that I should see, but the Cluster MBean 
(|type=Cluster,host=${HOST}|).
I'm in a urge, I'm working on an application that needs this MBean, or a 
cluster dedicated one.

Is it a bug ? what should I do ?


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: hello world

2008-09-19 Thread Martin Gainty

once the real tomcat is installed..start logging..
http://tomcat.apache.org/tomcat-5.5-doc/logging.html

Martin 
__ 
Disclaimer and confidentiality note 
Everything in this e-mail and any attachments relates to the official business 
of Sender. This transmission is of a confidential nature and Sender does not 
endorse distribution to any party other than intended recipient. Sender does 
not necessarily endorse content contained within this transmission. 


 Date: Fri, 19 Sep 2008 09:09:11 +0200
 From: [EMAIL PROTECTED]
 To: users@tomcat.apache.org
 Subject: Re: hello world
 
 Caldarale, Charles R wrote:
  From: news [mailto:[EMAIL PROTECTED] On Behalf Of thufir
  Subject: Re: hello world
 
  If Apache installs then why not tomcat?
  
  Apache is a software organization with numerous products; if by Apache 
  you mean httpd, it may be because the 3rd-party developers are more 
  familiar with it so less likely to screw it up.  For Tomcat, they seem to 
  take great delight in scattering its files all over, using symlinks to try 
  to link it all back up, along with highly modified startup/shutdown scripts 
  that add minor niceties but break anything but basic operation.
  
  Use a real Tomcat, and see what happens.
  
   - Chuck
 Hi.
 I usually do not agree with Chuck on the subject of the 
 benefits/inconvenients of third-party Tomcat packages.
 
 But I must admit that, concerning Tomcat 5.x and Debian/Ubuntu, I do 
 agree with the comment above.  The packager in that instance seems to 
 have a great imagination and a lot of fun scattering Tomcat all over the 
 place, in a way that makes it hard even to find out where to begin 
 unraveling the spaghetti-bowl of symlinks and directories.
 
 Apparently, for Tomcat5.5, it is even so that installing the basic 
 Tomcat5.5 package (tomcat5.5) results in a Tomcat which starts up, but 
 answers with a blank page and an error 400 no Host matches servername 
 localhost when you try to access it via localhost:8180 (although there 
 is only one Host in server.xml, named localhost).
 
 You need to install the additional package tomcat5.5-webapps (which 
 installs the webapps in some base directory different from Tomcat 
 itself) to start seeing something (the basic Tomcat Welcome page).
 
 I kind of imagine that this is because if Tomcat starts, but has 
 absolutely no documents or applications to serve in its document root, 
 it answers with that cryptic error message.
 
 Now rather than recriminating at aeternum, does anyone know how to track 
 down said packager, so that maybe he could come here and see the errors 
 of his ways, or at least explain his logic here ? Same as for Debian 
 Tomcat5.5 itself, I haven't a clue where to start.
 
 
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

_
Want to do more with Windows Live? Learn “10 hidden secrets” from Jamie.
http://windowslive.com/connect/post/jamiethomson.spaces.live.com-Blog-cns!550F681DAD532637!5295.entry?ocid=TXT_TAGLM_WL_domore_092008

Re: Balance and sync data

2008-09-19 Thread Martin Spinassi
On Thu, 2008-09-18 at 23:31 +0200, André Warnier wrote:
 Martin Spinassi wrote:
 [...]
 
 Martin,
 
 I re-read the thread from the beginning, and as I understand it you have 
 - clients that upload files, most of then images
 - clients that download these same images
 - and you would like a system that handles this and duplicates the 
 images to 2 or more synchronised places, so as to have redundancy and 
 backup.
 
 Let me describe a part of an application which I designed, and see if 
 this inspires you.  This was under Apache, but it should be possible 
 also under Tomcat.
 
 I wanted to provide clients with a hierarchical folder hierarchy where 
 they could upload their documents via a simple drag and drop, but I did 
 not want to have to scan the whole structure regularly to check if 
 anything had been uploaded there.
 Plus, I wanted to know who uploaded what when, and wanted to do 
 something to those files after they uploaded them.
 Plus, I am lazy and not such a big-shot programmer, so if something 
 already exists and works well, I prefer to use it than to re-develop my 
 own buggy version.
 
 At the core, for allowing clients to upload the (in my case) documents, 
 there is DAV (which is also implemented under Tomcat).
 DAV, allows the client to see a folder structure on the server, and 
 drag-drop files in it, just like to a remote network drive. It even 
 works in Windows with the Explorer (not IE, the other one), it's called 
 web folders there.
 But once the file is dropped somewhere, you don't know anymore who put 
 it there.  Plus, since they can drop a file anywhere in the folder 
 hierarchy, you have to explore the whole hierarchy regularly on the 
 server to find the files they've dropped, if any.
 
 Except that, at the base, DAV is just an HTTP protocol extension. It 
 makes requests through URLs, and such requests get processed by a HTTP 
 server.  The requests just use different command verbs than GET and 
 POST.  For a while, I was thinking of creating my own handlers for those 
 verbs (PUT, MKCOL, OPTONS,..), or taking the DAV code, and implement my 
 own additional desired functionality into it.
 Then I realised that DAV being a HTTP protocol extension, you can do 
 HTTP authentication, and you can use filters around it.  That's true in 
 Apache, and also in Tomcat.
 
 So let's say that when a user wants to drop a file via DAV, you 
 intercept the HTTP requests, authenticate the request, and save that 
 somewhere.
 Next, your filter gets to run. It sees where the user is going to drop 
 the file (the URL of the PUT), and remembers it.  Then it lets the 
 request go through DAV (the actual file upload into a folder somewhere), 
 DAB being the filtered application here. Then when the DAV response 
 comes back through the filter, the filter takes the uploaded file from 
 where it is now (it knows the exact folder), and copies it to another 
 place (or does whatever you want with it). In addition, the filter also 
 knows who did it and other details, so it can pass this information 
 somewhere to be saved (into a database record ?).
 
 I personally find this more elegant than
 a) re-inventing the wheel : to upload/download files from a HTTP server, 
 is something for which DAV was designed, and the developer spent a lot 
 of time making it work reliably
 b) triggering external syncs in real-time
 3) scanning the file structure later to sync
 
 DAV also allows drag-and-drop downloads, and they also go through HTTP 
 requests...
 
 You don't need to change DAV in any way, you just wrap it in filters 
 that do what you want around it.
 
 André


André, first of all, thank you very much to take the time to re-read the
thread and write such a good response, I really appreciate it.


About DAV, it looks like you really made something big there.
I don't know if it applies to my case (or if I have the chance to do
it). 
The site I'm trying to make is some kind of a forum/social web. People
make threads or posts, and add it some pictures to illustrate it.

My first shot was rsync, just in case that one tomcat suddenly dies, the
other one would have almost all the pictures. NFS can be a better
option, and have a daily reply in one tomcat box, just in case the nfs
server stop working.


Once again, thanks for your response and time. I don't know how to apply
it here, but it surely is a must read, I'll give a try to the DAV
documentation.


Cheers



Martín


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: staging

2008-09-19 Thread Frank Uccello
I check war the work directory and there no abc folder in the staging computer 
so I not sure if that the issue. Anyways I copy the directory in and still same 
issue and yes I refresh the browsers also I clear the cache just be the safe 
side same issue


-Original Message-
From: Paul McGurn [mailto:[EMAIL PROTECTED] 
Sent: Thursday, September 18, 2008 5:01 PM
To: Tomcat Users List
Subject: RE: staging

Check to make sure your Tomcat work directory is being updated when you deploy 
the new war.  Also, have you confirmed it isn't just the browser cacheing the 
content (CTRL+F5 to hard refresh that)?


Paul McGurn   |   Manager, Customer Support
Escalations  Operations
· ·· LogMeIn, Inc.
www.LogMeIn.com   |   [EMAIL PROTECTED]
p. +1 781.897.1320   |   f. +1 781.897.0632


-Original Message-
From: Frank Uccello [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 18, 2008 4:42 PM
To: users@tomcat.apache.org
Subject: staging

I have a test server and a staging server: In the test server I have two
war files abclaunch.war and abcota.war
It works fine when I pull up it from the web browser

I copy this two file to the staging but it shows me the old version on
the staging web page I have confirmed there the same release date and
size I have also restart tomcat server for this webapp I now stuck I not
sure how do I get the test and staging to be same version why keep
showing the old version even though the war files are the same...

I also to test delete the files from staging and no web page shows up so
I know it is call from the correct directory


Please help




Frank


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: staging

2008-09-19 Thread Frank Uccello
I not sure if /manager/h\ml is installed I look at the testing which is
a linux box and tried //ip/manager/hml did not work and in windows which
is the staging server I have tried //localhost/manager/html


I also newbie at this so can went over my head here can you step by step
it please



Thanks


Frank


-Original Message-
From: Johnny Kewl [mailto:[EMAIL PROTECTED] 
Sent: Friday, September 19, 2008 1:48 AM
To: Tomcat Users List
Subject: Re: staging


- Original Message - 
From: Frank Uccello [EMAIL PROTECTED]
To: users@tomcat.apache.org
Sent: Thursday, September 18, 2008 10:42 PM
Subject: staging


I have a test server and a staging server: In the test server I have two
war files abclaunch.war and abcota.war
It works fine when I pull up it from the web browser

I copy this two file to the staging but it shows me the old version on
the staging web page I have confirmed there the same release date and
size I have also restart tomcat server for this webapp I now stuck I not
sure how do I get the test and staging to be same version why keep
showing the old version even though the war files are the same...

I also to test delete the files from staging and no web page shows up so
I know it is call from the correct directory


Please help

Frank

---
Frank... maybe a browsr caching, but unlikely.
Maybe... autodeploy not set, but unlikely
But one way to make sure... its use /manager/html
and undeploy the old one
Then also use that to deploy or drop the wars in...

Also do that on your test server because very often its the test server
that 
is actually fooling you, because its not looking at the wars, its
looking at 
the IDE.

If you get a funny in TC... undeploy old stuff... then drop in...
especially 
on the dev env with IDE's attached to that TC
Have fun...

---
HARBOR : http://www.kewlstuff.co.za/index.htm
The most powerful application server on earth.
The only real POJO Application Server.
See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm

--- 


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Solution to integrating error-page with struts2

2008-09-19 Thread Fred Toth

Hi all,

I had problems trying to get tomcat to forward to a struts2 action
from an error-page directive in web.xml. I was all set to run to
the list for help when I figured it out. I thought I'd post this anyway
in case it helps someone else.

I had error-page working in the simplest sense. If I pointed it toward
a plain HTML file, it worked fine. But if I tried going to a struts action,
I got strange behavior and the action never fired.

Then I read in the servlet spec that error-page forwarding doesn't go 
through

filters unless you use the dispatcher mechanism. And, sure enough,
struts2 is implemented as a filter. Once I added:

dispatcherREQUEST/dispatcher
dispatcherERROR/dispatcher

to the struts filter-mapping, everything worked.

The problem I was trying to solve: I'm using DefaultServlet to serve lots
of resources on my site. However, I needed a general purpose not found
handling mechanism. So if we forward a request to DefaultServlet for
a resource that doesn't exist, I want to trap that in my struts 2 not 
found

action.

Thanks.

Fred

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: hello world

2008-09-19 Thread Steve Ochani
Send reply to:  Tomcat Users List users@tomcat.apache.org
Date sent:  Fri, 19 Sep 2008 09:09:11 +0200
From:   André Warnier [EMAIL PROTECTED]
To: Tomcat Users List users@tomcat.apache.org
Subject:Re: hello world


 Now rather than recriminating at aeternum, does anyone know how to
 track down said packager, so that maybe he could come here and see the
 errors of his ways, or at least explain his logic here ? Same as for
 Debian Tomcat5.5 itself, I haven't a clue where to start.


I remember a while back someone from Ubuntu posting on this list stating that 
if someone
needs help getting their tomcat package working that the person should ask in 
their forums.
So that might be a place to start looking for the packager or at least someone 
who can
answer why the packages are so ... non functional.


-Steve O.





 -
 To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe,
 e-mail: [EMAIL PROTECTED] For additional commands,
 e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



tomcat5.5 and ubuntu hardy heron

2008-09-19 Thread wwuster

I've installed tomcat 5.5 on ubuntu hardy heron. If I go to localhost:8180 I
get the welcome screen. I can then click on Tomcat Administration on the
left and go to the admin page and get in using the default user/password.
However if I click on Tomcat Manager I get:

HTTP Status 403 - Access to the requested resource has been denied
type Status report
message Access to the requested resource has been denied
description Access to the specified resource (Access to the requested
resource has been denied) has been forbidden.
Apache Tomcat/5.5

I have also added these to lines to /etc/tomcat5.5/tomcat-users.xml:

  role rolename=manager description=this is the manager/
  user username=bob password=tomcat fullName=bob roles=manager/

In usr/share/tomcat5.5-webapps I don't see a manager subdirectory. I
installed tomcat5.5 with the synaptic package manager. Why can't I get to a
manager web page?

A second question. I copied the sample.war file into
usr/share/tomcat5.5-webapps. I read that if I go to localhost:8180/sample
that sample.war would be unpacked, but it is not. I get HTTP Status 404 -
/sample. I did restart tomcat and apache2. What am I doing wrong?

thanks,
William




-- 
View this message in context: 
http://www.nabble.com/tomcat5.5-and-ubuntu-hardy-heron-tp19575202p19575202.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat 6 HTTP / HTTP SSL Connector Port - Configuration Verification

2008-09-19 Thread Steve Ochani
On 18 Sep 2008 at 14:29, Gauss wrote:


 Greetings,
 
  
 
 I am using Apache Tomcat 6.0 on Windows Server 2003.  I'm not
 serving any
 pure HTML pages - all pages are JSPs, so I plan to use Tomcat in a
 standalone mode.
 
  
 
 I want to use port 80 for HTTP and port 443 for HTTPS/SSL versus
 the
 out-of-the-box Tomcat ports of 8080 / 8443.
 
  
 
 I have updated the appropriate connectors in server.xml  to use
 80/443,
 however, I am having trouble accessing my java application using
 ports
 80/443 from any machine on my LAN other than localhost where Tomcat
 resides.
 
  
 
 I am trying to determine if the problem is being caused by
 incorrect
 connector configuration or another conflict (eg firewall, port
 blocking,
 etc.).


Most likely firewall.

Do a test by turning off windows firewall then trying to access the page(s) 
from another 
machine.

If it works turn the firewall back on and add the appropriate ports.


-Steve O.




 
  
 
 My Question:
 
  
 
 Are other steps required - beyond updating the port numbers in
 server.xml
 for the appropriate connectors - to configure Tomcat to use ports 80
 / 443?
 
  
 
 Thanks for your consideration and assistance.
 
 



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: tomcat5.5 and ubuntu hardy heron

2008-09-19 Thread John5342
I use fedora rather than ubuntu myself so the details may differ but the
manager webapp may well be in a seperate package that may not be installed
with tomcat automatically. Try looking in synaptic for that. In fedora its
in tomcatversion-admin-webapps.

The automatic deployment of wars depends on you setting autoDeploy to true
which can be done in server.xml. Check the tomcat documentation for how to
do that.

Hope it helps.

John5342

2008/9/19 wwuster [EMAIL PROTECTED]


 I've installed tomcat 5.5 on ubuntu hardy heron. If I go to localhost:8180
 I
 get the welcome screen. I can then click on Tomcat Administration on the
 left and go to the admin page and get in using the default user/password.
 However if I click on Tomcat Manager I get:

 HTTP Status 403 - Access to the requested resource has been denied
 type Status report
 message Access to the requested resource has been denied
 description Access to the specified resource (Access to the requested
 resource has been denied) has been forbidden.
 Apache Tomcat/5.5

 I have also added these to lines to /etc/tomcat5.5/tomcat-users.xml:

  role rolename=manager description=this is the manager/
  user username=bob password=tomcat fullName=bob roles=manager/

 In usr/share/tomcat5.5-webapps I don't see a manager subdirectory. I
 installed tomcat5.5 with the synaptic package manager. Why can't I get to a
 manager web page?

 A second question. I copied the sample.war file into
 usr/share/tomcat5.5-webapps. I read that if I go to localhost:8180/sample
 that sample.war would be unpacked, but it is not. I get HTTP Status 404 -
 /sample. I did restart tomcat and apache2. What am I doing wrong?

 thanks,
 William




 --
 View this message in context:
 http://www.nabble.com/tomcat5.5-and-ubuntu-hardy-heron-tp19575202p19575202.html
 Sent from the Tomcat - User mailing list archive at Nabble.com.


 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: tomcat5.5 and ubuntu hardy heron

2008-09-19 Thread wwuster



John5342 wrote:
 
 I use fedora rather than ubuntu myself so the details may differ but the
 manager webapp may well be in a seperate package that may not be installed
 with tomcat automatically. Try looking in synaptic for that. In fedora its
 in tomcatversion-admin-webapps.
 
 The automatic deployment of wars depends on you setting autoDeploy to true
 which can be done in server.xml. Check the tomcat documentation for how to
 do that.
 
 Hope it helps.
 
 John5342
 

Synaptic only shows:
tomcat5.5-admin
tomcat5.5-webapps
and both are installed.

I edited /etc/tomcat5.5/server.xml and added this line: autoDeploy=true
int the host/host section. I then restarted tomcat and apache2 and tried
going to localhost:8180/sample. Still getting a 404 error.

thanks,
William





-- 
View this message in context: 
http://www.nabble.com/tomcat5.5-and-ubuntu-hardy-heron-tp19575202p19577095.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



jstack and Tomcat 6 on Windows

2008-09-19 Thread Brian Clark
Hello,

I run Tomcat 6.0.x as a service on Windows 2003, using Sun JDK 1.6. I was 
trying to use the jstack program, part of the JDK, to get a stack dump from 
Tomcat/Java on my server. However, I ran into a problem. First of all, Tomcat 
on Windows seems to hide the JVM instance. Java doesn't show up in my process 
listing. I tried running jstack against the  Tomcat PID but it errored out. 

Any idea how to make jstack work with Tomcat running as a service on Win2k3?

BTW:  I can get a stack dump using a tool like Sun's VisualVM, but I wanted to 
use jstack as part of a script, which I obviously can't do with VisualVM.

Thanks,
Brian



  

Tomcat JVM monitoring by SNMP

2008-09-19 Thread Edson Manners
I've been trying to get JVM monitoring through SNMP working with a
Tomcat instance that I am running. I've followed the intsructions on
this and other pages (http://gentoo-wiki.com/JVM_Monitoring_with_SNMP)
and I'm having trouble specifically with having the JVM options take
effect. i.e. after making the proposed changes and restarting tomcat I
don't see a process listening on the desired port.

My question is:
Has anyone else managed to get this to work for them?

Fedora 9
Tomcat 5.5.26
Ant 1.7
jdk1.5.0_15


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: tomcat5.5 and ubuntu hardy heron

2008-09-19 Thread André Warnier
Quickly, before the official tomcat brigade arrives : try dropping 
your war file in /var/lib/tomcat5.5/webapps instead.


I don't know yet why that is exactly, but I'm working on it ;-)

The packagers of Tomcat 5.5 for various Linux distributions seem to have 
done a good job at spreading Tomcat and webapps all over the place, and 
covering up their tracks with a zillion clever symlinks.
They probably had their reasons, but it makes it quite difficult to 
figure out what is happening.


An alternative is to wait a couple more hours, until the first 
suggestion to de-install your Tomcat package and install the Tomcat from 
the official Tomcat site arrives.



wwuster wrote:



John5342 wrote:

I use fedora rather than ubuntu myself so the details may differ but the
manager webapp may well be in a seperate package that may not be installed
with tomcat automatically. Try looking in synaptic for that. In fedora its
in tomcatversion-admin-webapps.

The automatic deployment of wars depends on you setting autoDeploy to true
which can be done in server.xml. Check the tomcat documentation for how to
do that.

Hope it helps.

John5342



Synaptic only shows:
tomcat5.5-admin
tomcat5.5-webapps
and both are installed.

I edited /etc/tomcat5.5/server.xml and added this line: autoDeploy=true
int the host/host section. I then restarted tomcat and apache2 and tried
going to localhost:8180/sample. Still getting a 404 error.

thanks,
William








-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: jstack and Tomcat 6 on Windows

2008-09-19 Thread André Warnier

Brian Clark wrote:

Hello,

I run Tomcat 6.0.x as a service on Windows 2003, using Sun JDK 1.6. I was trying to use the jstack program, part of the JDK, to get a stack dump from Tomcat/Java on my server. However, I ran into a problem. First of all, Tomcat on Windows seems to hide the JVM instance. Java doesn't show up in my process listing. I tried running jstack against the  Tomcat PID but it errored out. 


Any idea how to make jstack work with Tomcat running as a service on Win2k3?


I can't answer your question, but a look here might provide a clue :
http://commons.apache.org/daemon/procrun.html

That seems to be the way in which Tomcat is now implemented under 
Windows. Versions prior to 5.5 used to have a structure similar to the 
Unix version, with startup.bat and catalina.bat invoking Tomcat via 
Java, but that seems to have changed nowadays.


Also, if it might help somewhat : open a command window and navigate to 
the Tomcat/bin directory. Then, instead of running tomcat as a service, 
just enter the tomcatx.exe command (where x is probably 6 in your 
case) (not the tomcatxW.exe). That will run Tomcat in the command 
window, maybe easier for you to figure out what is going on.

Not for me though.



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: tomcat5.5 and ubuntu hardy heron

2008-09-19 Thread wwuster



awarnier wrote:
 
 Quickly, before the official tomcat brigade arrives : try dropping 
 your war file in /var/lib/tomcat5.5/webapps instead.
 
 I don't know yet why that is exactly, but I'm working on it ;-)
 
 The packagers of Tomcat 5.5 for various Linux distributions seem to have 
 done a good job at spreading Tomcat and webapps all over the place, and 
 covering up their tracks with a zillion clever symlinks.
 They probably had their reasons, but it makes it quite difficult to 
 figure out what is happening.
 
 An alternative is to wait a couple more hours, until the first 
 suggestion to de-install your Tomcat package and install the Tomcat from 
 the official Tomcat site arrives.
 

That worked. I moved sample.war to /var/lib/tomcat5.5/webapps and now
localhost:8180/sample takes me to a valid page:
Sample Hello, World Application and I see that the sample subdirectory has
been unpacked there. I also was starting to not like tomcat because of all
of the symlinks and lack of valid documentation (for ubuntu). I still have
the problem of not knowing why the manager webapp isn't in the ubuntu
installation.

thanks,
William




-- 
View this message in context: 
http://www.nabble.com/tomcat5.5-and-ubuntu-hardy-heron-tp19575202p19579580.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: jstack and Tomcat 6 on Windows

2008-09-19 Thread André Warnier

André Warnier wrote:

Brian Clark wrote:

Hello,

I run Tomcat 6.0.x as a service on Windows 2003, using Sun JDK 1.6. I 
was trying to use the jstack program, part of the JDK, to get a stack 
dump from Tomcat/Java on my server. However, I ran into a problem. 
First of all, Tomcat on Windows seems to hide the JVM instance. Java 
doesn't show up in my process listing. I tried running jstack against 
the  Tomcat PID but it errored out.
Any idea how to make jstack work with Tomcat running as a service on 
Win2k3?



I can't answer your question, but a look here might provide a clue :
http://commons.apache.org/daemon/procrun.html

That seems to be the way in which Tomcat is now implemented under 
Windows. Versions prior to 5.5 used to have a structure similar to the 
Unix version, with startup.bat and catalina.bat invoking Tomcat via 
Java, but that seems to have changed nowadays.


Also, if it might help somewhat : open a command window and navigate to 
the Tomcat/bin directory. Then, instead of running tomcat as a service, 
just enter the tomcatx.exe command (where x is probably 6 in your 
case) (not the tomcatxW.exe). That will run Tomcat in the command 
window, maybe easier for you to figure out what is going on.

Not for me though.



Addendum :
I just had another look at the Tomcat site. For version 5.5, there are 2 
downloads for Windows : one is a zip, the other an msi installer.

I must have in the past downloaded and installed the msi.
I downloaded the zip version now, and that one seems to contain the 
usual startup.bat and catalina.bat files, in addition to the Win32 
tomcat5 and tomcat5W executables.
Maybe the .bat files allow to start Tomcat in the traditional way, via 
Java etc.. ?




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: tomcat5.5 and ubuntu hardy heron

2008-09-19 Thread Gregor Schneider
On Fri, Sep 19, 2008 at 10:41 PM, André Warnier [EMAIL PROTECTED] wrote:
 An alternative is to wait a couple more hours, until the first suggestion to
 de-install your Tomcat package and install the Tomcat from the official
 Tomcat site arrives.

actually, that would be my suggestion.

however, I would not recommend to *purtge* the
ubunto-tomcat-installation but manually delete it except for the
scripts in /etc/init.d: just download tomcat fro tomcat.apache org,
install it into a directory of your choice and adapt the /etc/init.d -
script, and you're fine.

hth

gregor
-- 
what's puzzlin' you, is the nature of my game
gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2
gpgp-key available @ http://pgpkeys.pca.dfn.de:11371

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: jstack and Tomcat 6 on Windows

2008-09-19 Thread Martin Gainty

I would steer clear of any windowsInstaller messWithYourRegistry windows 
specific utilities and/or programs

SET JAVA_HOME=SourceFolderLocationWhereJavaIsInstalled
SET CATALINA_HOME=SourceFolderLocationWhereTomcatIsInstalled
SET JAVA_OPTS=whatever java options you need to set
then
java -jar bootstrap.jar works on every platform 

Martin 
__ 
Disclaimer and confidentiality note 
Everything in this e-mail and any attachments relates to the official business 
of Sender. This transmission is of a confidential nature and Sender does not 
endorse distribution to any party other than intended recipient. Sender does 
not necessarily endorse content contained within this transmission. 


 Date: Fri, 19 Sep 2008 23:42:42 +0200
 From: [EMAIL PROTECTED]
 To: users@tomcat.apache.org
 Subject: Re: jstack and Tomcat 6 on Windows
 
 André Warnier wrote:
  Brian Clark wrote:
  Hello,
 
  I run Tomcat 6.0.x as a service on Windows 2003, using Sun JDK 1.6. I 
  was trying to use the jstack program, part of the JDK, to get a stack 
  dump from Tomcat/Java on my server. However, I ran into a problem. 
  First of all, Tomcat on Windows seems to hide the JVM instance. Java 
  doesn't show up in my process listing. I tried running jstack against 
  the  Tomcat PID but it errored out.
  Any idea how to make jstack work with Tomcat running as a service on 
  Win2k3?
 
  I can't answer your question, but a look here might provide a clue :
  http://commons.apache.org/daemon/procrun.html
  
  That seems to be the way in which Tomcat is now implemented under 
  Windows. Versions prior to 5.5 used to have a structure similar to the 
  Unix version, with startup.bat and catalina.bat invoking Tomcat via 
  Java, but that seems to have changed nowadays.
  
  Also, if it might help somewhat : open a command window and navigate to 
  the Tomcat/bin directory. Then, instead of running tomcat as a service, 
  just enter the tomcatx.exe command (where x is probably 6 in your 
  case) (not the tomcatxW.exe). That will run Tomcat in the command 
  window, maybe easier for you to figure out what is going on.
  Not for me though.
  
 
 Addendum :
 I just had another look at the Tomcat site. For version 5.5, there are 2 
 downloads for Windows : one is a zip, the other an msi installer.
 I must have in the past downloaded and installed the msi.
 I downloaded the zip version now, and that one seems to contain the 
 usual startup.bat and catalina.bat files, in addition to the Win32 
 tomcat5 and tomcat5W executables.
 Maybe the .bat files allow to start Tomcat in the traditional way, via 
 Java etc.. ?
 
 
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

_
See how Windows connects the people, information, and fun that are part of your 
life.
http://clk.atdmt.com/MRT/go/msnnkwxp1020093175mrt/direct/01/

Re: jstack and Tomcat 6 on Windows

2008-09-19 Thread Johnny Kewl


- Original Message - 
From: André Warnier [EMAIL PROTECTED]

To: Tomcat Users List users@tomcat.apache.org
Sent: Friday, September 19, 2008 11:42 PM
Subject: Re: jstack and Tomcat 6 on Windows



André Warnier wrote:

Brian Clark wrote:

Hello,

I run Tomcat 6.0.x as a service on Windows 2003, using Sun JDK 1.6. I 
was trying to use the jstack program, part of the JDK, to get a stack 
dump from Tomcat/Java on my server. However, I ran into a problem. First 
of all, Tomcat on Windows seems to hide the JVM instance. Java doesn't 
show up in my process listing. I tried running jstack against the 
Tomcat PID but it errored out.
Any idea how to make jstack work with Tomcat running as a service on 
Win2k3?



I can't answer your question, but a look here might provide a clue :
http://commons.apache.org/daemon/procrun.html

That seems to be the way in which Tomcat is now implemented under 
Windows. Versions prior to 5.5 used to have a structure similar to the 
Unix version, with startup.bat and catalina.bat invoking Tomcat via Java, 
but that seems to have changed nowadays.


Also, if it might help somewhat : open a command window and navigate to 
the Tomcat/bin directory. Then, instead of running tomcat as a service, 
just enter the tomcatx.exe command (where x is probably 6 in your case) 
(not the tomcatxW.exe). That will run Tomcat in the command window, maybe 
easier for you to figure out what is going on.

Not for me though.



Addendum :
I just had another look at the Tomcat site. For version 5.5, there are 2 
downloads for Windows : one is a zip, the other an msi installer.

I must have in the past downloaded and installed the msi.
I downloaded the zip version now, and that one seems to contain the usual 
startup.bat and catalina.bat files, in addition to the Win32 tomcat5 and 
tomcat5W executables.
Maybe the .bat files allow to start Tomcat in the traditional way, via 
Java etc.. ?



As a Service the PID is TomcatX

From the start.BAT its JAVA


The easiest way to get the PID is to type
netstat -noa
Its the one next to the port you on...

On windows... you install your service version EXE
Then you download the zip version and copy the missing BIN scripts across... 
then you have all the files


If you need thread dumps

Start TC from the BAT file.
When you need a dump... press ctrl + break from term window... easier than 
Jstack...


Andre is right. as a service Tomcat appears under the non normal java... 
because its started from a windows service... not launched as a normal java 
process.


---
HARBOR : http://www.kewlstuff.co.za/index.htm
The most powerful application server on earth.
The only real POJO Application Server.
See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm
---










-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: jstack and Tomcat 6 on Windows

2008-09-19 Thread André Warnier

Martin Gainty wrote:

I would steer clear of any windowsInstaller messWithYourRegistry windows 
specific utilities and/or programs

SET JAVA_HOME=SourceFolderLocationWhereJavaIsInstalled
SET CATALINA_HOME=SourceFolderLocationWhereTomcatIsInstalled
SET JAVA_OPTS=whatever java options you need to set
then
java -jar bootstrap.jar works on every platform 



Oh, I didn't think of that !
And what happens when you log out of your Windows server ? :-)



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: jstack and Tomcat 6 on Windows

2008-09-19 Thread Brian Clark
Thanks everyone for their suggestions. 

Unfortunately, that doesn't help me with my particular issue. I have a memory 
leak in one of my apps, and when the system runs out of memory, it stops 
responding to new requests. I have a script that will detect this condition and 
automatically restart Tomcat. I was hoping to add a jstack command to this 
script to give me a thread dump prior to restarting Tomcat to give me better 
troubleshooting information. Your solution would work under normal 
circumstances, but I don't know how to script a ctrl+break.  ;-)

- Original Message 

From: Johnny Kewl [EMAIL PROTECTED]

If you need thread dumps

Start TC from the BAT file.
When you need a dump... press ctrl + break from term window... easier than 
Jstack...


  

Re: jstack and Tomcat 6 on Windows

2008-09-19 Thread André Warnier

Brian Clark wrote:
Thanks everyone for their suggestions. 


Unfortunately, that doesn't help me with my particular issue. I have a memory 
leak in one of my apps, and when the system runs out of memory, it stops 
responding to new requests. I have a script that will detect this condition and 
automatically restart Tomcat. I was hoping to add a jstack command to this 
script to give me a thread dump prior to restarting Tomcat to give me better 
troubleshooting information. Your solution would work under normal 
circumstances, but I don't know how to script a ctrl+break.  ;-)



But maybe it would help you, if some conditions are met :

If this Windows machine can be left with Tomcat running in a command 
window (instead of as a Windows service in the background).
You say you could do this with jstack (?), if this Tomcat was running in 
a way similar as under Unix/Linux (meaning a java process runnning 
bootstrap.jar, right ?).


If that is the case, then do as follows (it's longer to type than to do):
- if not already so, download and install a Java 6 JDK on that machine
(ok, that may take a while..)
- download the zip package of Tomcat6, as I suggested
- extract the content somewhere
- as Johnny suggested, copy the files from that unzipped /bin directory, 
to the current /bin directory of your Tomcat msi installation.  Those 
files seem to be the usual startup.bat and catalina.bat etc.. 
(corresponding to the startup.sh and catalina.sh of Unix/Linux 
versions). That zip probably also contains the same tomcat6.exe and 
tomcat6W.exe that you have already, so you might be able to copy the 
whole bin directory over the other one.
- fix up what is needed to have JAVA_HOME, JAVA_OPTS, CATALINA_HOME 
correctly defined (setenv.bat ?)
- in a command window, navigate to that bin directory and enter 
.\startup.bat.  That will start Tomcat right here, under Java, as a 
command-line application.


The main process will then be Java, which is what you are looking for, no ?
All your applications will work in exactly the same way.
Your script should work equally well whether Tomcat is running as a 
Windows Service, or just as an application, no ?

You might even see messages to the console that you've missed before.



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: hello world

2008-09-19 Thread thufir
On Fri, 19 Sep 2008 10:10:20 -0400, Steve Ochani wrote:


 Now rather than recriminating at aeternum, does anyone know how to
 track down said packager, so that maybe he could come here and see the
 errors of his ways, or at least explain his logic here ? Same as for
 Debian Tomcat5.5 itself, I haven't a clue where to start.

Wouldn't this be the starting place?  Yeah, I'm a tad bitter at wasting
my time.

 I remember a while back someone from Ubuntu posting on this list stating
 that if someone needs help getting their tomcat package working that the
 person should ask in their forums.

that kinda makes sense.

 So that might be a place to start
 looking for the packager or at least someone who can answer why the
 packages are so ... non functional.


I got tomcat working satisfactorily by following:

http://www.howtogeek.com/howto/linux/installing-tomcat-6-on-ubuntu/

I haven't fully tested it, but I did set up a manager role and so forth.

For the life of me, I can't see why the incredibly simple how-to is
*not* what synaptic does under ubuntu.  They should just remove
it from synaptic.

By the way, I thought that the JAVA_HOME environment variable
was passe?

I'm going to make a post to the ubuntu mailing list asking why?.



-Thufir


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: tomcat5.5 and ubuntu hardy heron

2008-09-19 Thread Caldarale, Charles R
 From: wwuster [mailto:[EMAIL PROTECTED]
 Subject: Re: tomcat5.5 and ubuntu hardy heron

 I also was starting to not like tomcat because of all of
 the symlinks and lack of valid documentation (for ubuntu).

Further evidence to support running away from the 3rd-party repackaged versions 
and instead installing a real Tomcat from tomcat.apache.org.  Besides actually 
operating the way it was intended, you'll also get a more current version, the 
documentation will match, and you'll get the manager app.

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]