RE: customised error pages rather than tomcats error pages

2002-07-09 Thread Douglas, Rory
Title: RE: customised error pages rather than tomcats error pages





Try adding these definitions to your web.xml


error-page
 error-code404/error-code
 location/Failure.jsp/location
/error-page
 
error-page
 exception-typejava.io.IOException/exception-type
 location/Failure.jsp/location
/error-page


The top one should redirect to Failure.jsp on an HTTP 404, while the bottom one should redirect to Failure.jsp on an uncaught IOException.

Remember that error-page elements must come between welcome-file-list and taglib elements


cheers
Rory



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 09, 2002 10:17 AM
To: [EMAIL PROTECTED]
Subject: customised error pages rather than tomcats error pages



Hi


I would like to know how can I set tomcat to output my own custom error pages 
when i get error 403, 404, 500 and so on rather than tomcats error pages.


Thanxs


--
To unsubscribe, e-mail: mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]


Custom Tag caching bug in 4.1.6, 4.1.7

2002-07-09 Thread Douglas, Rory
Title: Custom Tag caching bug in 4.1.6, 4.1.7





Hi there


I've noticed some strange custom tag behaviour in 4.1.6 and 4.1.7.


I have a JSP page that uses Struts Form tags (1.0.2). The Struts tags name the rendered HTML form according to the associated Form Bean name. I have two Form tags on one page, each linked to a distinct Form Bean, each with a unique name.

On 4.0.4, and more recently 4.1.3, these rendered correctly as two form elements, each with a different name. Since 4.1.6, I notice this page no longer renders correctly, instead now I get two form elements both named with name of the first Form Bean. This causes some Javascript I have the page to break.

In other words, it seems as if an attribute value might be incorrectly cached between the two custom tags. Does anyone else have similar experiences, perhaps with non-Struts custom tags?


Rory Douglas
Sun Chemical Corporation
(201) 224-4600 x133
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] 




--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]


RE: Custom Tag caching bug in 4.1.6, 4.1.7

2002-07-09 Thread Douglas, Rory
Title: RE: Custom Tag caching bug in 4.1.6, 4.1.7





Thanks Ralph


I've checked it out with a very simple test tag. I don't encounter problems using a 1.2 TLD with tag pooling. I suspect the Struts 1.0.2 tags are 1.1. (Am I right in assuming this is what was meant by conformant tags?)

Also, as Remy suggests, disabling tag pooling in 4.1.7 and clearing out the work directory cleared up the issue.


cheers
Rory


-Original Message-
From: Ralph Einfeldt [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 09, 2002 11:47 AM
To: Tomcat Users List
Subject: AW: Custom Tag caching bug in 4.1.6, 4.1.7



There has been a little discussion about OSCache 
some days ago, that might match your problem. 
(See atached mails)


-Ursprüngliche Nachricht-
Von: Douglas, Rory [mailto:[EMAIL PROTECTED]]
Gesendet: Dienstag, 9. Juli 2002 17:20
An: Tomcat Users List (E-mail)
Betreff: Custom Tag caching bug in 4.1.6, 4.1.7



In other words, it seems as if an attribute value might be incorrectly
cached between the two custom tags. Does anyone else have similar
experiences, perhaps with non-Struts custom tags?





--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]


NT Realm (not fully functional yet)

2002-07-08 Thread Douglas, Rory
Title: NT Realm (not fully functional yet)





Hi there


If anyone is interested, I've written a Realm class that uses Andy Armstrong's Tagish JAAS NT Login Module to authenticate users against NT domains, assigning them Roles based on their NT Group membership.

The catch is that while the code works if I run it from my own main() method, I start getting native code errors when plugged into Tomcat as a Realm.

If anyone has the time/interest/need to try and fix this, I'm think this would be useful to a lot of Tomcat developers. Andy suspects it might be a bug in some of his code, but if anyone can find another reason and fix it, that would be great!

You can specify a default Domain to use for authentication in server.xml as below:


 Realm className=com.wedgedpig.catalina.realm.NTRealm domain=CORPORATE /


You will need JAAS and the Tagish classes (and the Tagish NT DLL installed in java.library.path) for this to work. Check out http://free.tagish.net . Using 4.0.4 I put all the Java classes in tc4.0\server\classes and it worked fine. You will also need to specify 

 -Djava.security.auth.login.config=location_of_jaas_config_file


to the JVM that runs Tomcat. You can do this by setting JAVA_OPTS environment variable to the above string before running the catalina.bat batch file.

cheers


Rory Douglas
Sun Chemical Corporation
(201) 224-4600 x133
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] 







TomcatNTPrincipal.java
Description: Binary data


NTRealm.java
Description: Binary data


ntrealm.config
Description: Binary data

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]


RE: Réf. : Property file for a WAR

2002-07-03 Thread Douglas, Rory
Title: RE: Réf. : Property file for a WAR





If you place your .properties file at the root of your WAR classpath ie (under WEB-INF\classes) then your class files can reference it relative to their position in the package directory structure.

i.e.


WEB-INF
 +---classes
 +--your.properties
 +--com
 +---yourcompany
 +-YourClass.class


YourClass.class can load your.properties by refering to it as residing at


..\..\your.properties


Otherwise, if the properties file is used by only one class, you should be able to place it in the same package directory as that class and reference it as your.properties.

If your context is marked as reloadable, then changes to the properties file at runtime will cause the context's classes to be reloaded.

cheers
Rory


-Original Message-
From: Søren Neigaard [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 03, 2002 8:48 AM
To: 'Tomcat Users List'
Subject: SV: Réf. : Property file for a WAR



Eeeh? I know that my WAR file must be under webapps, what I need is some way
to have my own property file somewhere, and be able to at runtime to guess
where this property file is.


/Søren


-Oprindelig meddelelse-
Fra: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sendt: 3. juli 2002 14:02
Til: Tomcat Users List
Emne: Réf. : Property file for a WAR




You must add a Logger élément in serveur.xml in the context of your
application


Usually, war file must be in webapps under TOMCAT.


Jean-Christophe




--
To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
mailto:[EMAIL PROTECTED]





--
To unsubscribe, e-mail: mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]


RE: Tomcat-4.1.6 and DBCP issue?

2002-07-02 Thread Douglas, Rory
Title: RE: Tomcat-4.1.6 and DBCP issue?





Hi there


I had some problems using the DBCP connection pool with 4.1.6 and the MS SQL Server JDBC drivers. I couldn't get the pool to use the user parameter specified in server.xml, I ended up having to include the username and password as part of the JDBC URL.

Oh, I've never used the built-in connection pooling before, so I can't speak for 4.1.3. What's happening with your 4.1.6 setup??


-Original Message-
From: Remy Maucherat [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 02, 2002 3:10 AM
To: Tomcat Users List
Subject: Re: Tomcat-4.1.6 and DBCP issue?



Jacob Kjome wrote:
 Hi,
 
 I'm just checking to confirm whether others that used DBCP connection 
 pooling successfully in Tomcat-4.1.3 are running into problems when 
 using Tomcat-4.1.6? That is the case for me. I'll check again 
 tomorrow to see if I did anything stupid, but the only difference seems 
 to be the tomcat version, so it would follow that something broke in 
 DBCP between 4.1.3 and 4.1.6.


It is easy to replace the DBCP included with another version or a new 
nightly if there is a problem (just replace commons-dbcp.jar in common/lib).


In the case of 4.1.6, some last minute changes were integrated in DBCP, 
so maybe there was some regression.


Remy



--
To unsubscribe, e-mail: mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]


RE: Tomcat-4.1.6 and DBCP issue?

2002-07-02 Thread Douglas, Rory
Title: RE: Tomcat-4.1.6 and DBCP issue?





Thanks Martin, that worked!


The problem is that the TC-4.1.6 Admin web-app adds a user ,not a username parameter when you add a DataSource resource.

