Re: mod_ajp and Load-Balancing Issue

2008-09-21 Thread Stephen Nelson-Smith
Good morning,

 By error, I just meant that I'd get redirected to the login page
 instead of the expected page. Sorry to confuse. There are no error
 pages, logs or messages. Just that I got switched to a different node.

snip

 If you want to debug a little more: In Tomcat you can add a
 %S to your log pattern, which will log the session id. In
 httpd you can log the Set-Cookie outgoing header
 %{Set-Cookie}o and the JSESSIONID cookie %{JSESSIONID}C.
 If you are not using cookies, you can of course see the
 jsessionid path parameter dircetly in the logged URL.

 Thanks. I'll do that. (First time apache troubleshooter here). I'll get
 back on the results.

Did you get this to work?  I have exactly the same problem.  Apache
2.2 using mod_proxy_ajp with 3 x tomcat 6 instances behind it.  If I
remove two of the tomcats from the balancer pool, the application
works.  When I put them back in, I can log into one of the servers,
but as soon as I change screens on the application, I'm logged out.
This is because if the application detects a session change, it logs
the user out.  I need the load-balancer to direct traffic to the same
tomcat server on which the session began unless that server is down.

S.

-
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 / Windows / procrun ?

2008-09-21 Thread Johnny Kewl


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

To: Tomcat Users List users@tomcat.apache.org
Sent: Sunday, September 21, 2008 1:41 AM
Subject: Tomcat 5.5 / Windows / procrun ?



Hi.

I have Tomcat 5.5 running on a variety of platforms, among them Windows XP 
(my laptop) and Windows 2003 server.
For the Windows installation, until now I have been using the Windows 
Service Installer from the Tomcat 5.5 download page, and it works fine.


But could someone shed some light on the following puzzle ?

A recent discussion on this list triggered my curiosity, and as a result I 
bumped into several things :


- the installer for Windows installs a version of Tomcat 5.5 devoid of the 
usual startup.sh/bat, catalina.sh/bat etc.. and instead just installs 
a couple of files in Tomcat_home\bin, of which a tomcat5.exe (which seems 
to be the Tomcat executable), and a tomcat5w.exe which is the Windows GUI 
allowing to configure the Tomcat service..


- the ImagePath Registry entry for the Tomcat 5.5 Service shows this :
 C:\Tomcat5.5\bin\tomcat5.exe //RS//Tomcat5

- On the Tomcat 5.5 download page, in addition to the installer, there 
also exists a Tomcat 5.5 zip file. That one seems to contain the full 
complement of usual files of Tomcat, including Tomcat_home\bin, plus the 
tomcat5.exe and tomcat5w.exe which are also in the installer package.
It also contains a file service.bat which is described nowhere, but 
seesm to be related to the procrun item of which question below.


The Tomcat 5.5 and Tomcat 6 on-line documentation, setup page, section for 
Windows, only seem to mention the Installer package.  There is a link on 
both the 5.5 and 6.0 Windows setup sections, pointing to a Windows 
Service HowTo, which leads to a page mentioning procrun 1.0, but in the 
same breath indicating that it is now obsolete.


Digging further, I found a link to the Apache Commons project Daemon, 
which seems to include this procrun for Windows, and also a jsvc for 
Unix.