-Original Message-
From: Martin Jacobson [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 02, 2002 9:37 AM
To: Tomcat Users List
Subject: Re: Tomcat-4.1.6 and DBCP issue?



Douglas, Rory wrote:


 Hi there
 
 I had some problems using the DBCP connection pool with 4.1.6 and the MS 
 SQL Server JDBC drivers. I couldn't get the pool to use the user 
 parameter specified in server.xml, I ended up having to include the 
 username and password as part of the JDBC URL.
 
 Oh, I've never used the built-in connection pooling before, so I can't 
 speak for 4.1.3. What's happening with your 4.1.6 setup??
 
 



DBCP expects the user to be identified by a parameter called username, 
not user :-)


Martin




--
To unsubscribe, e-mail: mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]


RE: APR not loaded?

2002-07-02 Thread Douglas, Rory
Title: RE: APR not loaded?





I don't think this is related to your problem.


YOu can remove this message by copying jkjni (.dll or .so) (from the binaries for the tomcat connectors) into one of tomcat\bin or jdk\jre\bin (can't remember which). I think this dll/so is only necessary for in-process integration of tomcat and a web server.

cheers
Rory


-Original Message-
From: Collins, Jim [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 02, 2002 11:42 AM
To: 'Tomcat Users List'
Subject: APR not loaded?



Hi all,


Does anyone know what this message means:


INFO: APR not loaded, disabling jni components: java.io.IOException: no
jkjni in java.library.path


I get this message in my catalina log file whenever I start Tomcat. I am
trying to load a native library in a servlet with no luck so far and was
wondering if this had anything to do with it.


Thanks


Jim.



PLEASE READ: The information contained in this email is confidential
and intended for the named recipient(s) only. If you are not an intended
recipient of this email you must not copy, distribute or take any 
further action in reliance on it and you should delete it and notify the
sender immediately. Email is not a secure method of communication and 
Nomura International plc cannot accept responsibility for the accuracy
or completeness of this message or any attachment(s). Please examine this
email for virus infection, for which Nomura International plc accepts
no responsibility. If verification of this email is sought then please
request a hard copy. Unless otherwise stated any views or opinions
presented are solely those of the author and do not represent those of
Nomura International plc. This email is intended for informational
purposes only and is not a solicitation or offer to buy or sell
securities or related financial instruments. Nomura International plc is
regulated by the Financial Services Authority and is a member of the
London Stock Exchange.




--
To unsubscribe, e-mail: mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]


RE: Updating files without restarting Tomcat

2002-07-02 Thread Douglas, Rory
Title: RE: Updating files without restarting Tomcat





You can specify the attribute 


 reloadable=true


in the context element for your web-application (in server.xml)


This will, however, watch all files for changes. There is no way to my knowledge of watching only some files.


cheers
Rory


-Original Message-
From: cbarnes [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 02, 2002 11:31 AM
To: Tomcat Users List
Subject: Updating files without restarting Tomcat



I am using Tomcat 4.


I have a number of properties files in the WEB-INF/classes directory. I need
to be able to change the values of the properties in these files, but it
looks as though I need to restart Tomcat every time I change a value in
order for it to recognise the new version of the file. Is there any
configuration I can change so that it is not necessary to restart Tomcat
when I change the values of the properties. Is it possible for this to apply
just to specified files - I don't want it to check the status of all the
files in WEB-INF/classes because I know the class files won't change.


Thanks,
Catharine



--
To unsubscribe, e-mail: mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]


RE: APR not loaded?

2002-07-02 Thread Douglas, Rory
Title: RE: APR not loaded?





Try setting APACHE2_HOME environment variable to point to your Apache2 directory.


That should do the trick
cheers
Rory


-Original Message-
From: Short, Dave [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 02, 2002 12:45 PM
To: 'Tomcat Users List'
Subject: RE: APR not loaded?



I put jkjni.dll (tomcat also wanted libapr.dll) in the tomcat\bin directory
and the message went away. Now it complains about not being able to find
the ${serverRoot}/conf/workers2.properties file. This file exists in the
Apache2\conf directory. How can I point tomcat to the Apache2\conf
directory (basically, how can I sent ${serverRoot)?


-Original Message-
From: Douglas, Rory [mailto:[EMAIL PROTECTED]]
Sent: July 02, 2002 8:55 AM
To: 'Tomcat Users List'
Subject: RE: APR not loaded?




I don't think this is related to your problem. 


YOu can remove this message by copying jkjni (.dll or .so) (from the
binaries for the tomcat connectors) into one of tomcat\bin or jdk\jre\bin
(can't remember which). I think this dll/so is only necessary for
in-process integration of tomcat and a web server.


cheers 
Rory 


-Original Message- 
From: Collins, Jim [ mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] ] 
Sent: Tuesday, July 02, 2002 11:42 AM 
To: 'Tomcat Users List' 
Subject: APR not loaded? 



Hi all, 


Does anyone know what this message means: 


INFO: APR not loaded, disabling jni components: java.io.IOException: no 
jkjni in java.library.path 


I get this message in my catalina log file whenever I start Tomcat. I am 
trying to load a native library in a servlet with no luck so far and was 
wondering if this had anything to do with it. 


Thanks 


Jim. 



PLEASE READ: The information contained in this email is confidential 
and intended for the named recipient(s) only. If you are not an intended 
recipient of this email you must not copy, distribute or take any 
further action in reliance on it and you should delete it and notify the 
sender immediately. Email is not a secure method of communication and 
Nomura International plc cannot accept responsibility for the accuracy 
or completeness of this message or any attachment(s). Please examine this 
email for virus infection, for which Nomura International plc accepts 
no responsibility. If verification of this email is sought then please 
request a hard copy. Unless otherwise stated any views or opinions 
presented are solely those of the author and do not represent those of 
Nomura International plc. This email is intended for informational 
purposes only and is not a solicitation or offer to buy or sell 
securities or related financial instruments. Nomura International plc is 
regulated by the Financial Services Authority and is a member of the 
London Stock Exchange. 




-- 
To unsubscribe, e-mail: 
mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]  
For additional commands, e-mail: 
mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]  




--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]


RE: can jsp's import text?

2002-06-27 Thread Douglas, Rory
Title: RE: can jsp's import text?





Use the jsp:include page=yoururl.html/ tag.
This just drags the text into the page as is.
If you want to parse it in the page, I think this might work:


%
 String extContent = jsp:include page=yourpage.whatever/;
 // now do stuff with extContent
%


cheers
Rory


-Original Message-
From: Seth Brahler [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 27, 2002 2:43 PM
To: [EMAIL PROTECTED]
Subject: can jsp's import text?



For example, in Cold Fusion you can use a HTTP tag that will bring any 
page's HTML and deliver it as a string. Then you can parse the string as 
you wish and display it on your site. Can this be done in JSP?



Seth Brahler


HR Information Systems
Cornell University
Office of Human Resources
337 Pine Tree Road
East Hill Plaza
Ithaca, New York 14853


607-255-9696



--
To unsubscribe, e-mail: mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]


example mod_jk2 files for Apache 2.0.39

2002-06-25 Thread Douglas, Rory
Title: example mod_jk2 files for Apache 2.0.39





As requested, attached are the actual config files I'm currently using to integerate Apache2 and Tomcat 4.1.3 using mod_jk2. I have not included server.xml (it is hard to read because it's maintained by the admin webapp) but the complete connector element is attached (actually the tomcat docs on this part of the config are fine).


Rory Douglas
Sun Chemical Corporation
(201) 224-4600 x133
[EMAIL PROTECTED] 







server.snippet
Description: Binary data


workers2.properties
Description: Binary data


jk2.properties
Description: Binary data

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]


mod_jk2 binary available here

2002-06-24 Thread Douglas, Rory
Title: mod_jk2 binary available here





Hello all


I have a working binary of mod_jk2.dll (working with Apache 2.0.39 on Win2k Server) if anyone would like to try it out. No guarantees though!

You can get it here -- http://www.mycgiserver.com/~worrel


cheers


Rory Douglas
Sun Chemical Corporation
(201) 224-4600 x133
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] 




--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]


example mod_jk2 configuration for Apache 2.0.39

2002-06-24 Thread Douglas, Rory
Title: example mod_jk2 configuration for Apache 2.0.39





Hi there


I haven't set-up anything really complex but the following setup should work. I haven't got around to trying load-balancing, if anyone does that and gets it working, please share!

---
in HTTPD.CONF (in Apache2\conf)
---
 LoadModule jk2_module modules/mod_jk2.dll


-
in JK2.PROPERTIES (in Tomcat4.1\conf)
-
I just commented out everything. Note that if you are using an AJP connector with port other than the default of 8009 you should specify here (where it says channelSocket.port). If you comment everything out JK seems to default to 8009 (and then 8010, 8011 and so on if you have more than one connector). If you want need specific ports for multiple connectors then specify channelSocket.port multiple times e.g

 channelSocket.port=8014
 channelSocket.port=8018


if you have two AJP connectors specified in server.xml with port numbers 8014 and 8018.


--
in WORKERS2.PROPERTIES
--


I just copied this file from tomcat4.1\jtc-src\jk\conf into Apache2\conf and edited it a bit. The really important bits seem to be:

 [channel.socket:localhost:8009]
 info=Ajp13 forwarding over socket
 debug=20
 tomcatId=Tomcat-Standalone


that actually sets up a worker. I understand that you can specify


 group=someGroupName


and create groups of workers for load-balancing. I also believe that every worker created without specfiying a group is in the default group (I think it is lb).

To map contexts use [uri:] blocks like so:


 [uri:/test]
 info=Test context mapping
 debug=20
 context=/test


Again, here you can specify which workers serve that context by specifying group=groupName