The page there relative to procrun,
(http://commons.apache.org/daemon/procrun.html)
 apart from being relatively difficult to read, seems interesting and 
seems to match the way my Windows Tomcat 5.5 instances are really 
installed and running.

(See registry line above).
But I found nowhere a link to download this procrun in binary form.
I also did not find any link there pointing to any other version of 
procrun...


On the other side of things, this same Apache Commons Daemon project also 
covers a jsvc, which seems to be a wrapper allowing to run Tomcat as a 
daemon under Unix/Linux.


I believe I have seen mentions of this jsvc in some Tomcat documents (or 
in this forum ?), but at any rate my Tomcat Debian Linux systems seem to 
run Tomcat 5.5 as daemon perfectly fine, without seeming to use this jsvc 
module.

So I wonder what it is used for.


What I kind of piece together of all this is as follows :

- the packagers of Tomcat 5.5 and Tomcat 6 for Windows use this procrun 
program (in whatever version, but probably not 1.0), to take the java JVM 
executable and make it into a Windows service which runs Tomcat.
This Windows Service executable is named tomcat5.exe in the msi 
distribution. (Or else this tomcat5.exe is not really java packaged as a 
service, but just a stub pointing to an installed Java jvm dll).
Anyway the result is packaged, together with the other Tomcat components, 
into a Windows Service Installer package which is the one on the Tomcat 
download page.


- the documentation of this procrun (or whatever is related to it for 
Tomcat), on the Tomcat site, is out-of-date and does not match the version 
of procrun that is being used above.


- the procrun program is a general utility that allows to take any Java 
program (or any program ?) and turn it into a Windows service.  It thus 
seems to be something like the old srvany workhorse, but a bit more 
sophisticated.  But this procrun program does not seem to be available for 
download in binary form.


- and I don't have a clue as to what jsvc may be for.




Thanks
André

---
Thats about right from when I looked at it a while back...

Java can be controlled from C... thats what the libs do... there is a linux 
and windows version...
If you look at the tomcat bootstrap class, you will see it has the 
(interface) methods that Procrun calls into.


So its just a windows service that starts the java engine, and calls into a 
java class to get it running...


If you want the binary for procrun... its just the tomcatX.exe file... 
rename it... ha ha


The TomcatW file is just a human interface... probably talking directly to 
the windows registry (params).


service bat... lets a user get it installed...

So if you have the TC zip version and want to install it as a service...
service install
will do it.

The real problem with installing TC from a zip is just that the APR is not 
there... and its a mission to guess the right one...
Stupid window users 

Re: SSL on TOMCAT with keytool

2008-09-21 Thread Matt Shields

We ran into a similar problem trying to get our purchased SSL certificate to
work. The previous reply had some info about getting the keytool to work,
but we have a tutorial that should help you get SSL working from start to
finish. Hope it helps!

http://blog.datajelly.com/company/blog/34-adding-ssl-to-tomcat.html
http://blog.datajelly.com/company/blog/34-adding-ssl-to-tomcat.html 


Alexey Eronko wrote:
 
 I have pem cert,rsa_key and ca cert from my own CA. I don't understand
 what
 kind of cert do I need in keystore to make it works on tomcat.
 

-- 
View this message in context: 
http://www.nabble.com/SSL-on-TOMCAT-with-keytool-tp19187386p19592073.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: Dual SSL configuration on tomcat

2008-09-21 Thread Matt Shields

I'm not too sure what you mean by two-way SSL. But I'm assuming you mean
that:

1) You'd like Tomcat to run as a web server that supports SSL/HTTPS. To do
this, I'd suggest this tutorial:
http://blog.datajelly.com/company/blog/34-adding-ssl-to-tomcat.html
http://blog.datajelly.com/company/blog/34-adding-ssl-to-tomcat.html 

2) You'd also like your web application to be able to connect, as a client,
to other SSL web sites. If you're using the latest version of Java, you
shouldn't need to follow any special steps... just connect to the web site
like you normally would. There's a number of ways to do this, one way would
be to use the java.net.URL class.


losintikfos wrote:
 
 I am trying to configure dual (two way) SSL on my tomcat 6.0.18. Do anyone
 know how to go about this?
 

-- 
View this message in context: 
http://www.nabble.com/Dual-SSL-configuration-on-tomcat-tp19306313p19592098.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: JVM config for tomcat5.5

2008-09-21 Thread Johnny Kewl


- Original Message - 
From: Jon Camilleri [EMAIL PROTECTED]

To: [EMAIL PROTECTED]
Cc: 'Tomcat Users List' users@tomcat.apache.org
Sent: Sunday, September 21, 2008 7:51 AM
Subject: RE: JVM config for tomcat5.5


Tomcat requires Java (at least SDK; but JDK won't harm) to be installed. 
On

my machine I usually set:

JAVA_HOME to the installation path for jdk/sdk e.g. /usr/java/jdk1.6.0_07
CATALINA_HOME to the installation path for /usr/apache-tomcat-6.0.16.

Hope this helps.

-Original Message-
From: jaki [mailto:[EMAIL PROTECTED]
Sent: 20 September 2008 08:55
To: users@tomcat.apache.org
Subject: JVM config for tomcat5.5


Hi,
I wanted to know where java_home is set for Tomcat when it's installed as 
a

service since I can't find any .bat/.sh files in my tomcat folder. Thanks
--
View this message in context:
http://www.nabble.com/JVM-config-for-tomcat5.5-tp19583097p19583097.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


Tomcat guys... please pack the the TC.EXE installer with all the script 
files as well...

Windows users do eventually want them...

Its a good question

JAVA_HOME is only used when you run TC from a bat...

On linux it is probably also used by the service but every linux will do 
its own thing, so you need to ask the dist guys...
But on Windows you run TomcatW.exe... you get a nice GUI, you click on 
the JAVA tab, and thats where you set stuff...

Notice that it doesnt use JAVA it uses the java C portal called JVM.DLL.
Thats how you do it...

And then in Netbeans the JRE used is neither of the above, its uses the 
JRE that you have set on the platform for you projects


It actually makes it very easy... and its nice being able to start it from 
script on one JRE, from the service on another JRE, and from NB on any JRE 
you want.


And you have to... because you may use templates in your servlets... and all 
is well, but flip the JRE to a lower version, and you get nailed.


... these TC guys are pretty clever dudes ;)

---
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]