It's a good idea to keep these parts around too:


 [status:]
 info=Status worker, displays runtime informations


 [uri:/jkstatus/*]
 info=Display status information and checks the config file for changes.
 group=status:


you can then hit http://yourapacheserver/jkstatus and get a loads of jk info that might help you catch config errors


There are some docs in tomcat4.1\jtc-src\jk\doc\jk2 that might help (but they're not great).


Hope this is useful to someone
cheers
Rory


-Original Message
From: Jacob Kjome [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 24, 2002 11:08 AM
To: Tomcat Users List
Subject: Re: mod_jk2 binary available here



Hello Rory,


Actually, a working version of mod_jk2.dll has already been provided
by Apache here:


http://jakarta.apache.org/builds/jakarta-tomcat-connectors/jk2/nightly/win32/


However, the real issue now is how does one configure all this? Rory,
you would be providing a super service to a lot of people if you would
provide a minimal configuration of mod_jk2 with *all* files involved.


thanks,


Jake


Monday, June 24, 2002, 10:01:13 AM, you wrote:


DR Hello all


DR I have a working binary of mod_jk2.dll (working with Apache 2.0.39 on Win2k
DR Server) if anyone would like to try it out. No guarantees though!


DR You can get it here -- http://www.mycgiserver.com/~worrel


DR cheers


DR Rory Douglas
DR Sun Chemical Corporation
DR (201) 224-4600 x133
DR [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] 




-- 
Best regards,
Jacob mailto:[EMAIL PROTECTED]



--
To unsubscribe, e-mail: mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]


RE: example mod_jk2 configuration for Apache 2.0.39

2002-06-24 Thread Douglas, Rory
Title: RE: example mod_jk2 configuration for Apache 2.0.39





It looks like the ApacheConfig Listener is still in the Java sources for the connectors, but I don't think it has been updated to the new config format for mod_jk2 so it probably won't work.

in Server.xml, the important things are the className and protocolHandlerClassName attributes of the AJP Connector. these should be:

 protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler


and 


 className=org.apache.coyote.tomcat4.CoyoteConnector


Remember to match up the port number in all 3 place (in connector in Server.xml, in jk2.properties, and in worker2.properties) If you use 8009 for your AJP connector then you don't need to specify it in jk2.properties.

That should be all, no need to mess with web.xml ;-)


By the way, I was wrong about how to specify multiple channelSocket ports in jk2.properties. The following method kind of works:

 channelSocket.port=8009 (for the first one)
 channelSocket.otherone.port=8015 
 channelSocket.thirdconn.port=8020 etc


However, doing this, JK seems to try to open these ports for EACH Connector specified in Server.xml, and you get a lot of Address already bound exceptions (and a lot of listening ports, because JK just increments the port number each time and trys again).

have fun
Rory
-Original Message-
From: Liam Morley [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 24, 2002 1:43 PM
To: Tomcat Users List
Subject: Re: example mod_jk2 configuration for Apache 2.0.39



Rory,
thank you very much; that'll get me started. I'm guessing you're running 
with Tomcat4.1; I'm trying this with Tomcat 4.0.4. With JK1, there was a 
Listener you could plug in to your $CATALINA_HOME/conf/server.xml 
(Listener className=org.apache.ajp.tomcat4.config.ApacheConfig.../). 
Does that still exist? Are there any changes to the server.xml and 
web.xml that you can point out (for example, the mod_jk2 version of 
Connector className=org.apache.ajp.tomcat4.Ajp13Connector .../?)


Thanks once again, this is a big help.
Liam Morley


Douglas, Rory wrote:


 Hi there

 I haven't set-up anything really complex but the following setup 
 should work. I haven't got around to trying load-balancing, if anyone 
 does that and gets it working, please share!

 ---
 in HTTPD.CONF (in Apache2\conf)
 ---
 LoadModule jk2_module modules/mod_jk2.dll

 -
 in JK2.PROPERTIES (in Tomcat4.1\conf)
 -
 I just commented out everything. Note that if you are using an AJP 
 connector with port other than the default of 8009 you should specify 
 here (where it says channelSocket.port). If you comment everything out 
 JK seems to default to 8009 (and then 8010, 8011 and so on if you have 
 more than one connector). If you want need specific ports for 
 multiple connectors then specify channelSocket.port multiple times e.g

 channelSocket.port=8014
 channelSocket.port=8018

 if you have two AJP connectors specified in server.xml with port 
 numbers 8014 and 8018.

 --
 in WORKERS2.PROPERTIES
 --

 I just copied this file from tomcat4.1\jtc-src\jk\conf into 
 Apache2\conf and edited it a bit. The really important bits seem to be:

 [channel.socket:localhost:8009]
 info=Ajp13 forwarding over socket
 debug=20
 tomcatId=Tomcat-Standalone

 that actually sets up a worker. I understand that you can specify

 group=someGroupName

 and create groups of workers for load-balancing. I also believe that 
 every worker created without specfiying a group is in the default 
 group (I think it is lb).

 To map contexts use [uri:] blocks like so:

 [uri:/test]
 info=Test context mapping
 debug=20
 context=/test

 Again, here you can specify which workers serve that context by 
 specifying group=groupName

 It's a good idea to keep these parts around too:

 [status:]
 info=Status worker, displays runtime informations

 [uri:/jkstatus/*]
 info=Display status information and checks the config file for changes.
 group=status:

 you can then hit http://yourapacheserver/jkstatus and get a loads of 
 jk info that might help you catch config errors

 There are some docs in tomcat4.1\jtc-src\jk\doc\jk2 that might help 
 (but they're not great).

 Hope this is useful to someone
 cheers
 Rory

 -Original Message
 From: Jacob Kjome [mailto:[EMAIL PROTECTED]]
 Sent: Monday, June 24, 2002 11:08 AM
 To: Tomcat Users List
 Subject: Re: mod_jk2 binary available here


 Hello Rory,

 Actually, a working version of mod_jk2.dll has already been provided
 by Apache here:

 http://jakarta.apache.org/builds/jakarta-tomcat-connectors/jk2/nightly/win32/ 


 However, the real issue now is how does one configure all this? Rory,
 you would be providing a super service to a lot of people if you would
 provide a minimal configuration of mod_jk2 with *all* files involved.

 thanks,

 Jake

 Monday, June 24, 2002, 10:01:13

example mod_jk2 configuration for Apache 2.0.39

2002-06-24 Thread Douglas, Rory
Title: example mod_jk2 configuration for Apache 2.0.39





Just sending this again to see if I can get #@!!***$ Outlook NOT to send HTML mail!


I haven't set-up anything really complex but the following setup should work. I haven't got around to trying load-balancing, if anyone does that and gets it working, please share!

--- 
in HTTPD.CONF (in Apache2\conf) 
--- 
 LoadModule jk2_module modules/mod_jk2.dll 


- 
in JK2.PROPERTIES (in Tomcat4.1\conf) 
- 
I just commented out everything. Note that if you are using an AJP connector with port other than the default of 8009 you should specify here (where it says channelSocket.port). If you comment everything out JK seems to default to 8009 (and then 8010, 8011 and so on if you have more than one connector). If you want need specific ports for multiple connectors then specify channelSocket.port multiple times e.g

 channelSocket.port=8014 
 channelSocket.port=8018 


if you have two AJP connectors specified in server.xml with port numbers 8014 and 8018. 


-- 
in WORKERS2.PROPERTIES 
-- 


I just copied this file from tomcat4.1\jtc-src\jk\conf into Apache2\conf and edited it a bit. The really important bits seem to be:

 [channel.socket:localhost:8009] 
 info=Ajp13 forwarding over socket 
 debug=20 
 tomcatId=Tomcat-Standalone 


that actually sets up a worker. I understand that you can specify 


 group=someGroupName 


and create groups of workers for load-balancing. I also believe that every worker created without specfiying a group is in the default group (I think it is lb).

To map contexts use [uri:] blocks like so: 


 [uri:/test] 
 info=Test context mapping 
 debug=20 
 context=/test 


Again, here you can specify which workers serve that context by specifying group=groupName 


It's a good idea to keep these parts around too: 


 [status:] 
 info=Status worker, displays runtime informations 


 [uri:/jkstatus/*] 
 info=Display status information and checks the config file for changes. 
 group=status: 


you can then hit http://yourapacheserver/jkstatus and get a loads of jk info that might help you catch config errors 


There are some docs in tomcat4.1\jtc-src\jk\doc\jk2 that might help (but they're not great). 


Hope this is useful to someone 
cheers 
Rory 



Rory Douglas
Sun Chemical Corporation
(201) 224-4600 x133
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] 




--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]


RE: Tomcat 4 performance issues - Trying Tomcat 4.1.3 Beta

2002-06-24 Thread Douglas, Rory
Title: RE: Tomcat 4 performance issues - Trying Tomcat 4.1.3 Beta





Has anyone tried running stress tests using the new JDK 1.4.1 Beta??


Apparently it fixes the Javac memory leak bug. This may not make a difference here ( I believe there might be instance pooling issues), but would be interesting nonetheless.

-Original Message-
From: Reynir Hübner [mailto:[EMAIL PROTECTED]]
Sent: Saturday, June 22, 2002 1:25 PM
To: Tomcat Users List
Subject: RE: Tomcat 4 performance issues - Trying Tomcat 4.1.3 Beta




Victor  the others..


I've tested tc 4.1.5 and I get very similar problems as I did with tc. 4.1.3.


if I stress/load my application with 10*10 threads I get messages like this on the stdout log : 


ThreadPool: Caught exception executing org.apache.tomcat.util.net.TcpWorkerThread@422a3b, terminating thread
java.lang.OutOfMemoryError
 no stack trace available
java.lang.OutOfMemoryError
 no stack trace available


I increased the memory for jvm to 256mb and now tomcat runs, but executes everything alot (aprox 15-20 times) slower than tc 4.03 so I'm sticking to that for now, at least I would not use tc4.1.5 for production as it is right now. 


-reynir





 -Original Message-
 From: Victor Popiol [mailto:[EMAIL PROTECTED]]
 Sent: 21. júní 2002 15:57
 To: Tomcat Users List
 Subject: RE: Tomcat 4 performance issues - Trying Tomcat 4.1.3 Beta
 
 
 It also helped us when we increased the memory. Right now, we 
 have scheduled a daily service restart (this is in production :-( ).
 
 I'll be looking forward to your feedback regarding 4.1.5
 
 Regards
 Victor
 
 -Original Message-
 From: Reynir Hübner [mailto:[EMAIL PROTECTED]]
 Sent: Friday, June 21, 2002 11:43 AM
 To: Tomcat Users List
 Subject: RE: Tomcat 4 performance issues - Trying Tomcat 4.1.3 Beta
 
 
 
 I had the same problem, increased memory up to 512 and got rid of it.
 But it seemd kind of obvious to me that tomcat 4.1.3 was 
 taking way more memory than 4.0.3, for example an application 
 that normally takes 40 - 60 mb was taking 400mb of memory 
 under load, and it did not seem to release the memory unless 
 I killed the java.exe process. All my problems came as I was 
 stress-testing the application. I'm testing version 4.1.5 
 right now, I'll let you know if there is any difference. 
 
 -reynir
 
 
 
 
  -Original Message-
  From: Victor Popiol [mailto:[EMAIL PROTECTED]]
  Sent: 21. júní 2002 15:44
  To: Tomcat Users List
  Subject: RE: Tomcat 4 performance issues - Trying Tomcat 4.1.3 Beta
  
  
  More details:
  
  Server
  Compaq Single Processor 512 MB RAM
  Windows 2K
  
  Tomcat
  - Tomcat 4.1.3 Beta, binary distribution running as a service 
  and using Tomcat 4.0's isapi_redirector.dll to interface with IIS
  - Using Ajp3Processor with IIS
  - Runs as an NT Service
  - JVM parametes: -Xrs -Xincgc -Xms128m -Xmx256m
  
  
  Application
  - Struts
  - Lots of JSP's using I18N and custom tags
  - Database server is Oracle 8.1.7
  - # requests/day: 7,750
  
  Thanks
  Victor
  
  
  -Original Message-
  From: Remy Maucherat [mailto:[EMAIL PROTECTED]]
  Sent: Friday, June 21, 2002 9:46 AM
  To: Tomcat Users List
  Subject: Re: Tomcat 4 performance issues - Trying Tomcat 4.1.3 Beta
  
  
  Victor Popiol wrote:
   I installed Tomcat 4.1.3 beta. Took a while to configure 
  because the hidden issue with the user vs username parameter 
  in the datasource definition.
   
   After it has been running for a day, it died. Looking at 
  the logs I found the following:
   
   java.lang.OutOfMemoryError
no stack trace available
   java.lang.OutOfMemoryError
no stack trace available
   java.lang.OutOfMemoryError
no stack trace available
   java.lang.OutOfMemoryError
no stack trace available
   
   Any idea of components leaking memory?
  
  Without any additional details, I can't really help.
  
  A bug which could cause this has been fixed after 4.1.3:
  http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9715
  
  This bug was also present in TC 4.0.x, though.
  
  Remy
  
  
  --
  To unsubscribe, e-mail: 
  mailto:[EMAIL PROTECTED]
  For additional commands, e-mail: 
  mailto:[EMAIL PROTECTED]
  
  
  --
  To unsubscribe, e-mail: 
  mailto:[EMAIL PROTECTED]
  For additional commands, e-mail: 
  mailto:[EMAIL PROTECTED]
  
  
 
 --
 To unsubscribe, e-mail: 
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: 
 mailto:[EMAIL PROTECTED]
 
 
 --
 To unsubscribe, e-mail: 
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: 
 mailto:[EMAIL PROTECTED]
 
 


--
To unsubscribe, e-mail: mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]


4.1.3 Beta mod_jk2 ALMOST working

2002-06-21 Thread Douglas, Rory
Title: 4.1.3 Beta  mod_jk2 ALMOST working





Hi there


I'm trying Apache 2.0.39 and Tomcat 4.1.3 Beta on a Win2K machine with mod_jk2 nightly binary.
I'm doing all my configuration through workers2.properties (copied from jtc-src in the 4.1.3 download). My Coyote JK2 connector is on the default port 8009 and Apache2 is on port 9000.

It's almost working (I think). I can start Apache with no errors. My Apache2 error log registers:
 
 [warn] workerEnv.init() ok C:/Dev/Apache2/conf/workers2.properties
 [warn] mod_jk child init 1 -1


which seems good. I can then browse localhost:9000/jkstatus and see a JK2 status page.


However, if I try to browse localhost:9000/examples (I have [uri:/examples/*] set up) then I get 500 error from Apache. The log shows:

 [warn] service.init() Can't find child in scoreboard 2208
 [error] channelSocket.connect() connect failed dlportaldevsys1:8009 61 Unknown error 
 [error] ajp13.connect() failed ajp13:dlportaldevsys1:8009
 [error] ajp13.service() failed to connect endpoint errno=61 Unknown error
 [warn] ajp13.done() close endpoint ajp13:dlportaldevsys1:8009 error_state 1
 [error] mod_jk.handler() Error connecting to tomcat 21000


The first line doesn't seem too serious, but line two's connect failed...61 Unknown error is puzzling. I definitely have a connector configured on 8009, and I believe I've set the right className and protocolHandlerClassName attributes as well (see shortened version below).

 Connector className=org.apache.coyote.tomcat4.CoyoteConnector
 port=8009
 protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler
 useURIValidationHack=false
 Factory
 className=org.apache.catalina.net.DefaultServerSocketFactory/
 /Connector



Does anyone know what Error 61 is? Any help would be most appreciated. This is the closest I've come to getting Apache2/Tomcat4/mod_jk to work on Win2K. I suspect perhaps my jk2.properties file is incorrect. By default channelSocket.port=8019 is there, changing to 8009 gives me different errors, namely Bad file descriptor, BAD MESSAGE etc.

Thanks  apologies for the long, code-ridden mail


Rory Douglas
Sun Chemical Corporation
(201) 224-4600 x133
[EMAIL PROTECTED]




--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]


RE: 4.1.3 Beta mod_jk2 success!

2002-06-21 Thread Douglas, Rory
Title: RE: 4.1.3 Beta  mod_jk2 success!





Hi there


I think I've got this working, haven't done much testing though.


I was using the nightly mod_jk2.dll and getting strange bad message errors.


I recompiled the mod_jk2.dll from the 4.1.3 connectors source and now it seems to be working.


I will write up a short summary of what I did and post to the list soon.


cheers
Rory


-Original Message-
From: Short, Dave [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 21, 2002 1:25 PM
To: 'Tomcat Users List'
Subject: RE: 4.1.3 Beta  mod_jk2 ALMOST working



I've encountered error 61 when tomcat wasn't given enough time to initialize
prior to starting Apache (Apache 2.0.36  Tomcat 4.0.3).

Can you please provide your mod_jk.conf, workers2.properties and any other
required mod_jk2 files?


-Original Message-
From: Douglas, Rory [mailto:[EMAIL PROTECTED]]
Sent: June 21, 2002 9:11 AM
To: Tomcat Users List (E-mail)
Subject: 4.1.3 Beta  mod_jk2 ALMOST working




Hi there 


I'm trying Apache 2.0.39 and Tomcat 4.1.3 Beta on a Win2K machine with
mod_jk2 nightly binary. 
I'm doing all my configuration through workers2.properties (copied from
jtc-src in the 4.1.3 download). My Coyote JK2 connector is on the default
port 8009 and Apache2 is on port 9000.


It's almost working (I think). I can start Apache with no errors. My
Apache2 error log registers: 
 
 [warn] workerEnv.init() ok C:/Dev/Apache2/conf/workers2.properties 
 [warn] mod_jk child init 1 -1 


which seems good. I can then browse localhost:9000/jkstatus and see a JK2
status page. 


However, if I try to browse localhost:9000/examples (I have
[uri:/examples/*] set up) then I get 500 error from Apache. The log shows:


 [warn] service.init() Can't find child in scoreboard 2208 
 [error] channelSocket.connect() connect failed dlportaldevsys1:8009 61
Unknown error 
 [error] ajp13.connect() failed ajp13:dlportaldevsys1:8009 
 [error] ajp13.service() failed to connect endpoint errno=61 Unknown error 
 [warn] ajp13.done() close endpoint ajp13:dlportaldevsys1:8009 error_state
1 
 [error] mod_jk.handler() Error connecting to tomcat 21000 


The first line doesn't seem too serious, but line two's connect failed...61
Unknown error is puzzling. I definitely have a connector configured on
8009, and I believe I've set the right className and
protocolHandlerClassName attributes as well (see shortened version below).


 Connector className=org.apache.coyote.tomcat4.CoyoteConnector 
 port=8009 
 protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler 
 useURIValidationHack=false 
 Factory 
 className=org.apache.catalina.net.DefaultServerSocketFactory/ 
 /Connector 



Does anyone know what Error 61 is? Any help would be most appreciated. This
is the closest I've come to getting Apache2/Tomcat4/mod_jk to work on Win2K.
I suspect perhaps my jk2.properties file is incorrect. By default
channelSocket.port=8019 is there, changing to 8009 gives me different
errors, namely Bad file descriptor, BAD MESSAGE etc.


Thanks  apologies for the long, code-ridden mail 


Rory Douglas 
Sun Chemical Corporation 
(201) 224-4600 x133 
[EMAIL PROTECTED] 




--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]


JAVAC memory leak gone??

2002-06-21 Thread Douglas, Rory
Title: JAVAC memory leak gone??





Hi there


I've just downloaded the JDK 1.4.1 Beta. In Enhancements it says:


The compiler now releases the pointers to its internal data structures after compilation completes, so that using javac inside a java program will not leak space. 

Does this mean the memory leak problem in Tomcat is solved??


Rory Douglas
Sun Chemical Corporation
(201) 224-4600 x133
[EMAIL PROTECTED]




--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]


RE: Reading Address Book

2002-06-13 Thread Douglas, Rory
Title: RE: Reading Address Book





Hi there


If you are running Exchange Server, you can access Contacts stored in address lists on the server via LDAP (assuming the Exchange Server has the LDAP protocol enabled). I'm not sure that you can get at the addresses in a user's personal Address Book quite so easily. Look on the MSDN for info on using LDAP with Exchange.

cheers
Rory


-Original Message-
From: RNivas [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 24, 2002 5:28 AM
To: Tomcat Users List
Subject: Re: Reading Address Book



Dear David you bang on target.


 How do application can read fred's address book of Microsoft Outlook.
 As Fred click on Email this. There should be one pop with email
addresses from Microsoft Outlook or Outlook Express not from data base.
 My application do not have the address of Bill in database, but it is in
Microsoft Address book. So at Run time I want to read the email address of
bill from address book.


Thanks a lot.
Rnivas




- Original Message -
From: David Cassidy [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Thursday, June 13, 2002 2:36 PM
Subject: Re: Reading Address Book



 Lets see if I understand ...

 You have registered users of your application.

 When your user (lets call him fred) comes to your site and
 wants to send a message to his friend (bill) he clicks on EMAIL THIS

 You want a form that has fred's address book, so that fred only need
 click on
 'bill' to send the message to bill 

 If I understand this correctly ?

 Question ( if I have the above correct...)
 Does your application have fred's address book ?

 Lets assume that it does...

 Assuming that the address book is in the database you could then display
 the address book as

 FORM ACTION=..

 SELECT NAME=addressBookEntries
 OPTION VALUE=[EMAIL PROTECTED]Bill/OPTION
 OPTION VALUE=[EMAIL PROTECTED]Mary/OPTION
 etc 
 /SELECT

 INPUT TYPE=TEXT NAME=emailAddress VALUE=

 /FORM

 You could ouput the address book into the html page with just a simple
 print from the address book
 object

 Does this help ?

 D






--
To unsubscribe, e-mail: mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]


Re: Reading Address Book

2002-06-13 Thread Douglas, Rory
Title: Re: Reading Address Book





Sorry about the HTML in my last post!!


Hi there 
If you are running Exchange Server, you can access Contacts stored in address lists on the server via LDAP (assuming the Exchange Server has the LDAP protocol enabled). I'm not sure that you can get at the addresses in a user's personal Address Book quite so easily. Look on the MSDN for info on using LDAP with Exchange.

cheers 
Rory 


-Original Message- 
From: RNivas [mailto:[EMAIL PROTECTED]] 
Sent: Monday, June 24, 2002 5:28 AM 
To: Tomcat Users List 
Subject: Re: Reading Address Book 



Dear David you bang on target. 
 How do application can read fred's address book of Microsoft Outlook. 
 As Fred click on Email this. There should be one pop with email 
addresses from Microsoft Outlook or Outlook Express not from data base. 
 My application do not have the address of Bill in database, but it is in 
Microsoft Address book. So at Run time I want to read the email address of 
bill from address book. 
Thanks a lot. 
Rnivas 




- Original Message - 
From: David Cassidy [EMAIL PROTECTED] 
To: Tomcat Users List [EMAIL PROTECTED] 
Sent: Thursday, June 13, 2002 2:36 PM 
Subject: Re: Reading Address Book 



 Lets see if I understand ... 
 
 You have registered users of your application. 
 
 When your user (lets call him fred) comes to your site and 
 wants to send a message to his friend (bill) he clicks on EMAIL THIS 
 
 You want a form that has fred's address book, so that fred only need 
 click on 
 'bill' to send the message to bill  
 
 If I understand this correctly ? 
 
 Question ( if I have the above correct...) 
 Does your application have fred's address book ? 
 
 Lets assume that it does... 
 
 Assuming that the address book is in the database you could then display 
 the address book as 
 
 FORM ACTION=.. 
 
 SELECT NAME=addressBookEntries 
 OPTION VALUE=[EMAIL PROTECTED]Bill/OPTION 
 OPTION VALUE=[EMAIL PROTECTED]Mary/OPTION 
 etc  
 /SELECT 
 
 INPUT TYPE=TEXT NAME=emailAddress VALUE= 
 
 /FORM 
 
 You could ouput the address book into the html page with just a simple 
 print from the address book 
 object 
 
 Does this help ? 
 
 D 
 
 




-- 
To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] 
For additional commands, e-mail: mailto:[EMAIL PROTECTED] 




--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]


RE: jk_nt_service.exe with Tomcat V4.0.3

2002-06-11 Thread Douglas, Rory

If you type TOMCAT.EXE /? you will see the that it is possible to install
a tomcat service from the command line.  It is a bit tricky though, you need
to specify the main class etc.

rory

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 11, 2002 7:14 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: jk_nt_service.exe with Tomcat V4.0.3


Hi Folks
Is jk_nt_service.exe compatible with Tomcat V4.0.3? There is no copy in the
V4.0.3 directory structure.
There is the copy in the V3.3.1 directory. Is that version specific?
Thanks for any help,
Charlie.

Charles Collin
Software Engineer
eSolutions ITS
BT Ignite Solutions

   Tel: +44 (01442) 208756
   FAX: +44 (01442) 208757
   Mobile:  +44 (07764) 144289
   e-mail:  [EMAIL PROTECTED]
   Address: pp 421, 
Anzani House,
Trinity Avenue,
FELIXSTOWE, 
Suffolk,
IP11 4XB,
UK.

British Telecommunications plc
Registered office: 81 Newgate Street London EC1A 7AJ
Registered in England no. 180.

This electronic message contains information from British Telecommunications
plc which may be privileged or confidential. The information is intended to
be for the use of the individual(s) or entity named above. If you are not
the intended recipient be aware that any disclosure, copying, distribution
or use of the contents of this information is prohibited. If you have
received this electronic message in error, please notify us by telephone or
email (to the numbers or address above) immediately.


--
To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
mailto:[EMAIL PROTECTED]



Re: jk_nt_service.exe with Tomcat V4.0.3

2002-06-11 Thread Douglas, Rory


Look inside the bootstrap.jar file in the \bin directory.

I think the startup class should be
org.apache.catalina.startup.BootstrapService
(I'm using 4.1.3)

I haven't got time to test this, but try

tomcat -install tomcat403 c:\jdk\jre\bin\server\jvm.dll -start
org.apache.catalina.startup.BootstratpService

Obviously, replace c:\jdk... with the path to your jdk directory. You can
use either the server or client jvm dll's.

Actually I just tested that now, it works !

cheers
Rory

-Original Message-
From: Short, Dave [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 11, 2002 11:12 AM
To: 'Douglas, Rory '
Subject: RE: jk_nt_service.exe with Tomcat V4.0.3


Can anyone please provide a working example of how to install Tomcat 4.0.3
as a service on W2K (which class to specify, etc.)? 

-Original Message-
From: Douglas, Rory
To: 'Tomcat Users List'
Sent: 6/11/02 8:50 AM
Subject: RE: jk_nt_service.exe with Tomcat V4.0.3

If you type TOMCAT.EXE /? you will see the that it is possible to
install
a tomcat service from the command line.  It is a bit tricky though, you
need
to specify the main class etc.

rory

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 11, 2002 7:14 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: jk_nt_service.exe with Tomcat V4.0.3


Hi Folks
Is jk_nt_service.exe compatible with Tomcat V4.0.3? There is no copy in
the
V4.0.3 directory structure.
There is the copy in the V3.3.1 directory. Is that version specific?
Thanks for any help,
Charlie.

Charles Collin
Software Engineer
eSolutions ITS
BT Ignite Solutions

   Tel: +44 (01442) 208756
   FAX: +44 (01442) 208757
   Mobile:  +44 (07764) 144289
   e-mail:  [EMAIL PROTECTED]
   Address: pp 421, 
Anzani House,
Trinity Avenue,
FELIXSTOWE, 
Suffolk,
IP11 4XB,
UK.

British Telecommunications plc
Registered office: 81 Newgate Street London EC1A 7AJ
Registered in England no. 180.

This electronic message contains information from British
Telecommunications
plc which may be privileged or confidential. The information is intended
to
be for the use of the individual(s) or entity named above. If you are
not
the intended recipient be aware that any disclosure, copying,
distribution
or use of the contents of this information is prohibited. If you have
received this electronic message in error, please notify us by telephone
or
email (to the numbers or address above) immediately.


--
To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
mailto:[EMAIL PROTECTED]



JkSet directives for mod_jk2?

2002-06-10 Thread Douglas, Rory

Hi there
 
I'm attempting to get TC 4.1.3 to work with Apache 2.0.36 using mod_jk2 (on
win2k).
 
It seems the config format for httpd.conf has changed: Apache now complains
about JkWorkersFile etc.  A little searching unearthed people using JkSet
 and including a lot of stuff that used to be in workers.properties
directly in httpd.conf.
 
Is this the way to configure mod_jk2? If so, where are the directives
documented?
 
I have attempted to use some fragments I found on a tomcat-dev mailing list
archive eg.
 
JkSet worker.ajp13.type ajp13
JkSet worker.ajp13.channel socket
JkSet worker.ajp13.port 8009
 
However, Apache complains with  unrecognised option worker.ajp13.type
ajp13 etc.
 
Can anyone shed some light on this? If I am wasting my time trying to get
this to work on Windows, having that pointed out would also be most
appreciated ;-)
 
cheers
Rory



RE: Active Directory

2002-06-06 Thread Douglas, Rory

You should have a look at how your specific AD setup using ADSIEdit, it
comes with Win2K Support Tools.

Generally though, it will be something like:

Base/Root DN is: dc=mycompany,dc=com

below that there will be a Container (cn) called Users. You can place/lookup
users in there. Note that your company might also create Organizational
Units (ou) under the root DN. Users can then also be placed under there.

One way to look up Users is to search from the Root DN, using a search
filter like (objectClass=User) and a sub-tree scope SearchControls.

-Original Message-
From: Chris Shen [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 06, 2002 3:17 AM
To: Tomcat Users List
Subject: Active Directory


i know this is kind of off the topic, but i am trying to write to an Active
Directory using jndi in jsp. However, i have no idea how the active
directory schema works. i am just trying to look up users. does anyone have
any idea on things such as what the base DN should be, objectClass, and so
on? thanks!

Chris



RE: auto deploy seems to fail on 4.0.2/win98 and 4.0.1/linux

2002-06-04 Thread Douglas, Rory

tomcat will only auto deploy war's at startup and then only if a directory
with the same name as the war file does not already exist in your webapps
directory. If you want to update a running web-app, you need to specify a
context element for it in conf\server.xml and specify the 'reloadable'
attribute as true. You can then manually copy updated web app files into
the existing webapp dir and Tomcat will reload the app.

-Original Message-
From: Ray Tayek [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 04, 2002 5:29 AM
To: [EMAIL PROTECTED]
Subject: auto deploy seems to fail on 4.0.2/win98 and 4.0.1/linux


hi, using tomcat 4.0.2 on win98 and 4.0.1 on slak 8.0. trying to work 
through the examples in Java Tools for Extreme Programming: Mastering Open 
Source Tools: Including Ant, JUnit, and Cactus by Richard Hightower, 
Nicholas Lesiecki.

all is well until i copy the hello.wat file to tomat/webapps (while it is 
running). i can not get at the servlet from a browser. stopping and 
restarting does not help. the hello.war is not unjared.

anybody got a clue?

thanks

---
ray tayek http://home.attbi.com/~rtayek/ actively seeking telecommuting work
vice chair orange county java users group http://www.ocjug.org/ 
mailto:[EMAIL PROTECTED]
hate spam? http://samspade.org/ssw/


--
To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
mailto:[EMAIL PROTECTED]



RE: server.xml

2002-06-03 Thread Douglas, Rory

Have a look in the Tomcat documentation, the listeners tags are documented
there (under Administrators - Config.Ref/Connectors - AJP)

-Original Message-
From: Ron [mailto:[EMAIL PROTECTED]]
Sent: Sunday, May 05, 2002 1:05 PM
To: Tomcat Users List
Subject: server.xml


Can someone send a complete server.xml with just the bits for mod_jk using
apache and virtual host. Since I've noticed you need to add some listener
tags for ApacheConfig which isnt documented in the server.xml.

thanks




--
To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
mailto:[EMAIL PROTECTED]



RE: Applet-servlet communication problem with Tomcat 4.0.3

2002-05-13 Thread Douglas, Rory

This looks like something to do with your CATALINA_HOME directory. I had
problems installing to Program Files/Apache Tomcat, because of the space in
Program Files. You could try moving/re-installing your tomcat to somewhere
else without spaces in the pathname - like c:\dev\tomcat4.0.3 or something.


-Original Message-
From: KAKARONTZAS GEORGE [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 13, 2002 7:27 AM
To: [EMAIL PROTECTED]
Subject: Applet-servlet communication problem with Tomcat 4.0.3


I'm having an Applet oppening a URLConnection with a servlet and sending
an object.
Here's the Applet side of the communication:
 
//This is the method initiating the connection
public void available(SellOrder o) throws Exception
{
URL servlet = new URL(http, localhost, 8080,
/servlet/AvailableServlet);
Serializable objs[] = { o };
ObjectInputStream in = ServletWriter.postObjects(servlet,
objs);
String status = (String) in.readObject();
in.close();
}

public class ServletWriter {
 
static public ObjectInputStream postObjects(URL servlet,
Serializable objs[]) throws Exception
{
URLConnection con = servlet.openConnection();
con.setDoInput(true);
con.setDoOutput(true);
con.setDefaultUseCaches(false);
con.setUseCaches(false);
con.setRequestProperty(Content-Type,
application/x-www-form-urlencoded);
 
// Write the arguments as post data
ObjectOutputStream out = new
ObjectOutputStream(con.getOutputStream());
int numObjects = objs.length;
for (int x = 0; x  numObjects; x++) {
out.writeObject(objs[x]);
}
 
out.flush();
out.close();
 
return new ObjectInputStream(
con.getInputStream() );
}
 
}
 
On the server side of the communication I have the AvailableServlet with
the following code:
 
public class AvailableServlet extends HostServlet {
 
public void doPost(HttpServletRequest req,
HttpServletResponse res)
throws ServletException, IOException
{
System.out.println(Available is called.);
ObjectInputStream in=
new
ObjectInputStream(req.getInputStream());
ObjectOutputStream out=
new
ObjectOutputStream(res.getOutputStream());
try {
 //read the host order
 SellOrder o = (SellOrder)
in.readObject();
 _server.available(o);
out.writeObject(OK);
in.close();
out.close();
}

catch (Exception ex) {
System.out.println(ex.getMessage());
}

}   
}
 
This communication works fine when running with Tomcat 3.2.1 (Windows XP
Pro - standalone). But it throws the following exception on the server
when running on Tomcat 4.0.3 (same platform standalone or service):

Available is called.
RemoteException occurred in server thread; nested exception is:
java.rmi.UnmarshalException: error unmarshalling arguments;
nested excep
tion is:
java.net.MalformedURLException: no protocol: Files/Apache

As you can see from the output the doPost() method is called.  The
exception is thrown when the doPost() method executes the readObject()
method on the stream.
 
Any help would be greately appreciated.
Thanks
-George
 



RE: servlet works good the first time, but not the second time.??!!!??

2002-05-07 Thread Douglas, Rory

you could also try setting the HTTP Expires header to something definitely
in the past, like 1/1/1980

something like response.setHeader(Expires,1/1/1980);


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 07, 2002 8:13 AM
To: [EMAIL PROTECTED]
Subject: servlet works good the first time, but not the second
time.??!!!??


Hi,
Tomcat runs good when I launch a servlet for the first time. But when I
launch this servlet for the second time, Tomcat print the result of the
first ( in fact Tomcat runs the prior result page saved in IE).
Thanks
Jc


--
To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
mailto:[EMAIL PROTECTED]



Custom Exception pages in tomcat 4.0.4b2

2002-05-03 Thread Douglas, Rory

Hi there

4.0.4b2 appears to be a little erratic in serving up custom error pages that
are specified in web.xml. For instance I specify a page Failure.jsp to catch
java.lang.Exception as such

error-page
  exception-typejava.lang.Exception/exception-type
  location/Failure.jsp/location
/error-page

I then throw a RuntimeException in one of my Struts action classes.
Sometimes it works and I get Failure.jsp. Sometimes I just get the default
Apache Tomcat/4.0.4-b2 - HTTP Status 500 message.

I'm using jdk1.4.0 on a Win2K Server. Anyone know what I'm doing wrong (if
anything)??

cheers

Rory Douglas
Sun Chemical Corporation
(201) 224-4600 x178
[EMAIL PROTECTED]



RE: Web Service Deployment

2002-04-26 Thread Douglas, Rory

${jwsdp.home} is the ant format for a property pointing to the installation
directory
of the Web Services Developer pack.

check your ant file for a line like this:

property name=jwsdp.homevalue=c:\dev\jwsdp-1_0-ea2/

obviously, replace c:\dev\jwsdp-1_0-ea2 with the path to your Web Services
Dev Pack install directory.

hope that helps


-Original Message-
From: Amit Kaushik [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 26, 2002 2:02 PM
To: tomcat
Subject: Web Service Deployment


Hi All,

Facing problem regarding the Environment variables. Couldn't understand the
meaning of ${jwsdp.home}, that's why it's giving me the following error when
i am trying to deploy a web service.


ant build
Buildfile: build.xml

init:

prepare:

build:
[javac] Compiling 1 source file to
/opt/jwsdp-1_0-ea2/docs/tutorial/examples/gs/${jwsdp.home}/docs/tutorial/exa
mples/gs/build/WEB-INF/classes

BUILD FAILED

/opt/jwsdp-1_0-ea2/docs/tutorial/examples/gs/build.xml:57:
/opt/jwsdp-1_0-ea2/docs/tutorial/examples/gs/${jwsdp.home}/common/lib not
found.


Ant help will be appretiated.

thanks  regards,
Amit Kaushik



--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]



RE: TLD crashing in Tomcat

2002-04-25 Thread Douglas, Rory

You might try changing the DTD referenced in your web.xml as well ( ie
change/check that is 2.3 not 2.2)?? Otherwise move to 4.0.4b2. I've been
using that for a while now, and I haven't had any weird tag library issues.
It also fixes a bug in 4.0.3 that makes my app hang on certain redirects
through a gateway!

-Original Message-
From: Javier Urbaneja Fan [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 25, 2002 10:54 AM
To: Tomcat Users List
Subject: TLD crashing in Tomcat


I´m using Tomcat 4.0.3
I have written a tag library descriptor that fit the current Sun's DTD
(web-jsptaglibrary_1_2.dtd), with the names of the elements according with
the XML recomendation (i.e., tlib-version), it originates the next Parse
Error when starting Tomcat:

org.xml.sax.SAXParseException: Element type tlib-version must be declared

However, if I write the TLD according to the previous version
(web-jsptaglibrary_1_1.dtd, tlibversion instead o tlib-version) that doesn't
validate against the DTD, it works perfectly.

I´ve seen that in the Tomcat's servlet.jar there are both DTDs.
Where I can configure which one I want Tomcat to work with?



Compiling mod_jk on Win2K, anyone?

2002-04-25 Thread Douglas, Rory

Hello
 
It seems some people are having success getting mod_jk2 compiled on Linux
platforms. Is this the only way?
 
Compiling the java side of the connector is, of course, painless and works
like a charm. The native side appears to be somewhat confusing. I have
downloaded Cygwin which gave me some of the missing include files, however,
now the compiler wants sys/socketvar.h which doesn't exist in either
VC++'s or Cygwin's include directories.
 
Any ideas would be welcome
Rory Douglas
Sun Chemical Corporation
(201) 224-4600 x178
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] 
 



RE: Install Tomcat 4.0 + JDK 1.4.

2002-04-24 Thread Douglas, Rory

I had similar errors when moving from Tomcat 3 to 4. It may have to do with
the declaration of the DTD at the top of your .tld. I found that I had to
change it to 1.2, and change all tags in the taglib descriptor to their new
form

ie tagclass becomes tag-class

maybe that helps

-Original Message-
From: Kroeksak Kongman [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 24, 2002 3:32 AM
To: [EMAIL PROTECTED]
Subject: Install Tomcat 4.0 + JDK 1.4.


Dear All,
 
  1. I'm install Tomcat 4.0 + JDK 1.4. I can run some jsp file
but XML have some error..
 
(.tld and jsp file, it can run in old version ...Tomcat 3.2.3  JDK 1.3.2)
 
  2. I can use javac to complie .java ot .class when I call
HelloWorld.calss from IE 6.0, 
it open window File Download ...for save this file to disk...it not work..
 
Please would you hep me for solve this problem..
 
Best Regards,
Kroeksak Kongman
 
(This can run in old version ...Tomcat 3.2.3  JDK 1.3.2)
Result:
 
 
org.apache.jasper.JasperException: XML parsing error on file
/WEB-INF/jsp/taglib.tld: (line 2, col 7): The XML declaration may only
appear at the very beginning of the document.
at
org.apache.jasper.parser.ParserUtils.parseXMLDocument(ParserUtils.java:218)
at
org.apache.jasper.compiler.TagLibraryInfoImpl.parseTLD(TagLibraryInfoImpl.ja
va:283)
at
org.apache.jasper.compiler.TagLibraryInfoImpl.(TagLibraryInfoImpl.java:219)



RE: FileReader within a Servlet

2002-04-24 Thread Douglas, Rory

use the getRealPath(pathname relative to web-app) method of the
ServletContext and use that in your File constructor

-Original Message-
From: Günter Kukies [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 24, 2002 9:38 AM
To: Tomcat Users List
Subject: FileReader within a Servlet


Hello,

how can I get the path base for a file within a web application? I want to
use a FileReader within a Servlet. 

Günter

 



RE: Apache-Tomcat on different machines

2002-04-24 Thread Douglas, Rory

As I understand it, you need to specify the server name and port of your
Tomcat server in the worker.properties file (for mod_jk). The location of
worker.properties is specified in httpd.conf for Apache.

eg.  -worker.properties-

worker.ajp13.port=8009
worker.ajp13.host=bob.somewhere.com

for mod_webapp, you need to change httpd.conf as such

WebAppConnection your connector name warp bob.somewhere.com:port
number

-Original Message-
From: Adam Myatt [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 24, 2002 1:26 PM
To: [EMAIL PROTECTED]
Subject: Apache-Tomcat on different machines


Hi,

Quick question - I checked the DOCS and Archive, but to no avail. I'm
looking to run Apache on 1 machine and Tomcat on another machine. Any quick
hints as to which config files I would need to modify? Thanks.

 - Adam


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]



Compiling mod_jk for Apache 2.0.35 on Win2K

2002-04-24 Thread Douglas, Rory

I'm trying to compile mod_jk on Win2k Server, using the source from the
Tomcat 4.0.4b2 connectors download. The Ant build failed initially when it
couldn't find windows.h, but running vcvars32.bat fixed that.

Now, it fails because it can't find unistd.h, which a hard drive search
revealed doesn't exist in my VC++ directory at all. I was under the
impression unistd.h is a very common include file (on Unix at any rate).
Anyone else have the same experience?

Rory Douglas
Sun Chemical Corporation
(201) 224-4600 x178
[EMAIL PROTECTED]



RE: Which Apache-To-Tomcat Connector

2002-04-24 Thread Douglas, Rory


Has anyone had success compiling the native jk connectors from
jakarta-tomcat-connectors-4.0.4b2-src on a Win2K machine?

-Original Message-
From: Simon Stewart [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 24, 2002 8:58 AM
To: Tomcat Users List
Subject: Re: Which Apache-To-Tomcat Connector


On Wed, Apr 24, 2002 at 08:31:44AM -0400, Anthony W. Marino wrote:
 On Wednesday 24 April 2002 08:23 am, Simon Stewart wrote:
  On Wed, Apr 24, 2002 at 08:04:17AM -0400, Anthony W. Marino wrote:
On Tue, Apr 23, 2002 at 07:02:38PM -0400, Anthony W. Marino wrote:
 
   Is warp in the coyote connectors the mod_webapp that should be used???
 
  Good question. The connector that makes use of it is mod_webapp, and
  this is part of the jakarta-tomcat-connectors project, if that helps?
  Getting a listing of the classes that are contained in the
  tomcat-*.jar files doesn't indicate anything called *warp*, but
  that could just be because it's the protocol name
 
 I'm confused because there is also a jakarta-tomcat-connectors drop as
 well.  Are you saying that I need both to facilitate both ends of the
 connector process?

If you take a look at the source download of the connectors, each of
them appear to come in two parts: a native section, which plugs into
apache (for example) and a java part which plugs into tomcat, so from
that I am assuming that you _do_ need to facilitate both ends of the
connector process.

I could be spouting utter rubbish, though :) Will one of the real pros
step forward, please...?

Cheers,

Simon

-- 
You stupid? All of Europe (maybe except those crazy Brits) prints on A4
paper.
Crazy we may be, but not foolscap.
-- James Kilfiger, ctt

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]



mod_jk.dll Apache 2 problem

2002-04-23 Thread Douglas, Rory

Hello

I'm trying to use mod_jk.dll with Apache 2.0.35 on W2K to set up
load-balancing of a few Tomat 4 servers. Problem is, I can't get Apache to
load mod_jk.dll.

I have copied mod_jk.dll into %Apache_home%\modules and included the
LoadModule directive in httpd.conf
Apache says: 

Cannot load C:/Development/Apache2/modules/mod_jk.dll into server: The
specified module could not be found.

I'm using the binary (.msi) install of Apache, is this a problem? Do I need
to get the source and re-compile with some specific options/directives set?

For that matter, is there any other way of load-balancing other than using
mod_jk?

thanks for any help

Rory Douglas
Sun Chemical Corporation
(201) 224-4600 x178
[EMAIL PROTECTED]