Adding custom http headers to pages that my Tomcat serve

2008-09-21 Thread Clement Low
Hi all,


I would like to set a custom header to all of the pages that my Tomcat serve
:


*meta http-equiv=X-UA-Compatible content=IE=EmulateIE7 /*


What this does is basically telling IE 8 to display the particular page as
if it were in IE 7.

I do not want to add this header to every page that I have. What can I do to
tell Tomcat to achieve this?


Thank you.


RE: Dual SSL configuration on tomcat

2008-09-21 Thread Martin Gainty

agreed..man in the middle attacks are a growing problem

Tivoli has 2 way SSL connector
http://publib.boulder.ibm.com/infocenter/tivihelp/v5r1/index.jsp?topic=/com.ibm.itim.infocenter.doc/cpt/cpt_ic_security_ssl_authent2way.html

HTH
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: Sun, 21 Sep 2008 00:00:34 -0700
 From: [EMAIL PROTECTED]
 To: users@tomcat.apache.org
 Subject: Re: Dual SSL configuration on tomcat
 
 
 I'm not too sure what you mean by two-way SSL. But I'm assuming you mean
 that:
 
 1) You'd like Tomcat to run as a web server that supports SSL/HTTPS. To do
 this, I'd suggest this tutorial:
 http://blog.datajelly.com/company/blog/34-adding-ssl-to-tomcat.html
 http://blog.datajelly.com/company/blog/34-adding-ssl-to-tomcat.html 
 
 2) You'd also like your web application to be able to connect, as a client,
 to other SSL web sites. If you're using the latest version of Java, you
 shouldn't need to follow any special steps... just connect to the web site
 like you normally would. There's a number of ways to do this, one way would
 be to use the java.net.URL class.
 
 
 losintikfos wrote:
  
  I am trying to configure dual (two way) SSL on my tomcat 6.0.18. Do anyone
  know how to go about this?
  
 
 -- 
 View this message in context: 
 http://www.nabble.com/Dual-SSL-configuration-on-tomcat-tp19306313p19592098.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]
 

_
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: JVM config for tomcat5.5

2008-09-21 Thread Martin Gainty

Hi Jon-

you'll definitely need the JDK in $JAVA_HOME 
and $JDK_HOME/bin to compile the JSPs..

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. 


 From: [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 CC: users@tomcat.apache.org
 Subject: RE: JVM config for tomcat5.5
 Date: Sun, 21 Sep 2008 07:51:31 +0200
 
 Tomcat requires Java (at least SDK; but JDK won't harm) to be installed.  On
 my machine I usually set:
 
 JAVA_HOME to the installation path for jdk/sdk e.g. /usr/java/jdk1.6.0_07
 CATALINA_HOME to the installation path for /usr/apache-tomcat-6.0.16.
 
 Hope this helps.
 
 -Original Message-
 From: jaki [mailto:[EMAIL PROTECTED] 
 Sent: 20 September 2008 08:55
 To: users@tomcat.apache.org
 Subject: JVM config for tomcat5.5
 
 
 Hi, 
 I wanted to know where java_home is set for Tomcat when it's installed as a
 service since I can't find any .bat/.sh files in my tomcat folder. Thanks
 -- 
 View this message in context:
 http://www.nabble.com/JVM-config-for-tomcat5.5-tp19583097p19583097.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]
  
 
 __ Information from ESET NOD32 Antivirus, version of virus signature
 database 3457 (20080919) __
 
 The message was checked by ESET NOD32 Antivirus.
 
 http://www.eset.com
  
  
 
 __ Information from ESET NOD32 Antivirus, version of virus signature
 database 3458 (20080921) __
 
 The message was checked by ESET NOD32 Antivirus.
 
 http://www.eset.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]
 

_
Get more out of the Web. Learn 10 hidden secrets of Windows Live.
http://windowslive.com/connect/post/jamiethomson.spaces.live.com-Blog-cns!550F681DAD532637!5295.entry?ocid=TXT_TAGLM_WL_domore_092008

Re: Adding custom http headers to pages that my Tomcat serve

2008-09-21 Thread Mikolaj Rydzewski

Clement Low wrote:

I would like to set a custom header to all of the pages that my Tomcat serve
:


*meta http-equiv=X-UA-Compatible content=IE=EmulateIE7 /*


What this does is basically telling IE 8 to display the particular page as
if it were in IE 7.

I do not want to add this header to every page that I have. What can I do to
tell Tomcat to achieve this?
  
The better way is to implement a servlet filter and declare it in 
application's web.xml descriptor.


--
Mikolaj Rydzewski [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: JVM config for tomcat5.5

2008-09-21 Thread Markus Schönhaber

Martin Gainty:

you'll definitely need the JDK in $JAVA_HOME 
and $JDK_HOME/bin to compile the JSPs..


No, a JRE is enough.

Regards
  mks

-
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: Adding custom http headers to pages that my Tomcat serve

2008-09-21 Thread André Warnier

Mikolaj Rydzewski wrote:

Clement Low wrote:
I would like to set a custom header to all of the pages that my Tomcat 
serve

:


*meta http-equiv=X-UA-Compatible content=IE=EmulateIE7 /*


What this does is basically telling IE 8 to display the particular 
page as

if it were in IE 7.

I do not want to add this header to every page that I have. What can I 
do to

tell Tomcat to achieve this?
  
The better way is to implement a servlet filter and declare it in 
application's web.xml descriptor.



Hi.

I believe that, in theory, the meta http-equiv= content= 
...  tag in the html document, should have the same effect as if the 
server, in the HTTP headers of the response, had sent a header like

: 
before sending the actual content of the html page.

In other words, in your case, adding to the HTTP response a HTTP header 
like :


X-UA-Compatible: IE=EmulateIE7

should do the trick.

I have never tried the above, and I am not sure about it, but if it 
turns out to be true, then there should be more than one possibility to 
achieve what you want, in the order easiest first :


1) find an existing Tomcat add-on module (a filter) which is capable of 
adding a HTTP header to the responses of Tomcat.

I suggest to have a look here :
http://tuckey.org/urlrewrite/
and further here :
http://urlrewritefilter.googlecode.com/svn/trunk/src/doc/manual/3.1/index.html
Look at the set element, with type=response-header.

That module (urlrewrite) is a servlet filter, and can do a wide variety 
of things, and adding an outgoing HTTP header is among what it can do.


2) If that does not work for you, then you could write your own servlet 
filter, to do the same (adding a HTTP header to the response).
It is not a very complicated servlet filter to write, and there are 
probably some examples and tutorials floating around.


3) If that in the end does not work (meaning I amwrong, and the trick of 
adding this as a HTTP header does not work at all), then you would need 
a filter which scan and modifies each html response page, to insert this 
meta .. tag.
I believe that this is a lot less efficient than merely adding a HTTP 
header, which is the reason why I put this solution only in third place.
But basically, that is what most Content Management and templating 
systems systems do, so it cannot be so bad.

In that case, again you have a choice :

3a) find an existing servlet filter which does that.

3b) write your own servlet filter to do it.
It also does not sound extremely complicated, because you merely want to 
insert the same string into any outgoing html document.

But I am sure that you will find some complications on the way.

I believe that if the only thing you want to do is to add the meta tag, 
to *all* outgoing pages, 3b) may then anyway be your best bet, 
efficiency-wise, because it is likely that any solution you will find 
for 3a) will probably do a lot more, and thus be a lot heavier.
On the other hand, maybe it would be useful in the end to be able to do 
a lot more, and maybe efficiency is not very important in this case.





-
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: JVM config for tomcat5.5

2008-09-21 Thread André Warnier

Markus Schönhaber wrote:

Martin Gainty:


[...]
I think the main issue (which has also been touched in several other 
threads recently) is some level of confusion with the Tomcat Windows 
Installer, and what one finds oneself with in the Tomcat_install_dir/bin 
directory in that case.


Instead of having the normal series of startup.sh/bat, 
catalina.sh/bat, etc.. files in Tomcat/bin, you only find a 
tomcat(x).exe and a tomcat(x)W.exe there, basically.
No trace of an explicit command $JAVA -jar bootstrap.jar ... kind of 
command, no script with a path to the Java being used etc..


It works very well in terms of running Tomcat as a Windows Service, but 
it seems that as soon as people try to add some external things, they 
get very confused as to where things are.


One has to dig quite a bit to figure out that this tomcat(x).exe is in 
fact an instance of procrun (or rather prunsrv ?), belonging to the 
Apache Commons Daemon module, which does some (relatively unexplained) 
wizardry to wrap up a Java from somewhere (also rather unexplained) with 
the Tomcat executable and make it act as a Windows Service.

(See http://commons.apache.org/daemon/procrun.html)

If one of the experts on the subject were to provide some clearer 
explanation of this whole thing, it would be nice.


P.S.
Not to make too fine a point about it, but the above looks to me eerily 
similar to the case where users install a non official pre-packaged 
version of Tomcat under Linux. ;-)



-
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: Adding custom http headers to pages that my Tomcat serve

2008-09-21 Thread André Warnier

André Warnier wrote:
[...]
I wanted to add something to my previous hypothesis that


I believe that, in theory, the meta http-equiv= content= 
...  tag in the html document, should have the same effect as if the 
server, in the HTTP headers of the response, had sent a header like

: 
before sending the actual content of the html page.


The reference here
http://www.w3.org/TR/REC-html40/struct/global.html#h-7.4.4.2

seems to say that it is the other way around :
If the (html) document contains a tag
meta http-equiv= content=y ..
then the HTTP server (presumably by scanning the document prior to 
sending it to the client) *might* use the content of this tag to add an 
additional HTTP header to the response sent to the client.


Now, this would suppose that the HTTP server (Tomcat in this case)
1) scans the html pages going out before starting the response
2) effectively adds a HTTP header when it finds ditto tag above in the 
html document header.


Neither of which I am sure of.  Gurus ?

The next questions would be :

1) when IE receives the response from the HTTP server, does it 
effectively take into account a HTTP response header like

X-UA-Compatible: IE=EmulateIE7
or does it ignore it ?
On past form, IE has a tendency to ignore a lot of things the server is 
telling it, and using its own obscure logic to second-guess the server.


2) If IE does not take the HTTP server's HTTP header
X-UA-Compatible: IE=EmulateIE7
into account, does it itself then interpret the meta  tag in the html 
document ?




-
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 / Windows / procrun ?

2008-09-21 Thread Caldarale, Charles R
 From: André Warnier [mailto:[EMAIL PROTECTED]
 Subject: Tomcat 5.5 / Windows / procrun ?

 - the installer for Windows installs a version of Tomcat 5.5 devoid of
 the usual startup.sh/bat, catalina.sh/bat etc.. and instead just
 installs a couple of files in Tomcat_home\bin, of which a tomcat5.exe
 (which seems to be the Tomcat executable), and a tomcat5w.exe which is
 the Windows GUI allowing to configure the Tomcat service..

I also find it extremely annoying that the scripts are not provided in the .exe 
version, and that the .exe installs Tomcat in a different location than the 
.zip download.

 It also contains a file service.bat which is described nowhere

It's described here:
http://tomcat.apache.org/tomcat-5.5-doc/windows-service-howto.html
which is reachable from the Setup section of the doc.

 which leads to a page mentioning procrun 1.0, but in
 the same breath indicating that it is now obsolete.

Not sure why it says obsolete (current version is 1.0.1), since I think 
everything in there is still accurate, although the tomcat5w.exe program 
provides a much easier mechanism to change the parameters.

 But I found nowhere a link to download this procrun in binary form.

That's an unfortunate issue.  You can find binaries for various Windows flavors 
here:
https://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk/res/procrun/
(Change the name of the executables to tomcat5*.exe for the older level.)

Other than stumbling across that link in this mailing list, I don't know any 
way of finding that location.

 (Or else this tomcat5.exe is not really java  packaged as a
 service, but just a stub pointing to an installed Java jvm dll).

That is correct.  The tomcat5.exe program is just another Java launcher that 
uses JNI to access the JVM, which is installed as several DLLs (not just 
jvm.dll).  It's very similar to the plain java.exe launcher, except it handles 
additional, service-specific parameters.

 - the documentation of this procrun (or whatever is related to it for
 Tomcat), on the Tomcat site, is out-of-date and does not match the
 version of procrun that is being used above.

Actually, I think it's pretty close.

 - the procrun program is a general utility that allows to
 take any Java program (or any program ?) and turn it into
 a Windows service.

Just Java programs.

 - and I don't have a clue as to what jsvc may be for.

jsvc is just a Linux/UNIX program that starts with superuser privileges so it 
can bind to low ports, then switches to the desired userid to run the 
designated Java program.  Without it, you'll need to play games with iptables 
or run Tomcat as root (highly undesirable) in order to use ports 80 and 443.

 - 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]



Re: hello world

2008-09-21 Thread H. Hall

thufir wrote:

This cuts across IDE, OS and server.

I'm running Ubuntu:

[EMAIL PROTECTED]:~$ 
[EMAIL PROTECTED]:~$ cat /etc/lsb-release 
DISTRIB_ID=Ubuntu

DISTRIB_RELEASE=8.04
DISTRIB_CODENAME=hardy
DISTRIB_DESCRIPTION=Ubuntu 8.04.1
[EMAIL PROTECTED]:~$ 
[EMAIL PROTECTED]:~$ sudo apt-get update; sudo apt-get upgrade;

sudo apt-get dist-upgrade
...

which, near as I can tell, is fully updated.  I'm also
running Netbeans 6.0.1 and Java 6, and Tomcat 5.5.  (If Ubuntu is up
to date, why isn't Netbeans and Tomcat?  anyhow.)
  


When I installed Netbeans 6.1, the installer also installed Tomcat 
6.0.14. This was on a windows pc but I would find it very amazing if the 
Linux version of NB6.1  installed a TC 5.5.  Is is possible that a 
tomcat installed with Ubuntu?




From Netbeans I've installed the Tomcat plug-in, which
seems to have resulted in two Tomcat directories:

/usr/share/tomcat5.5
/usr/share/tomcat5.5-webapps

When I go to create a new web application from the IDE, Netbeans
prompts for the user/password for a manager and the path to
Catalina.
  

Is this the tomcat manager app?

If so, the user name is ide.  You can find and set the password by 
clicking on the 'Services' Tab in NetBeans, then expand the 'Servers' 
tab. You should see the Tomcat server and its version listed beside a 
tomcat icon.

Right click on the icon.and when the menu pops up click on 'properties'.
A window pops up, click on the 'connections' tab.

You should see a lot of information including where Catalina Home and 
Catalina Base are located. You will also see credentials for the 
manager. The username is ide, click on the show button to see the 
password.


You have to start tomcat manually, NB does not start it for you. Close 
the properties windown and Rt click on the tomcat icon you saw earlier 
and click start.  Make sure you don't have another tomcat already 
running and using the same port number.


cheers,
HH

Which version of Tomcat are they referencing?  Do I need to install
Tomcat 5.5 from Ubuntu, or just the plug-in from Netbeans?

Just not quite sure how to get started.  Navigating to localhost
just gives it works, so I'll have to dig further into fixing
tomcat.

It just seems that the one thing depends on another, which goes in
a circle so that I'm not even sure of my question.




-Thufir


  



--
H. Hall
ReedyRiver Group LLC
http://www.reedyriver.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 5.5 / Windows / procrun ?

2008-09-21 Thread André Warnier

Caldarale, Charles R wrote:

From: André Warnier [mailto:[EMAIL PROTECTED]
Subject: Tomcat 5.5 / Windows / procrun ?




It also contains a file service.bat which is described nowhere


It's described here:
http://tomcat.apache.org/tomcat-5.5-doc/windows-service-howto.html
which is reachable from the Setup section of the doc.


which leads to a page mentioning procrun 1.0, but in
the same breath indicating that it is now obsolete.


Not sure why it says obsolete (current version is 1.0.1), since I think 
everything in there is still accurate, although the tomcat5w.exe program 
provides a much easier mechanism to change the parameters.

Since the windows-service-howto is marked obsolete, I did not count it 
as a valid source for the procrun parameters.



But I found nowhere a link to download this procrun in binary form.


That's an unfortunate issue.  You can find binaries for various Windows flavors 
here:
https://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk/res/procrun/
(Change the name of the executables to tomcat5*.exe for the older level.)


Do you want to elaborate on the unfortunate issue of why the binaries 
are not available in the Commons, but are available on the Tomcat SVN ?


A related question : on the Tomcat SVN site, there are indeed various 
flavors, but on my laptop after installing Tomcat with the installer, I 
have only one flavor.  Does the installer pick the right one for the 
platform ?
And also, in the zip release of Tomcat, it seems that there is only one 
of each exe.  So which flavor is that ?





- the documentation of this procrun (or whatever is related to it for
Tomcat), on the Tomcat site, is out-of-date and does not match the
version of procrun that is being used above.


Actually, I think it's pretty close.

I have not actually compared with the one in the Commons, nor tested any 
of this.  I was writing is out-of-date because that's what's written 
in the how-to pages on the Tomcat site.
Maybe someone should just remove that out-of-date comment, it makes the 
whole thing all the more confusing.

Do you know where/how someone should suggest this ?

Thanks for the clarification on jsvc. That's at least one item that can 
be removed from the list.


Actually, I still have a question, or rather some assertions in need to 
be confirmed or denied :


1) One can download the zip version of Tomcat 5.5 (and 6 ?), and use the 
startup scripts to start a command-window instance of Tomcat. In that 
case, the executable shown running will be java.exe.
2) But starting Tomcat via these scripts will not allow to run Tomcat as 
a Windows Service.

3) To run Tomcat as a Service, you have to use the Tomcat(x).exe.
4) But you can use the tomcat(x).exe from the zip distribution, it is 
the same as the one installed by the Windows Installer.



-
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: mod_ajp and Load-Balancing Issue

2008-09-21 Thread Shaun Senecal
Are you using the ClusterSingleSignOn Valve?  If you are, this sounds like
the behaviour I was seeing, and have since resolved.  The problem I had
(well, part of the problem) was that the SSO information was not being
replicated across the cluster when tomcat instances were brought back up.
This meant that as long as the user was connecting to one of the -original-
cluster instances everything was ok.  However, as soon as the client gets
directed to one of the newly brought up instances they have no SSO info and
are prompted for login.

The solution was relatively simple.  I had to extend the ClusterSingleSignOn
and ClusterSingleSignOnListener classes to ensure that A, when an instance
is brought down the SSO information is not deactivated across the cluster
and, B, that when an instance is brought back up that it syncs with the
cluster to gather all currently known SSO info.

I am planning on merging the information into the ClusterSingleSignOn and
ClusterSingleSignOnListener classes and proposing a patch to Tomcat, but no
one has responded to my original post and I havent had the chance to truley
verify my fix.  It seems to be running and has been for a while now, but I
wouldnt put it into a production system just yet.

S.

On Sun, Sep 21, 2008 at 3:08 PM, Stephen Nelson-Smith [EMAIL PROTECTED]wrote:

 Good morning,

  By error, I just meant that I'd get redirected to the login page
  instead of the expected page. Sorry to confuse. There are no error
  pages, logs or messages. Just that I got switched to a different node.

 snip

  If you want to debug a little more: In Tomcat you can add a
  %S to your log pattern, which will log the session id. In
  httpd you can log the Set-Cookie outgoing header
  %{Set-Cookie}o and the JSESSIONID cookie %{JSESSIONID}C.
  If you are not using cookies, you can of course see the
  jsessionid path parameter dircetly in the logged URL.
 
  Thanks. I'll do that. (First time apache troubleshooter here). I'll get
  back on the results.

 Did you get this to work?  I have exactly the same problem.  Apache
 2.2 using mod_proxy_ajp with 3 x tomcat 6 instances behind it.  If I
 remove two of the tomcats from the balancer pool, the application
 works.  When I put them back in, I can log into one of the servers,
 but as soon as I change screens on the application, I'm logged out.
 This is because if the application detects a session change, it logs
 the user out.  I need the load-balancer to direct traffic to the same
 tomcat server on which the session began unless that server is down.

 S.

 -
 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: mod_ajp and Load-Balancing Issue

2008-09-21 Thread Shaun Senecal
Oops.  My orignal post is here (
http://www.nabble.com/Clustered-SSO-improperly-invalidated-upon-web-application-shutdown-to19447895.html#a19447895).
It might descirbe the problem better to see if this is the same issue you
are facing.


On Mon, Sep 22, 2008 at 9:45 AM, Shaun Senecal [EMAIL PROTECTED]wrote:

 Are you using the ClusterSingleSignOn Valve?  If you are, this sounds like
 the behaviour I was seeing, and have since resolved.  The problem I had
 (well, part of the problem) was that the SSO information was not being
 replicated across the cluster when tomcat instances were brought back up.
 This meant that as long as the user was connecting to one of the -original-
 cluster instances everything was ok.  However, as soon as the client gets
 directed to one of the newly brought up instances they have no SSO info and
 are prompted for login.

 The solution was relatively simple.  I had to extend the
 ClusterSingleSignOn and ClusterSingleSignOnListener classes to ensure that
 A, when an instance is brought down the SSO information is not deactivated
 across the cluster and, B, that when an instance is brought back up that it
 syncs with the cluster to gather all currently known SSO info.

 I am planning on merging the information into the ClusterSingleSignOn and
 ClusterSingleSignOnListener classes and proposing a patch to Tomcat, but no
 one has responded to my original post and I havent had the chance to truley
 verify my fix.  It seems to be running and has been for a while now, but I
 wouldnt put it into a production system just yet.

 S.


 On Sun, Sep 21, 2008 at 3:08 PM, Stephen Nelson-Smith [EMAIL 
 PROTECTED]wrote:

 Good morning,

  By error, I just meant that I'd get redirected to the login page
  instead of the expected page. Sorry to confuse. There are no error
  pages, logs or messages. Just that I got switched to a different node.

 snip

  If you want to debug a little more: In Tomcat you can add a
  %S to your log pattern, which will log the session id. In
  httpd you can log the Set-Cookie outgoing header
  %{Set-Cookie}o and the JSESSIONID cookie %{JSESSIONID}C.
  If you are not using cookies, you can of course see the
  jsessionid path parameter dircetly in the logged URL.
 
  Thanks. I'll do that. (First time apache troubleshooter here). I'll get
  back on the results.

 Did you get this to work?  I have exactly the same problem.  Apache
 2.2 using mod_proxy_ajp with 3 x tomcat 6 instances behind it.  If I
 remove two of the tomcats from the balancer pool, the application
 works.  When I put them back in, I can log into one of the servers,
 but as soon as I change screens on the application, I'm logged out.
 This is because if the application detects a session change, it logs
 the user out.  I need the load-balancer to direct traffic to the same
 tomcat server on which the session began unless that server is down.

 S.

 -
 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 / Windows / procrun ?

2008-09-21 Thread Caldarale, Charles R
 From: André Warnier [mailto:[EMAIL PROTECTED]
 Subject: Re: Tomcat 5.5 / Windows / procrun ?

 Do you want to elaborate on the unfortunate issue of why the
 binaries are not available in the Commons, but are available
 on the Tomcat SVN ?

Actually, I think most non-Java code from commons is source-only, with the 
expectation that the user will compile it for the target platform.  Due to the 
wide variety of Windows and Linux C environments available, it seems reasonable 
that the committers not try to cover all the bases.

 Does the installer pick the right one for the platform ?

No - only the 32-bit x86 version comes with either the .exe or .zip downloads.  
If you have an IA64 (perish the thought) or AMD64 platform, you need to 
recompile the source for that environment or go to the location specified in 
the previous message and download the appropriate .exe files.

 Maybe someone should just remove that out-of-date comment,
 it  makes the whole thing all the more confusing.
 Do you know where/how someone should suggest this ?

The normal procedure is to submit a bugzilla entry, preferably with a patch.

 1) One can download the zip version of Tomcat 5.5 (and 6 ?),
 and use the startup scripts to start a command-window instance
 of Tomcat. In that case, the executable shown running will be
 java.exe.

Correct; that's the standard launcher that comes with the JRE and is used by 
the scripts.

 2) But starting Tomcat via these scripts will not allow to
 run Tomcat as a Windows Service.

True, but the service.bat script will install the service, just as if you had 
used the .exe download.  If you're on Vista or Server 2008, you'll need to run 
the service.bat script as an administrator (not just be logged on as one).

 3) To run Tomcat as a Service, you have to use the Tomcat(x).exe.

The tomcatn.exe program *is* the service, at least as far as Windows is 
concerned.  The service.bat script installs the service, targeting the 
tomcatn.exe program.

Just running the tomcatn.exe program without the proper options does not 
create the service nor run as one; use the service.bat script to install and 
the tomcatnw.exe program to change settings.

 4) But you can use the tomcat(x).exe from the zip distribution, it is
 the same as the one installed by the Windows Installer.

Yes, they are identical.  Also, the tomcat5.exe and tomcat6.exe programs are 
identical (other than the names), as are the tomcat5w.exe and tomcat6w.exe 
programs.

 - 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]



Re: HOW TO install/setup 2 instances of tomcat on same server

2008-09-21 Thread buzzterrier

Here is a walk through on setting tomcat and Apache HTTP with catalina base
instances.

http://buzzterrier.blogspot.com/2008/08/apache-tomcat-apache-webserver.html


edponce wrote:
 
 I know this question has been asked a lot but I've read different
 solutions depending on the needs of the problem. I need to have 2
 instances of tomcat on the same server for the same application. One would
 be for production and the other for development (which can be start and
 stopped whenever without affecting the production one).
 From my understanding i need to have each instance on different ports and
 modifying some other files but what I am missing is the technical things.
 Can any one please guide me on the correct direction so that i don't mess
 up anything! I've never worked with Tomcat that is why i have no idea on
 how to do it.
 Thanks in advance 
 

-- 
View this message in context: 
http://www.nabble.com/HOW-TO-install-setup-2-instances-of-tomcat-on-same-server-tp19079289p19600961.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]