RE: Database connections aren't being released...

2005-10-07 Thread George Sexton
Really,

http://findbugs.sourceforge.net/

It analyzes source code and points out where resources are not freed.

Of course the real problem with Findbugs is everyone is too embarrassed to
say how well it worked

George Sexton
MH Software, Inc.
http://www.mhsoftware.com/
Voice: 303 438 9585
  

 -Original Message-
 From: Richard Road Runner [mailto:[EMAIL PROTECTED] 
 Sent: Friday, October 07, 2005 4:41 PM
 To: Darryl L. Miles; Tomcat Users List
 Subject: Re: Database connections aren't being released...
 
 Hmm..  Thank you for the reply.  Yes we are using DBCP.
 
 I discussed this with our team and we going to pursue this as 
 a possible 
 cause.
 
 Thanks again!!
 
 
 - Original Message - 
 From: Darryl L. Miles [EMAIL PROTECTED]
 To: Tomcat Users List tomcat-user@jakarta.apache.org
 Cc: [EMAIL PROTECTED]
 Sent: Thursday, October 06, 2005 10:29 PM
 Subject: Re: Database connections aren't being released...
 
 
  Richard Road Runner wrote:
 
 I am not sure that this is a Tomcat issue, but we are not sure what 
 exactly is causing our problem.
 
 We are running Tomcat 5.0.27.  We are using the most recent 
 jconn2.jar 
 driver to connect to a Sybase SQL Anywhere Studio 7 
 database via JDBC.
 
 Over a period of time, the number of connections to the 
 database continues 
 to increase far beyond the possible number of users.  The 
 only way to 
 close the connections is to restart the database server.
 
 
 
  Are you using DBCP ?
 
  I have an issue with 5.5.9 and DBCP shipped with it I found 
 2 weeks ago. 
  I would describe my problem as DBCP is not reusing 
 database connections 
  when it should but it instead creates a new one, until the 
 SQL server has 
  too many connections (or your DBCP hits upper parameter limits).
 
  With TC and MySQL I can confirm this by logging my database 
 handle close 
  and watching what happens with SHOW PROCESSLIST sql 
 command on the 
  server.   Each request needs 1 database connection and the 
 logging should 
  confirm it returns (releases) the connection back to DBCP 
 pool.  I have 
  followed this path with the debugger and got inside DBCP to 
 prove the 
  release takes place.
 
  I had put down the problem and just configured up my DBCP 
 parameters to 
  expire old connections as fast as possible and up the 
 maximum limits. 
  This wont work for me in production, maybe I switch to C3P0 
 connection 
  pooling at that time.
 
  Its just so difficult to help out and nail the problem with 
 TCs refactored 
  and repackaged DBCP, I would very much appreciate an SDK 
 version of the 
  full TC package that includes all source in the JARs.  I am 
 doing a CVS 
  build.xml now, but I think this will be for 5.5.12, I just 
 need to work 
  out how to fix the version for a 5.5.9 release and compare 
 the two trees 
  to maybe try and nail this one, or at least confirm the 
 blame here is with 
  DBCP.
 
  -- 
  Darryl L. Miles
 
  
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


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



RE: Database connections aren't being released...

2005-10-06 Thread George Sexton
As many people have pointed out, your app is probably not closing resources.
A tool that can help find these is:

http://findbugs.sourceforge.net/


George Sexton
MH Software, Inc.
http://www.mhsoftware.com/
Voice: 303 438 9585
  

 -Original Message-
 From: Richard Road Runner [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, October 05, 2005 6:01 PM
 To: Tomcat Users List
 Subject: Database connections aren't being released...
 
 I am not sure that this is a Tomcat issue, but we are not 
 sure what exactly is causing our problem.
 
 We are running Tomcat 5.0.27.  We are using the most recent 
 jconn2.jar driver to connect to a Sybase SQL Anywhere Studio 
 7 database via JDBC.
 
 Over a period of time, the number of connections to the 
 database continues to increase far beyond the possible number 
 of users.  The only way to close the connections is to 
 restart the database server.
 
 Again, we are not sure if we should be looking at Tomcat, the 
 JDBC driver, or Sybase to solve this problem.
 
 Any input would be helpful.
 
 Thanks
 
 
 
 


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



RE: Tracking Datasource Connection Usage?

2005-10-06 Thread George Sexton

http://findbugs.sourceforge.net/


Will tell you where in your code you are not freeing resources. 


George Sexton
MH Software, Inc.
http://www.mhsoftware.com/
Voice: 303 438 9585
  

 -Original Message-
 From: JWM [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, October 06, 2005 2:09 PM
 To: tomcat-user@jakarta.apache.org
 Subject: Tracking Datasource Connection Usage?
 
 I started getting exceptions saying no connections were 
 available on my JDBC
 datasource  (org.gjt.mm.mysql.Driver).  The pool was 
 definitely large enough
 to handle the load.  So it appears that I'm not freeing the all the
 connections as I should.  I noticed that I did not have the
 'removeAbandoned' flag set on the Resource tag.  Changing that has
 apparently fixed the out of connections problem.  But I 
 really want to clean
 up the code and fix it the right way.  I've got the close() 
 statements in
 place.  But obviously, I'm missing some of them somewhere.  
 Is there any
 process for logging/tracking allocating and freeing 
 connections (and absence
 thereof.), available connections, etc?  Or are there any 
 methods I can call
 to give me this type of debug info?  What's the recommended 
 way to debug
 this?
 
 Thanks.
 
 JWM
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


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



RE: Flexible way of defining application variables in text format?

2005-09-27 Thread George Sexton
I use a properties file stored in the WEB-INF directory. Modifying the
web.xml is too error prone. Using another XML file is a lot harder than a
properties file. Just use the servlet context getResourceAsStream(), and
pass that to the properties.load() method.

George Sexton
MH Software, Inc.
http://www.mhsoftware.com/
Voice: 303 438 9585
  

 -Original Message-
 From: Seak, Teng-Fong [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, September 27, 2005 2:37 AM
 To: Tomcat Users List
 Subject: Flexible way of defining application variables in 
 text format?
 
 My webapp needs some application string variables for 
 configuration.  For the moment, I hard-code them as class static 
 properties and compiled.  But I'd like to know if there's any 
 method to 
 define such variables in a text file, something like the 
 global.asa in 
 ASP where we could simply write something like this withing the 
 application_onstart subroutine:
 application(myvar) = my value
 
 I like them to be withing text file because if even 
 there's a need 
 to change config, I'd like to just launch a text editor, edit it and 
 start again!  I don't want to install Eclipse or other IDE in 
 deployment 
 server just in case we need to change some parameter and have 
 to compile 
 everything.  This is very inconvenient, non professional and stupid.  
 And the client would probably not appreciate this.
 
 OK, I know I could write a wrapper function to parse that 
 text file 
 and assign the correct values, but is there a simpler way?  Is the 
 answer lying in the web.xml file?  But its syntax seems quite 
 complicated that I've no idea what to begin.
 
 TIA
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


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



RE: Order of WebApp Loading

2005-09-15 Thread George Sexton
Its not deterministic. Save yourself a lot of time, and don't complain about
it and ask it to be changed. You need to re-think your logic so there is not
a dependency. A pretty obvious solution would be to have either application
check to see if the database is started, and if not start the database.

George Sexton
MH Software, Inc.
http://www.mhsoftware.com/
Voice: 303 438 9585
  

 -Original Message-
 From: Peter Menzel [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, September 15, 2005 10:53 AM
 To: Tomcat Users List
 Subject: Order of WebApp Loading
 
 Hi there,
 
 I have a question concerning Tomcats webapp loading:
 What is the order in which tomcats loads its webapps ?
 I have two webapps configured by 
 /conf/Catalina/localhost/XXX.xml and I 
 need one webapp to be loaded before the other, because it starts the 
 database.
 How does Tomcat choose the first, second, ...
 And what is the loading sequence, if both are deployed as a .war ?
 
 Kind regards, Peter Menzel
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


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



RE: The process tomcat {pid 1488.0000 } is leaking handles

2005-09-13 Thread George Sexton
I have a web application that I host for our customers. Right now we are
running about 60 virtual hosts with tens of thousands of hits per day. I've
also run stress tests using Jmeter where literally millions of requests are
generated. I have never observed a resource leak.

This is a common topic in the forum. In almost every instance, it is the
application that is leaking resources. 

Developers should run findbugs:

http://findbugs.sourceforge.net/

And PMD

http://pmd.sourceforge.net

To scan their applications for resource leaks.

George Sexton
MH Software, Inc.
http://www.mhsoftware.com/
Voice: 303 438 9585
  

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, September 13, 2005 3:37 AM
 To: tomcat-user@jakarta.apache.org
 Subject: The process tomcat {pid 1488. } is leaking handles
 
 We have a server running Peregrine Get Answers which use 
 TOMCAT as part of
 its installation
 
 We are seeing (via task manager) a slow build up of handles 
 for the tomcat
 app..
 
 Has anyone come across this before?
 
 This e-mail and any attachments are confidential and intended solely 
 for the addressee and may also be privileged or exempt from 
 disclosure 
 under applicable law. If you are not the addressee, or have received 
 this e-mail in error, please notify the sender immediately, delete it 
 from your system and do not copy, disclose or otherwise act upon any 
 part of this e-mail or its attachments..
 
 Internet communications are not guaranteed to be secure or 
 virus-free. 
 The Barclays Group does not accept responsibility for any 
 loss arising 
 from unauthorised access to, or interference with, any Internet 
 communications by any third party, or from the transmission of any 
 viruses. Replies to this e-mail may be monitored by the Barclays 
 Group for operational or business reasons..
 
 Any opinion or other information in this e-mail or its attachments 
 that does not relate to the business of the Barclays Group is 
 personal 
 to the sender and is not given or endorsed by the Barclays Group.
 
 Barclays Bank PLC.Registered in England and Wales (registered 
 no. 1026167).
 Registered Office: 1 Churchill Place, London, E14 5HP, United Kingdom.
 
 Barclays Bank PLC is authorised and regulated by the 
 Financial Services Authority.
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


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



RE: Context in separate file doesn't work

2005-09-02 Thread George Sexton
The context name and the file name have to match exactly.

Also, root contexts need to have a path of . 

George Sexton
MH Software, Inc.
http://www.mhsoftware.com/
Voice: 303 438 9585
  

 -Original Message-
 From: Trond Hersløv [mailto:[EMAIL PROTECTED] 
 Sent: Friday, September 02, 2005 4:50 AM
 To: Tomcat Users List
 Subject: Context in separate file doesn't work
 
 Hi tomcat fellas!
 http://venus:8080 gives me the index.html in the folder 
 /home/trond/GTG/inside, but only when I use the server.xml below.
 When I take the Context. / and put it in a separate 
 file, ${CATALINA_HOME}/conf/Catalina/venus/test.xml it doesnt 
 work anymore.
 Does anybody know why? Do I have to set any attributes like 
 autoDeploy=false in the Host tag or what am I missing here?
 
 Thanks in advance.
 
 \trond
 
 
 * server.xml 
 
 Server port=8005 shutdown=SHUTDOWN
 
   GlobalNamingResources
 !-- Used by Manager webapp --
 Resource name=UserDatabase auth=Container
   type=org.apache.catalina.UserDatabase
description=User database that can be updated and saved

 factory=org.apache.catalina.users.MemoryUserDatabaseFactory
   pathname=conf/tomcat-users.xml /
   /GlobalNamingResources
 
   Service name=Catalina
 Connector port=8080 /
 
 !-- This is here for compatibility only, not required --
 Connector port=8009 protocol=AJP/1.3 /
 
 Engine name=Catalina defaultHost=localhost
   Realm className=org.apache.catalina.realm.UserDatabaseRealm
  resourceName=UserDatabase /
   Host name=localhost appBase=/home/trond/GTG/outside /
   Host name=venus appBase=/home/trond/GTG/inside 
 Context docBase=/home/trond/GTG/inside path=/ /
   /Host
 /Engine
 
   /Service
 /Server
 **
 
 
 
 **
 This email message has been swept by
 MIMEsweeper for the presence of computer viruses.
 **
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


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



RE: Context in separate file doesn't work

2005-09-02 Thread George Sexton
One other thing, for a ROOT context, the file should be named ROOT.xml

George Sexton
MH Software, Inc.
http://www.mhsoftware.com/
Voice: 303 438 9585
  

 -Original Message-
 From: Trond Hersløv [mailto:[EMAIL PROTECTED] 
 Sent: Friday, September 02, 2005 4:50 AM
 To: Tomcat Users List
 Subject: Context in separate file doesn't work
 
 Hi tomcat fellas!
 http://venus:8080 gives me the index.html in the folder 
 /home/trond/GTG/inside, but only when I use the server.xml below.
 When I take the Context. / and put it in a separate 
 file, ${CATALINA_HOME}/conf/Catalina/venus/test.xml it doesnt 
 work anymore.
 Does anybody know why? Do I have to set any attributes like 
 autoDeploy=false in the Host tag or what am I missing here?
 
 Thanks in advance.
 
 \trond
 
 
 * server.xml 
 
 Server port=8005 shutdown=SHUTDOWN
 
   GlobalNamingResources
 !-- Used by Manager webapp --
 Resource name=UserDatabase auth=Container
   type=org.apache.catalina.UserDatabase
description=User database that can be updated and saved

 factory=org.apache.catalina.users.MemoryUserDatabaseFactory
   pathname=conf/tomcat-users.xml /
   /GlobalNamingResources
 
   Service name=Catalina
 Connector port=8080 /
 
 !-- This is here for compatibility only, not required --
 Connector port=8009 protocol=AJP/1.3 /
 
 Engine name=Catalina defaultHost=localhost
   Realm className=org.apache.catalina.realm.UserDatabaseRealm
  resourceName=UserDatabase /
   Host name=localhost appBase=/home/trond/GTG/outside /
   Host name=venus appBase=/home/trond/GTG/inside 
 Context docBase=/home/trond/GTG/inside path=/ /
   /Host
 /Engine
 
   /Service
 /Server
 **
 
 
 
 **
 This email message has been swept by
 MIMEsweeper for the presence of computer viruses.
 **
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


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



RE: Running Tomcat 5.0.28 in server mode

2005-09-02 Thread George Sexton
What does really slow mean? That's a subjective assessment, not a
quantititative value. How many requests per second?

George Sexton
MH Software, Inc.
http://www.mhsoftware.com/
Voice: 303 438 9585
  

 -Original Message-
 From: Zaki, Karim R UTCHQ [mailto:[EMAIL PROTECTED] 
 Sent: Friday, September 02, 2005 8:46 AM
 To: Tomcat User Group
 Subject: Running Tomcat 5.0.28 in server mode
 
 Dear all,
 
 I'm running Tomcat 5.0.28 in conjunction with Vignette. JSPs use the
 Vignette APIs (provided as JARs). Everything works, but performance is
 really slow. The server that's hosting this is a quad 
 processor (@2GHz each)
 Windows 2000 Server with 2GB of memory and a gigabit NIC...so 
 I don't see
 hardware as being an issue.
 
 One thing I'm trying to do is run Tomcat in server mode. My 
 understanding is
 that this should enhance performance. However, adding 
 -server to Tomcat's
 Java Options box causes Tomcat to not start. What am I doing wrong?
 
 Also, if anyone can provide performance tuning 
 recommendations, please do.
 
 Thanks all..
 
 Karim
 
 
 I didn't do it! ~ Bart Simpson
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


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



RE: Running Tomcat 5.0.28 in server mode

2005-09-02 Thread George Sexton
A good tool for load testing is JMeter

http://jakarta.apache.org/jmeter/index.html


Here's a link to some testing we did with it for our product:

http://www.mhsoftware.com/caldemo/manual/en/pageFinder.html?page=622.htm

Basically, we go something like 1400 requests per minute on a uni-processor
P4.

George Sexton
MH Software, Inc.
http://www.mhsoftware.com/
Voice: 303 438 9585
  

 -Original Message-
 From: Zaki, Karim R UTCHQ [mailto:[EMAIL PROTECTED] 
 Sent: Friday, September 02, 2005 11:02 AM
 To: Tomcat Users List
 Subject: RE: Running Tomcat 5.0.28 in server mode
 
 Well, I don't know how to measure the number of requests per 
 second. If you
 can provide help with that, that would be great. What I'm 
 doing is testing
 with a template provided by Vignette (I don't know if I can 
 send attachments
 on this list). It takes 2 seconds to load! This really 
 doesn't do any real
 work...so when the code starts to do something useful, we go 
 into over a
 minute of load time per page.
 
 -Original Message-
 From: George Sexton [mailto:[EMAIL PROTECTED] 
 Sent: Friday, September 02, 2005 12:15 PM
 To: 'Tomcat Users List'
 Subject: RE: Running Tomcat 5.0.28 in server mode
 
 What does really slow mean? That's a subjective assessment, not a
 quantititative value. How many requests per second?
 
 George Sexton
 MH Software, Inc.
 http://www.mhsoftware.com/
 Voice: 303 438 9585
   
 
  -Original Message-
  From: Zaki, Karim R UTCHQ [mailto:[EMAIL PROTECTED] 
  Sent: Friday, September 02, 2005 8:46 AM
  To: Tomcat User Group
  Subject: Running Tomcat 5.0.28 in server mode
  
  Dear all,
  
  I'm running Tomcat 5.0.28 in conjunction with Vignette. JSPs use the
  Vignette APIs (provided as JARs). Everything works, but 
 performance is
  really slow. The server that's hosting this is a quad 
  processor (@2GHz each)
  Windows 2000 Server with 2GB of memory and a gigabit NIC...so 
  I don't see
  hardware as being an issue.
  
  One thing I'm trying to do is run Tomcat in server mode. My 
  understanding is
  that this should enhance performance. However, adding 
  -server to Tomcat's
  Java Options box causes Tomcat to not start. What am I 
 doing wrong?
  
  Also, if anyone can provide performance tuning 
  recommendations, please do.
  
  Thanks all..
  
  Karim
  
  
  I didn't do it! ~ Bart Simpson
  
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 


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



RE: Context in separate file doesn't work

2005-09-02 Thread George Sexton
I'd like to claim superior knowledge and intellect, but really I just did
this one myself a few weeks ago.

George Sexton
MH Software, Inc.
http://www.mhsoftware.com/
Voice: 303 438 9585
  

 -Original Message-
 From: Trond Hersløv [mailto:[EMAIL PROTECTED] 
 Sent: Friday, September 02, 2005 12:02 PM
 To: Tomcat Users List
 Subject: RE: Context in separate file doesn't work
 
 Hi George,
 
 Thank you very much, you made my day!!
 I thought I could name the .xml files whatever I like to, but 
 that was a huge mistake that costed me 2 days.
 Naming the file ROOT.xml solved the problem. Can't remember 
 having read that anywhere in the doc's. 
 Don't know if it's just a bad style, but path= and path=/ 
 seems both to work well. But I'll listen to you and use an 
 empty string.
 
 
 Once again, thank you very much and have a nice weekend
 
 
 -Original Message-
 From: George Sexton [mailto:[EMAIL PROTECTED] 
 Sent: Friday, September 02, 2005 18:13
 To: 'Tomcat Users List'
 Subject: RE: Context in separate file doesn't work
 
 One other thing, for a ROOT context, the file should be named ROOT.xml
 
 George Sexton
 MH Software, Inc.
 http://www.mhsoftware.com/
 Voice: 303 438 9585
   
 
  -Original Message-
  From: Trond Hersløv [mailto:[EMAIL PROTECTED]
  Sent: Friday, September 02, 2005 4:50 AM
  To: Tomcat Users List
  Subject: Context in separate file doesn't work
  
  Hi tomcat fellas!
  http://venus:8080 gives me the index.html in the folder 
  /home/trond/GTG/inside, but only when I use the server.xml below.
  When I take the Context. / and put it in a separate file, 
  ${CATALINA_HOME}/conf/Catalina/venus/test.xml it doesnt 
 work anymore.
  Does anybody know why? Do I have to set any attributes like 
  autoDeploy=false in the Host tag or what am I missing here?
  
  Thanks in advance.
  
  \trond
  
  
  * server.xml
  
  Server port=8005 shutdown=SHUTDOWN
  
GlobalNamingResources
  !-- Used by Manager webapp --
  Resource name=UserDatabase auth=Container
type=org.apache.catalina.UserDatabase
 description=User database that can be updated and saved
 
  factory=org.apache.catalina.users.MemoryUserDatabaseFactory
pathname=conf/tomcat-users.xml /
/GlobalNamingResources
  
Service name=Catalina
  Connector port=8080 /
  
  !-- This is here for compatibility only, not required --
  Connector port=8009 protocol=AJP/1.3 /
  
  Engine name=Catalina defaultHost=localhost
Realm className=org.apache.catalina.realm.UserDatabaseRealm
   resourceName=UserDatabase /
Host name=localhost appBase=/home/trond/GTG/outside /
Host name=venus appBase=/home/trond/GTG/inside 
  Context docBase=/home/trond/GTG/inside path=/ /
/Host
  /Engine
  
/Service
  /Server
  **
  
  
  
  
 **
  This email message has been swept by
  MIMEsweeper for the presence of computer viruses.
  
 **
  
  
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


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



Re: WebDav on Port 80

2005-08-22 Thread George Francis
Hi,
That bug report does not seem to relate to my issue; there is no
mention of different behavior depending on what port Tomcat is running
on...

On 8/22/05, Marius Hanganu [EMAIL PROTECTED] wrote:
 The problem can be reproduced. There is already a bug describing this
 issue:
 
 http://issues.apache.org/bugzilla/show_bug.cgi?id=26449
 
 Regards,
 Marius
 
 -Original Message-
 From: George Francis [mailto:[EMAIL PROTECTED]
 Sent: Sunday, August 21, 2005 7:07 PM
 To: tomcat-user@jakarta.apache.org
 Subject: WebDav on Port 80
 
 Hello,
 If I downloaded the latest Tomcat 5.0 or 5.5, WebDav works 'straight out
 of the box' by starting the server and opening 'localhost:8080/webdav'
 as a web folder.
 Great!
 If I then go in to server.xml and change the port to 80; the WebDav
 functionality is lost - I get a message from IE saying Cannot open
 'localhost:80/webdav' as a web folder - would you like to see it's
 default view instead.
 Can anyone else reproduce this?  Are you all able to run webdav on port
 80 without issues?  Is there any trick Im missing?
 Any help greatly appreciated!.
 G
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


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



Re: WebDav on Port 80

2005-08-22 Thread George Francis
Thanks - thats exactly my experience also;  Does anyone here know why
port 80 doesnt work?

On 8/22/05, Marius Hanganu [EMAIL PROTECTED] wrote:
 I am using IE 6.0, XP, tomcat 5.5.9, and when clicking
 File-Open-http://localhost/webdav/ and marking Open as web folder
 checkbox, the response I receive is:
 
 \\localhost\webdav is not accessible. You might not have
 permissions to use this network resource. Contact administrator...
 
 The network path was not found.
 
 I also added index.html to the welcome file list.
 
 Note: on any other port than 80 it works properly.
 
 Marius
 
 -Original Message-
 From: George Francis [mailto:[EMAIL PROTECTED]
 Sent: Monday, August 22, 2005 4:45 PM
 To: Tomcat Users List
 Subject: Re: WebDav on Port 80
 
 Hi,
 That bug report does not seem to relate to my issue; there is no mention
 of different behavior depending on what port Tomcat is running on...
 
 On 8/22/05, Marius Hanganu [EMAIL PROTECTED] wrote:
  The problem can be reproduced. There is already a bug describing this
  issue:
 
  http://issues.apache.org/bugzilla/show_bug.cgi?id=26449
 
  Regards,
  Marius
 
  -Original Message-
  From: George Francis [mailto:[EMAIL PROTECTED]
  Sent: Sunday, August 21, 2005 7:07 PM
  To: tomcat-user@jakarta.apache.org
  Subject: WebDav on Port 80
 
  Hello,
  If I downloaded the latest Tomcat 5.0 or 5.5, WebDav works 'straight
  out of the box' by starting the server and opening
 'localhost:8080/webdav'
  as a web folder.
  Great!
  If I then go in to server.xml and change the port to 80; the WebDav
  functionality is lost - I get a message from IE saying Cannot open
  'localhost:80/webdav' as a web folder - would you like to see it's
  default view instead.
  Can anyone else reproduce this?  Are you all able to run webdav on
  port 80 without issues?  Is there any trick Im missing?
  Any help greatly appreciated!.
  G
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


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



WebDav on Port 80

2005-08-21 Thread George Francis
Hello,
If I downloaded the latest Tomcat 5.0 or 5.5, WebDav works 'straight
out of the box' by starting the server and opening
'localhost:8080/webdav' as a web folder.
Great!
If I then go in to server.xml and change the port to 80; the WebDav
functionality is lost - I get a message from IE saying Cannot open
'localhost:80/webdav' as a web folder - would you like to see it's
default view instead.
Can anyone else reproduce this?  Are you all able to run webdav on
port 80 without issues?  Is there any trick Im missing?
Any help greatly appreciated!.
G

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



Re: Advice for Hosting Many Individual Webapps?

2005-08-18 Thread George L. Sexton
The net effect is that users have to re-login, but there is no down time. They 
get bounced, but can immediately log back in.

Right now, startup time for my hosted machine is running in the area of 5 
minutes. So, I'm eliminating a 5 minute startup cycle.

I'm running 60 virtual hosts on one machine (P3 600). I'll be moving to a P4 
3.0GHz this weekend, but I hope to get up to 200 virtual hosts per machine.

Any way you cut it, startup time is a killer. 

On Thursday 18 August 2005 08:54, Brian Cook wrote:

 I think I missed something here.  Are you not still bouncing Tomcat
 here?  If so isnt the service still going down?  What is the benifit of
 changign the ports around?  I have a feeling I missed something in the
 expliation.

 George Sexton wrote:
  The technique I use is this:

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



Re: Advice for Hosting Many Individual Webapps?

2005-08-18 Thread George L. Sexton
To re-start tomcat, I start a second instance running on a different port and 
after the second instance is running, change the port forwarding to activate 
it.

 If so is there an advantage to doing that over clustering?

It's a simple configuration that only requires one machine.

As nice as clustering sounds, it's not as useful as people think. Two areas 
where clustering won't work:

Application upgrade that requires database structure change.

Application upgrade that mades the serialized version of the properties 
incompatible from one version to the next.

Another problem for me with clustering is that it seems to require an external 
director that would balance the requests across the host. If this is mod_jk 
and Apache, that's pretty ungainly if you are running a hosting operation 
with 200 virtual hosts.

If it's an external load balance, that's a third piece of hardware.

On Thursday 18 August 2005 10:15, Brian Cook wrote:
 Sorry still not following.  If Tomcat is being restarted how do you not
 have start up time?  Is it that you have two instances of Tocmat and you
 are having the firewall just point to one instance while you bounce the
 second?

 If so is there an advantage to doing that over clustering?

 George L. Sexton wrote:
  The net effect is that users have to re-login, but there is no down time.
  They get bounced, but can immediately log back in.
 
  Right now, startup time for my hosted machine is running in the area of 5
  minutes. So, I'm eliminating a 5 minute startup cycle.
 
  I'm running 60 virtual hosts on one machine (P3 600). I'll be moving to a
  P4 3.0GHz this weekend, but I hope to get up to 200 virtual hosts per
  machine.
 
  Any way you cut it, startup time is a killer.
 
  On Thursday 18 August 2005 08:54, Brian Cook wrote:
 I think I missed something here.  Are you not still bouncing Tomcat
 here?  If so isnt the service still going down?  What is the benifit of
 changign the ports around?  I have a feeling I missed something in the
 expliation.
 
 George Sexton wrote:
 The technique I use is this:
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]

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



RE: Advice for Hosting Many Individual Webapps?

2005-08-16 Thread George Sexton
The technique I use is this:

Run the HTTP connector on port 8080.

Forward port 80 to port 8080.

To re-start the system:

edit the server.xml and run the HTTP connector on port 7080
Change the shutdown port to 8006

Start tomcat, and wait till it comes up.

Re-run the firewall script to forward port 80 to port 7080.

Stop the instance running on port 7080.

The downside is that any active sessions get bounced and have to re-login.

George Sexton
MH Software, Inc.
http://www.mhsoftware.com/
Voice: 303 438 9585
  

 -Original Message-
 From: Seth Ladd [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, August 16, 2005 3:12 PM
 To: Tomcat Users List
 Subject: Advice for Hosting Many Individual Webapps?
 
 Hello,
 
 We are finding outselves hosting more and more individual 
 webapps, all 
 running on Tomcat 5.5.9 w/ JDK 1.5.  Each of these webapps is 
 developed 
 and deployed on a separate schedule, and the number and 
 frequency of app 
 deployments is increasing.
 
 The frequency is so much that the uptime of all of our 
 applications is 
 affected as we continually take down Tomcat servers in production to 
 deploy a new application (or new version of the application). 
  Because 
 hot deploy does not work (the old favorite OOM error w/ too many 
 redeploys), we bounce the Tomcat server for every redeploy.
 
 To avoid taking down all of our applications when we need to 
 redeploy a 
 single app, we've begun to deploy each application to their 
 own Tomcat 
 instance.  All of these instances are fronted by a single 
 Apache server 
 handling vhosts, logging, etc.
 
 We're just curious how common this setup really is.  We know 
 we are in 
 an uncommon position, with so many webapps (approaching 20, 
 and growing 
 very fast).  We don't want to put all our eggs in one basket, so to 
 speak, so we've begun to split out individual tomcat instances.
 
 Anyone else have to handle numerous webapps, with frequent 
 deploys, and 
 have to keep uptime for all apps as high as possible?  We hesitate to 
 put all webapps in one tomcat, because to deploy one app 
 means we have 
 to take down all of our apps.  This is becoming unacceptable. 
  (not to 
 mention that a memory leak in one app will bring down all the apps 
 living in that tomcat instance)
 
 Any tips or tricks would be really appreciated.  Or pointers 
 to previous 
 material (I've found some, but nothing that jumped out at me).
 
 Thanks very much in advance,
 Seth
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


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



RE: virtual host memory usage

2005-08-15 Thread George Sexton
You are correct. My suggestion was that you in one case had a file in the
common/lib directory, while in another you had it in the WEB-INF/lib
directory.

George Sexton
MH Software, Inc.
http://www.mhsoftware.com/
Voice: 303 438 9585
  

 -Original Message-
 From: Oleg [mailto:[EMAIL PROTECTED] 
 Sent: Sunday, August 14, 2005 7:39 PM
 To: Tomcat Users List
 Subject: Re: virtual host memory usage
 
 I am sorry, what do you mean by host class loader? From what 
 I understand 
 there are 3 ways to load classes, /common/lib (used by 
 tomcat), shared/lib 
 (used by all applications), webapp/web-inf/lib used by this 
 one application.
  Thank you
 Oleg
 
  On 8/13/05, George Sexton [EMAIL PROTECTED] wrote: 
  
  The obvious first guess is that you have a class that is in the host
  classloader, and not the common classloader, and that class 
 is consuming
  large amounts of memory.
  
  
  
  George Sexton
  MH Software, Inc.
  http://www.mhsoftware.com/
  Voice: 303 438 9585
  
  
   -Original Message-
   From: Oleg [mailto:[EMAIL PROTECTED]
   Sent: Saturday, August 13, 2005 11:20 AM
   To: Tomcat Users List
   Subject: virtual host memory usage
  
   Why running 100 virutal hosts in Tomcat takes up much more
   memory than
   running a 100 identical applications under one host? Is there
   a way to
   configure Tomcat to run both the same?
  
   Thank you
   Oleg
  
  
  
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
 
 


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



RE: virtual host memory usage

2005-08-13 Thread George Sexton
The obvious first guess is that you have a class that is in the host
classloader, and not the common classloader, and that class is consuming
large amounts of memory.



George Sexton
MH Software, Inc.
http://www.mhsoftware.com/
Voice: 303 438 9585
  

 -Original Message-
 From: Oleg [mailto:[EMAIL PROTECTED] 
 Sent: Saturday, August 13, 2005 11:20 AM
 To: Tomcat Users List
 Subject: virtual host memory usage
 
 Why running 100 virutal hosts in Tomcat takes up much more 
 memory than 
 running a 100 identical applications under one host? Is there 
 a way to 
 configure Tomcat to run both the same?
 
 Thank you
 Oleg
 


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



RE: Tomcat and the HttpServletRequest Object

2005-08-12 Thread George Sexton
I see nothing in the specification that specifies the order of the elements
returned in the enumeration.

Why do you think this is a bug?


George Sexton
MH Software, Inc.
http://www.mhsoftware.com/
Voice: 303 438 9585
  

 -Original Message-
 From: Jeff Grangier [mailto:[EMAIL PROTECTED] 
 Sent: Friday, August 12, 2005 11:22 AM
 To: tomcat-user@jakarta.apache.org
 Subject: Tomcat and the HttpServletRequest Object
 
  
 
 Hello,
 
  
 
 I have migrated my application from iPlanet to Tomcat 5.5 
 (latest build as
 of today) and getting weird results with the 
 HttpServletRequest object:
 
  
 
 Each Element out the getParameterNames enumeration used to be 
 ordered based
 on the html form layout posting the data (using iPLanet). 
 But, after the
 migration the fields are coming in random order when I try to 
 loop through
 the fields dynamically. . .
 
  
 
 Here is a snapshot of the code: 
 
  
 
 Enumeration paramNames = req.getParameterNames();
 
  
 
 while(paramNames.hasMoreElements()) 
 
 {
 
 paramName = (String)paramNames.nextElement();
 
 .
 
 .
 
 .
 
  
 
 Has anyone encountered this issue before? Is there a work around?
 
  
 
 Thank you in advance for your help,
 
 Jeff
 
  
 
  
 
 


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



RE: Tomcat and the HttpServletRequest Object

2005-08-12 Thread George Sexton
Even if I were to write this as an enhancement, I can tell you from past
experience it would be rejected out of hand by the committers.

In your particular case, the tool you were using before used something like
a Vector or ArrayList to hold the parameter name/value pairs. Tomcat is
almost certainly using a HashMap of some sort. Any deterministic
implementation is going to be slower than the current random access
implementation. Committers will savage any submission that appears slower
and the person submitting it. No thanks, I'm not going there.

Even if Tomcat were to work in the manner desired, there's nothing that says
that every browser is going to submit the form elements in their order of
definition. You really need to abandon this idea and make your application
more robust.

You remind me of people who do SQL database development. They don't specify
an ORDER BY clause on their statements, but it always came back in the order
they wanted. Then one day, they upgraded versions of the database or the
query optimizer decided to take a different path, and all of a sudden the
results are coming out of order. Much wailing and attempted reporting of
bugs ensues... The truth is in SQL, that if you don't specify an ORDER BY
clause, the database can return the results in any order it likes.

Taking advantage of an implementation specific behavior is natural, but it
can lead (as you have found out) to non-portable code. The final arbiter is
the specification, and if the specification doesn't describe the behavior,
you can't say anything about it.

George Sexton
MH Software, Inc.
http://www.mhsoftware.com/
Voice: 303 438 9585
  

 -Original Message-
 From: Jeff Grangier [mailto:[EMAIL PROTECTED] 
 Sent: Friday, August 12, 2005 12:19 PM
 To: 'Tomcat Users List'
 Subject: RE: Tomcat and the HttpServletRequest Object
 
 Hello George,
 
 I will consider it an ehancement if it is not in the 
 specification. Adding a
 logical order to the list makes it much easier to manage dynamically.
 Otherwize, any programmer will have to create their own 
 proprietary indexing
 and ordering logic for it.
 
 Let me know if I can help in this upgrade? 
 
 Thanks,
 Jeff
 
 
 -Original Message-
 From: George Sexton [mailto:[EMAIL PROTECTED] 
 Sent: Friday, August 12, 2005 12:40 PM
 To: 'Tomcat Users List'
 Subject: RE: Tomcat and the HttpServletRequest Object
 
 I see nothing in the specification that specifies the order 
 of the elements
 returned in the enumeration.
 
 Why do you think this is a bug?
 
 
 George Sexton
 MH Software, Inc.
 http://www.mhsoftware.com/
 Voice: 303 438 9585
   
 
  -Original Message-
  From: Jeff Grangier [mailto:[EMAIL PROTECTED] 
  Sent: Friday, August 12, 2005 11:22 AM
  To: tomcat-user@jakarta.apache.org
  Subject: Tomcat and the HttpServletRequest Object
  
   
  
  Hello,
  
   
  
  I have migrated my application from iPlanet to Tomcat 5.5 
  (latest build as
  of today) and getting weird results with the 
  HttpServletRequest object:
  
   
  
  Each Element out the getParameterNames enumeration used to be 
  ordered based
  on the html form layout posting the data (using iPLanet). 
  But, after the
  migration the fields are coming in random order when I try to 
  loop through
  the fields dynamically. . .
  
   
  
  Here is a snapshot of the code: 
  
   
  
  Enumeration paramNames = req.getParameterNames();
  
   
  
  while(paramNames.hasMoreElements()) 
  
  {
  
  paramName = (String)paramNames.nextElement();
  
  .
  
  .
  
  .
  
   
  
  Has anyone encountered this issue before? Is there a work around?
  
   
  
  Thank you in advance for your help,
  
  Jeff
  
   
  
   
  
  
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


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



RE: tomcat and active directory

2005-08-11 Thread George Sexton
It looks like you are configured for anonymous bind.

By default, the AD LDAP implementation does not allow anonymous bind. You
have two ways of handling this:

   1. Configure your AD tree to allow anonymous bind. Essentially, you will
need to create an ACL against the appropriate object (container) in the
tree.
   2. Create a low powered user that has read access to the directory tree
and configure the realm to bind as that user..



George Sexton
MH Software, Inc.
http://www.mhsoftware.com/
Voice: 303 438 9585
  

 -Original Message-
 From: Michal Kwiatek [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, August 11, 2005 8:17 AM
 To: Tomcat Users List
 Subject: tomcat and active directory
 
 Has any of you managed to configure tomcat JNDIRealm to talk to Active
 Directory? 
 I'm having a hard time setting it up and my wild guess is that the
 JNDIRealm does not support SASL mechanism. 
 
 Here's my config:
 
 Realm   className=org.apache.catalina.realm.JNDIRealm debug=99
  connectionURL=ldap://cern.ch;
   userBase=OU=Organic Units,DC=cern,DC=ch
 userSearch=(userPrincipalName={0})
   userRoleName=memberOf
 / 
 
 my error message:
 
 2005-08-11 15:57:06 org.apache.catalina.realm.JNDIRealm authenticate
 SEVERE: Exception performing authentication
 javax.naming.NamingException: [LDAP: error code 1 - : LdapErr:
 DSID-0C09
 0627, comment: In order to perform this operation a 
 successful bind must
 be comp
 leted on the connection., data 0, vece ]; remaining name 'OU=Organic
 Units,DC=ce
 rn,DC=ch'
 
 At the same time, I can connect to Active Directory with the same
 settings using ldapsearch:
 
 ldapsearch -h cerndc01.cern.ch -p 389 -D [EMAIL PROTECTED] -w 
 my_password
 -b 'OU=Organic Units,DC=cern,DC=ch' [EMAIL PROTECTED]
 
 Any ideas?
 
 Thanks in advance,
 Michal.
 
  -Original Message-
  From: Michal Kwiatek [mailto:[EMAIL PROTECTED] 
  Sent: Thursday, August 11, 2005 4:06 PM
  To: Tomcat Users List
  Subject: RE: realm in context in war file
  
  I've sorted it out: the problem was in the syntax! I was 
  using context
  instead of Context, and tomcat (5.0.28) simply ignored it 
  without writing any error message.
  
  But thanks for the tip for 5.5 - I'm going to migrate soon, 
  so it will be useful.
  
  Michal.
  
   -Original Message-
   From: Caldarale, Charles R [mailto:[EMAIL PROTECTED]
   Sent: Thursday, August 11, 2005 4:03 PM
   To: Tomcat Users List
   Subject: RE: realm in context in war file
   
From: Michal Kwiatek [mailto:[EMAIL PROTECTED]
Subject: realm in context in war file

I have the following context definition:

context path=/test1 override=true 
   docBase=webapps/test1 realm
className=org.apache.catalina.realm.MemoryRealm
debug=
pathname=webapps/test1/META-INF/context-users.xml
/
/context
   
   What level of Tomcat are you using?  If it's 5.5, you 
  should not have 
   a path attribute.  If you remove the pathname attribute from the 
   realm tag, does authentication function with the default 
   conf/tomcat-users.xml?
   
- Chuck
   
   
   THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE 
   PROPRIETARY MATERIAL and is thus for use only by the intended 
   recipient. If you received this in error, please contact 
 the sender 
   and delete the e-mail and its attachments from all computers.
   
   
  
 -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: 
 [EMAIL PROTECTED]
   
   
  
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


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



RE: tomcat and active directory

2005-08-11 Thread George Sexton
In order to query the LDAP tree, you have to bind to it. Binding requires
that anonymous bind be enabled, or that you bind with a user id and
password. This is just how LDAP works.

The information that I sent you was information I learned while creating an
LDAP authentication module for our software.

George Sexton
MH Software, Inc.
http://www.mhsoftware.com/
Voice: 303 438 9585
  

 -Original Message-
 From: Michal Kwiatek [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, August 11, 2005 9:30 AM
 To: Tomcat Users List
 Subject: RE: tomcat and active directory
 
 I have just seen that it works. But I don't understand it: if tomcat
 uses bind to authenticate the user accessing the webpage, why does it
 need a different AD user?
 
 Isn't it a bug in the realm implementation?
 
 Michal.
 
  -Original Message-
  From: George Sexton [mailto:[EMAIL PROTECTED] 
  Sent: Thursday, August 11, 2005 5:27 PM
  To: 'Tomcat Users List'
  Subject: RE: tomcat and active directory
  
  It looks like you are configured for anonymous bind.
  
  By default, the AD LDAP implementation does not allow 
  anonymous bind. You have two ways of handling this:
  
 1. Configure your AD tree to allow anonymous bind. 
  Essentially, you will need to create an ACL against the 
  appropriate object (container) in the tree.
 2. Create a low powered user that has read access to the 
  directory tree and configure the realm to bind as that user..
  
  
  
  George Sexton
  MH Software, Inc.
  http://www.mhsoftware.com/
  Voice: 303 438 9585

  
   -Original Message-
   From: Michal Kwiatek [mailto:[EMAIL PROTECTED]
   Sent: Thursday, August 11, 2005 8:17 AM
   To: Tomcat Users List
   Subject: tomcat and active directory
   
   Has any of you managed to configure tomcat JNDIRealm to 
  talk to Active 
   Directory?
   I'm having a hard time setting it up and my wild guess is 
 that the 
   JNDIRealm does not support SASL mechanism.
   
   Here's my config:
   
   Realm   className=org.apache.catalina.realm.JNDIRealm 
 debug=99
connectionURL=ldap://cern.ch;
 userBase=OU=Organic Units,DC=cern,DC=ch
   userSearch=(userPrincipalName={0})
 userRoleName=memberOf
   / 
   
   my error message:
   
   2005-08-11 15:57:06 org.apache.catalina.realm.JNDIRealm 
 authenticate
   SEVERE: Exception performing authentication
   javax.naming.NamingException: [LDAP: error code 1 - 
  : LdapErr:
   DSID-0C09
   0627, comment: In order to perform this operation a 
 successful bind 
   must be comp leted on the connection., data 0, vece ]; 
  remaining name 
   'OU=Organic Units,DC=ce rn,DC=ch'
   
   At the same time, I can connect to Active Directory with the same 
   settings using ldapsearch:
   
   ldapsearch -h cerndc01.cern.ch -p 389 -D [EMAIL PROTECTED] -w 
   my_password -b 'OU=Organic Units,DC=cern,DC=ch' 
   [EMAIL PROTECTED]
   
   Any ideas?
   
   Thanks in advance,
   Michal.
   
-Original Message-
From: Michal Kwiatek [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 11, 2005 4:06 PM
To: Tomcat Users List
Subject: RE: realm in context in war file

I've sorted it out: the problem was in the syntax! I was using 
context
instead of Context, and tomcat (5.0.28) simply ignored 
  it without 
writing any error message.

But thanks for the tip for 5.5 - I'm going to migrate 
 soon, so it 
will be useful.

Michal.

 -Original Message-
 From: Caldarale, Charles R [mailto:[EMAIL PROTECTED]
 Sent: Thursday, August 11, 2005 4:03 PM
 To: Tomcat Users List
 Subject: RE: realm in context in war file
 
  From: Michal Kwiatek [mailto:[EMAIL PROTECTED]
  Subject: realm in context in war file
  
  I have the following context definition:
  
  context path=/test1 override=true 
 docBase=webapps/test1 realm
  className=org.apache.catalina.realm.MemoryRealm
  debug=
  pathname=webapps/test1/META-INF/context-users.xml
  /
  /context
 
 What level of Tomcat are you using?  If it's 5.5, you
should not have
 a path attribute.  If you remove the pathname attribute 
  from the 
 realm tag, does authentication function with the default 
 conf/tomcat-users.xml?
 
  - Chuck
 
 
 THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE 
 PROPRIETARY MATERIAL and is thus for use only by the intended 
 recipient. If you received this in error, please contact
   the sender
 and delete the e-mail and its attachments from all computers.
 
 

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


   
  
 -
To unsubscribe, e-mail: 
 [EMAIL

RE: Virtual host, routing, problems with localhost

2005-08-09 Thread George Sexton
Do you have a host entry in your server.xml with the name of localhost?

George Sexton
MH Software, Inc.
http://www.mhsoftware.com/
Voice: 303 438 9585
  

 -Original Message-
 From: Scott Purcell [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, August 09, 2005 8:26 AM
 To: tomcat-user@jakarta.apache.org
 Subject: Virtual host, routing, problems with localhost
 
 Hello,
 
 I am running Tomcat 5.5 on a PC.
 Up until a week ago, the machine was a local machine 
 basically for my development. So I would hit the machine like 
 so for sites:
 http://localhost/site1
 or
 http://localhost/site9
 
 On Monday, I purchased a staticIP and a DNS entry. I had 
 register.com bind the DNS name with the IP.
 I purchased a router and put the IP into the router. In my 
 original local machine, I gave it an IP and told the router 
 to allow 80 traffic through to the machine.
 Then I updated my server.xml file and added a virtual host that was
 http://www.unique - /webapps/unique
 and all was happy.
 
 So I felt good about all things.
 
 But last night, I decided to create a new site, and now I 
 cannot hit it with http://localhost or http://127.0.0.1
 And then I cannot get into the manager app either.
 
 I believe that the machine is trying to go out to the 
 internet and back through the router? I get lost here, and am 
 basically clueless of what I need to do?
 
 Has anyone been through this? I would appreciate any input 
 that I can try.
 
 Sincerely
 Scott
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


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



RE: Virtual host, routing, problems with localhost

2005-08-09 Thread George Sexton
I think that unless you have a default entry, that it would fail. The issue
is that the host name is being presented to Tomcat, and the request mapper
is looking up the host name presented as part of the http request. If it's
not found, and there is no default, then it would return an error.

George Sexton
MH Software, Inc.
http://www.mhsoftware.com/
Voice: 303 438 9585
  

 -Original Message-
 From: Scott Purcell [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, August 09, 2005 10:43 AM
 To: Tomcat Users List
 Subject: RE: Virtual host, routing, problems with localhost
 
 Sorry for the latency, I was in a meeting.
 
 No I do not have one. Do I need one, and if so, is the IP the 
 machine IP or localhost, or 127.0.0.1?
 
 Thanks 
 Scott
 
 
 
 -Original Message-
 From: George Sexton [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, August 09, 2005 10:18 AM
 To: 'Tomcat Users List'
 Subject: RE: Virtual host, routing, problems with localhost
 
 
 Do you have a host entry in your server.xml with the name of 
 localhost?
 
 George Sexton
 MH Software, Inc.
 http://www.mhsoftware.com/
 Voice: 303 438 9585
   
 
  -Original Message-
  From: Scott Purcell [mailto:[EMAIL PROTECTED] 
  Sent: Tuesday, August 09, 2005 8:26 AM
  To: tomcat-user@jakarta.apache.org
  Subject: Virtual host, routing, problems with localhost
  
  Hello,
  
  I am running Tomcat 5.5 on a PC.
  Up until a week ago, the machine was a local machine 
  basically for my development. So I would hit the machine like 
  so for sites:
  http://localhost/site1
  or
  http://localhost/site9
  
  On Monday, I purchased a staticIP and a DNS entry. I had 
  register.com bind the DNS name with the IP.
  I purchased a router and put the IP into the router. In my 
  original local machine, I gave it an IP and told the router 
  to allow 80 traffic through to the machine.
  Then I updated my server.xml file and added a virtual host that was
  http://www.unique - /webapps/unique
  and all was happy.
  
  So I felt good about all things.
  
  But last night, I decided to create a new site, and now I 
  cannot hit it with http://localhost or http://127.0.0.1
  And then I cannot get into the manager app either.
  
  I believe that the machine is trying to go out to the 
  internet and back through the router? I get lost here, and am 
  basically clueless of what I need to do?
  
  Has anyone been through this? I would appreciate any input 
  that I can try.
  
  Sincerely
  Scott
  
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


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



RE: Major fopaw

2005-08-05 Thread George Sexton
You mean Faux pas

http://en.wikipedia.org/wiki/Faux_pas

George Sexton
MH Software, Inc.
http://www.mhsoftware.com/
Voice: 303 438 9585
  

 -Original Message-
 From: Jef Sullivan [mailto:[EMAIL PROTECTED] 
 Sent: Friday, August 05, 2005 10:10 AM
 To: 'Tomcat Users List'
 Subject: Major fopaw
 
 I have made a major mistake and need some help from the group.
 I have my system setup to run Jboss and Tomcat applications 
 simultaneously.
 I am having problems
 with one of my Tomcat programs and need to access the manager 
 section of
 Tomcat. Unfortunately,
 I cannot remember my username and password. Is there a way to 
 determine what
 that information is
 without reinstalling Tomcat? Or, perhaps, reset the username 
 and password? I
 believe I know the username.
 
 Please say yes,
 
 Embarrassingly,
 
 
 Jef Sullivan
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


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



RE: HTTP/1.1 GZIP compression and its impact on server

2005-08-01 Thread George Sexton
Our App does GZIP compression. I actually did some real testing on using it.
Here's what we tell our customers:

Enable GZIP Compression

Enabling this option will cause Connect Daily to send web pages to the
browser compressed in the GZIP format. This can result in a compression
factor of six (6) times. Needless to say, this can make your calendar
noticeably faster to end users. Our testing indicates serviced per minute
was reduced by 2.3% when GZIP compression is enabled. 



George Sexton
MH Software, Inc.
http://www.mhsoftware.com/
Voice: 303 438 9585
  

 -Original Message-
 From: Peddireddy Srikanth [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, July 26, 2005 12:33 AM
 To: Tomcat Users List
 Subject: HTTP/1.1 GZIP compression and its impact on server
 
 Hi all,
 Iam planning to turn on the HTTP/1.1 GZIP compression for my
 application by setting the compression attribute of http connector.
 Iam sure that this will reduce my bandwidth requirements.
 But I have a doubt. Is Compressing the responses  will eat away many
 CPU cycles and affect my throughput or performance or scalability.
 
 Any one have used this option in production environment and what r the
 results(performance etc)
 
 thanx for any info on this .
 
 Regards
 Srikanth
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


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



Viewing Web Resource Updates without Restarting Tomcat

2005-07-27 Thread Martyn George
Currently, I wish to make minor changes to web pages, and the like, 
associated with a production application without restarting Tomcat, and with 
minimal impact to users. These changes can be made, but are not immediately 
observable due to caching. Is there any command that can be issued to Tomcat 
so that changes can be immediately observed (e.g. a cache flush)?


Thankyou

_
Sell your car for $9 on carpoint.com.au   
http://www.carpoint.com.au/sellyourcar



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



Re: Any kind of Request Recorder/Player available?

2005-07-15 Thread George Finklang
netbeans.org has a http monitor module that can record and playback of
http requests, plugged into netbeans' web development framework.  I
think you could just download just that module and manually install it
into your tomcat, and use the UI from netbeans to do the
record/playback.  It actually can be installed into any newer
application server that is up to date in its servlet support.

go to http://monitor.netbeans.org for more details

--George

On 7/15/05, Frank W. Zammetti [EMAIL PROTECTED] wrote:
 That's a really interesting question... I don't know of anything that
 exists, although I'm quite certain something does. :)
 
 I can however think it through, and its probably not a huge chore to build...
 
 As you mentioned, a filter would probably do the trick nicely... if we
 assume your app only deals in POSTs and GETs of basic user input (because
 things like multiparts and such would complicate matters a bit), then it's
 really just a simple filter that iterates over all parameters and stores
 them.  Just a simple CSV file of name=value pairs would suffice, with each
 line being a request.
 
 Then it should be a simple matter to write a Java app using the standard
 JDK classes to run through that CSV file and make the requests with the
 parameters you recorded.
 
 --
 Frank W. Zammetti
 Founder and Chief Software Architect
 Omnytex Technologies
 http://www.omnytex.com
 
 On Fri, July 15, 2005 1:28 pm, Will Hartung said:
  With Apache JMeter, they have a proxy that you can use to record a session
  with the server, and you can then use that as a basis for load testing and
  what not.
 
  What I'm looking for is something similar, but something that I can
  ideally
  place in Tomcat (as a Valve perhaps, or a Servlet filter). Basically,
  something that records the entire incoming request and then stores it out
  in
  a format that can later be played back by another tool.
 
  The problem is that we have a server than has a production memory leak,
  and
  the profilers are basically worthless in production.
 
  But if I can place a logger and record a days traffic, and then replay it
  against a test server (with all the monitoring etc.), then I can more
  easily
  reproduce the problem without heavily impacting performance of the
  production server.
 
  Anyone have any ideas?
 
  Regards,
 
  Will Hartung
  ([EMAIL PROTECTED])
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


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



Re: Any kind of Request Recorder/Player available?

2005-07-15 Thread George Finklang
Got a bounce the first time...

-- Forwarded message --
From: George Finklang [EMAIL PROTECTED]
Date: Jul 15, 2005 10:59 AM
Subject: Re: Any kind of Request Recorder/Player available?
To: Tomcat Users List tomcat-user@jakarta.apache.org


netbeans.org has a http monitor module that can record and playback of
http requests, plugged into netbeans' web development framework.  I
think you could just download just that module and manually install it
into your tomcat, and use the UI from netbeans to do the
record/playback.  It actually can be installed into any newer
application server that is up to date in its servlet support.

go to http://monitor.netbeans.org for more details

--George

On 7/15/05, Frank W. Zammetti [EMAIL PROTECTED] wrote:
 That's a really interesting question... I don't know of anything that
 exists, although I'm quite certain something does. :)

 I can however think it through, and its probably not a huge chore to build...

 As you mentioned, a filter would probably do the trick nicely... if we
 assume your app only deals in POSTs and GETs of basic user input (because
 things like multiparts and such would complicate matters a bit), then it's
 really just a simple filter that iterates over all parameters and stores
 them.  Just a simple CSV file of name=value pairs would suffice, with each
 line being a request.

 Then it should be a simple matter to write a Java app using the standard
 JDK classes to run through that CSV file and make the requests with the
 parameters you recorded.

 --
 Frank W. Zammetti
 Founder and Chief Software Architect
 Omnytex Technologies
 http://www.omnytex.com

 On Fri, July 15, 2005 1:28 pm, Will Hartung said:
  With Apache JMeter, they have a proxy that you can use to record a session
  with the server, and you can then use that as a basis for load testing and
  what not.
 
  What I'm looking for is something similar, but something that I can
  ideally
  place in Tomcat (as a Valve perhaps, or a Servlet filter). Basically,
  something that records the entire incoming request and then stores it out
  in
  a format that can later be played back by another tool.
 
  The problem is that we have a server than has a production memory leak,
  and
  the profilers are basically worthless in production.
 
  But if I can place a logger and record a days traffic, and then replay it
  against a test server (with all the monitoring etc.), then I can more
  easily
  reproduce the problem without heavily impacting performance of the
  production server.
 
  Anyone have any ideas?
 
  Regards,
 
  Will Hartung
  ([EMAIL PROTECTED])
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 


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



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



Re: Trying to configure apache, tomcat and mod_jk

2005-07-11 Thread Paul George Constantine
Hey Matthew,

I'm no expert, but I can tell you what I did to get it running. I'm  running
Apache 2.0 on Fedora Core 4. I basically ended up just rolling back my
versions to get things to work. I rolled back to Tomcat 5.0.28 with mod_jk
1.2.10.

It's true. The documentation on the web is out of date and very confusing.

I set things up considerably different, though. For example, I was just
trying to serve jsp's from the $CATALINA_HOME\webapps directory. I'm not
entirely sure, but I think the JkMount directive only points to that
directory.

It looks like you're defining more workers in your workers.properties than
you're actually using in httpd.conf. I don't think you need the ajp12
worker.

Another thing is that you have not defined a JkShmFile (a shared memory
file). This is required for connectors 1.2.10 and later (although 1.2.13
might set one up on its own).

Here's a link to the relevant lines in my config files. I got this working
this weekend, so you can be sure they're fresh.

http://ill-conditioned.stanford.edu/JSPWiki/Wiki.jsp?page=Fedora

If the wiki link doesn't work, then you know I'm still having problems. :)

Hope this helps,
Paul

Quoting Matthew Strawbridge [EMAIL PROTECTED]:

 Hi

 After spending several days trying to set this up from the
 documentation, I've finally decided I need some expert help.

 I have a server set up with several domains sharing an IP address. I
 want to be able to have JSP files in amongst my static files, and
 have apache serve the static ones and to forward the requests for
 *.jsp to tomcat using mod_jk.

 At present:
 http://www.philoxenic.com:8080/test.jsp correctly serves up
 /home/httpd/vhosts/philoxenic.com/jsp/test.jsp through tomcat. (I
 would rather have these files in ../httpdocs/, but thought it might
 be easier if apache couldn't find the files itself).

 http://www.philoxenic.com/test.jsp comes up with a 'Not Found' error.
 This is what I want to get working.

 If I copy test.jsp from 'jsp' to 'httpdocs' then
 http://www.philoxenic.com/test.jsp serves it up as plain HTML (i.e.
 bypassing Tomcat).

 Please can someone point me in the right direction. To get this far
 I've had to recompile apache, compile tomcat and mod_jk, and think I
 have been going round in circles following out-of-date documents on
 the Web. I feel I'm close, but perhaps can't see the wood for the
 trees.

 Thanks
 Matthew


 VERSIONS:
 Red Hat Linux 9
 Apache 2.0.40
 Tomcat 5.5.9
 jakarta-tomcat-connectors-1.2.13

 FILES:
 /usr/local/jakarta-tomcat-5/conf/server.xml:

 Server port=8005 shutdown=SHUTDOWN
   Listener
 className=org.apache.catalina.mbeans.ServerLifecycleListener /
   Listener
 className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener
 /
   Listener
 className=org.apache.catalina.storeconfig.StoreConfigLifecycleListener/
   GlobalNamingResources

 !-- Test entry for demonstration purposes --
 Environment name=simpleValue type=java.lang.Integer value=30/

 !-- Editable user database that can also be used by
  UserDatabaseRealm to authenticate users --
 Resource name=UserDatabase auth=Container
   type=org.apache.catalina.UserDatabase
description=User database that can be updated and saved
factory=org.apache.catalina.users.MemoryUserDatabaseFactory
   pathname=conf/tomcat-users.xml /

   /GlobalNamingResources
   Service name=Catalina
 Connector className=org.apache.coyote.tomcat5.CoyoteConnector
port=8009 minProcessors=5 maxProcessors=75
enableLookups=true acceptCount=10 debug=0
connectionTimeout=2 useURIValidationHack=false

 protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler/

 !-- Define a non-SSL HTTP/1.1 Connector on port 8080 --
 Connector port=8080 maxHttpHeaderSize=8192
maxThreads=150 minSpareThreads=25 maxSpareThreads=75
enableLookups=false redirectPort=8443
 acceptCount=100
connectionTimeout=2 disableUploadTimeout=true /
 Engine name=Catalina defaultHost=localhost
   Realm className=org.apache.catalina.realm.UserDatabaseRealm
  resourceName=UserDatabase/
   Host name=localhost appBase=webapps
unpackWARs=true autoDeploy=true
xmlValidation=false xmlNamespaceAware=false
   /Host

   Host name=www.philoxenic.com
 Context path= docBase=/home/httpd/vhosts/philoxenic.com/jsp
 debug=1 reloadable=true/
   /Host

 /Engine

   /Service

 /Server


 /usr/local/apache2/conf/httpd.conf:
 [SNIP]
   LoadModulejk_module  /usr/local/apache2/modules/mod_jk.so
   JkWorkersFile /usr/local/apache2/conf/workers.properties
   JkLogFile /var/log/httpd/mod_jk.log
   JkLogLeveldebug
   JkLogStampFormat [%a %b %d %H:%M:%S %Y] 
   JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
   JkRequestLogFormat %w %V %T
   JkMount  /*.jsp ajp13
   JkMount  /examples/* ajp13


 

JkShmFile???

2005-07-10 Thread Paul George Constantine
With the Jk connector version 1.2.10, you must include a directive in the
Apache httpd.conf

JkShmFile /path/to/smfile

Does anyone know what file I'm supposed to point to? I randomly pointed it
to a log file (because I had no idea what I was doing), but once the log
file reached the default JkShmSize of 64k, everything died.

Thanks,
Paul

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



permission denied error on jk.shm

2005-07-10 Thread Paul George Constantine
In my httpd.conf, I set

JkShmFile   /etc/httpd/logs/jk.shm
JkShmSize   10M

but when I start Apache, I get an error in my mod_jk.log that says

init_jk::mod_jk.c (2347): Initializing shm:/etc/httpd/logs/jk.shm errno=13
jk_child_init::mod_jk.c (2313): Attachning shm:/etc/httpd/logs/jk.shm
errno=13

These are 'permission denied' errors but I don't know what permissions to
set to allow mod_jk to write to them!!!

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



Jk's shared memory file - fixed? bug?

2005-07-10 Thread Paul George Constantine
Ok, here's what happened. I'm running Apace 2.0 on Fedora Core 4, connecting
to Tomcat 5.0.28 with Jk 1.2.10. In my /etc/httpd/conf/httpd.conf, I had:

#Jk stuff
LoadModule  jk_module /usr/lib/httpd/modules/mod_jk.so
JkWorkersFile   /etc/httpd/conf/workers.properties
JkLogFile   /var/log/httpd/mod_jk.log
JkLogLevel  info
JkLogStampFormat [%a %b %d %H:%M:%S %Y] 
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
JkMount /jsp-examples/* ajp13w
JkMount /JSPWiki/* ajp13w
JkShmFile   /etc/httpd/logs/jk-runtime-status

In /etc/httpd/conf/workers.properties, I had:

worker.list=wlb,jkstatus,ajp13w

worker.ajp13w.type=ajp13
worker.ajp13w.host=localhost
worker.ajp13w.port=8009

worker.wlb.type=lb
worker.wlb.balance_workers=ajp13w

worker.jkstatus.type=status

In /usr/share/tomcat5/conf/server.xml, I had

Listener
 className=org.apache.jk.config.ApacheConfig
 configHome=/usr/share/tomcat5
 modJk=/usr/lib/httpd/modules/mod_jk.so
 jkWorker=ajp13w
 forwardAll=False
 jkLog=/etc/httpd/logs/mod_jk.log
 jkDebug=debug
 noRoot=False
 workersConfig=/etc/httpd/conf/workers.properties/

Connector port=8009
 enableLookups=false redirectPort=8443 debug=0
 protocol=AJP/1.3 /

Everything was working fine until the file /etc/httpd/logs/jk-runtime-status
reached the default JkShmSize limit of 64k. Once that happened, everything
died. I started getting errors in mod_jk.log like:

[error] init_jk::mod_jk.c (2347): Initializing
shm:/etc/httpd/logs/jk-runtime-status errno=13

errno=13 is typically a permission denied error, but my permissions were set
appropriately. I tried deleting the contents of
/etc/httpd/logs/jk-runtime-status to get below the size limit, but that
didn't help anything. I tried creating a new file /etc/httpd/logs/jk.shm
and pointing my config file there, but no success. I didn't get things
working again until I recompiled my mod_jk.so and reinstalled it. I checked
out the code in jk_shm.c that was giving me an error:

jk_shmem.hdr = (jk_shm_header_t *)calloc(1, jk_shmem.size);
if (!jk_shmem.hdr) {
JK_TRACE_EXIT(l);
return -1;
}

So, devs, why was this breaking? I've now set JkShmSize to 10M. But will it
break again once jk.shm reaches 10M?

Anybody out there?

-Paul


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



Re: Apache2+jk+tomcat5.028+uri utf-8 SOLVED

2005-07-01 Thread Paul George Constantine
I've essentially done all of this, but I still get the following error in
the browser:
---
Internal Server Error

The server encountered an internal error or misconfiguration and was unable
to complete your request.

Please contact the server administrator, [EMAIL PROTECTED] and inform them of
the time the error occurred, and anything you might have done that may have
caused the error.

More information about this error may be available in the server error log.
---

But there was no error in the server error log. In the jk log I get:
---
[Sun Jun 26 15:55:45 2005] [info]  jk_open_socket::jk_connect.c (433):
connect to 127.0.0.1:8009 failed with errno=13
[Sun Jun 26 15:55:45 2005] [info]  ajp_connect_to_endpoint::jk_ajp_common.c
(880): Failed opening socket to (127.0.0.1:8009) with (errno=13)
[Sun Jun 26 15:55:45 2005] [info]  ajp_send_request::jk_ajp_common.c (1239):
Error connecting to the Tomcat process.
[Sun Jun 26 15:55:45 2005] [info]  ajp_service::jk_ajp_common.c (1737):
Sending request to tomcat failed,  recoverable operation attempt=1
[Sun Jun 26 15:55:45 2005] [info]  jk_open_socket::jk_connect.c (433):
connect to 127.0.0.1:8009 failed with errno=13
[Sun Jun 26 15:55:45 2005] [info]  ajp_connect_to_endpoint::jk_ajp_common.c
(880): Failed opening socket to (127.0.0.1:8009) with (errno=13)
[Sun Jun 26 15:55:45 2005] [info]  ajp_send_request::jk_ajp_common.c (1239):
Error connecting to the Tomcat process.
[Sun Jun 26 15:55:45 2005] [info]  ajp_service::jk_ajp_common.c (1737):
Sending request to tomcat failed,  recoverable operation attempt=2
[Sun Jun 26 15:55:45 2005] [info]  jk_open_socket::jk_connect.c (433):
connect to 127.0.0.1:8009 failed with errno=13
[Sun Jun 26 15:55:45 2005] [info]  ajp_connect_to_endpoint::jk_ajp_common.c
(880): Failed opening socket to (127.0.0.1:8009) with (errno=13)
[Sun Jun 26 15:55:45 2005] [info]  ajp_send_request::jk_ajp_common.c (1239):
Error connecting to the Tomcat process.
[Sun Jun 26 15:55:45 2005] [info]  ajp_service::jk_ajp_common.c (1737):
Sending request to tomcat failed,  recoverable operation attempt=3
[Sun Jun 26 15:55:45 2005] [error] ajp_service::jk_ajp_common.c (1746):
Error connecting to tomcat. Tomcat is probably not started or is listening
on the wrong port. worker=ajp13w failed
[Sun Jun 26 15:55:45 2005] ajp13w ill-conditioned 0.002938

I know that Tomcat is both started and listening on the correct port. I
think it might have to do with permissions (errno=13 is a permission denied
error), but I don't know what I need to change.



Quoting Luis Sánchez Sánchez [EMAIL PROTECTED]:

 Install mod_jk. I downloaded it from

http://www.apache.org/dist/jakarta/tomcat-connectors/jk/binaries/linux/jk-1.2.10/

 Copy the jakarta-connector*.so to your apache2 modules directory.

 Activate your new module:

 I used this two files in /etc/apache/mods-avaliable:

 +---+
 mod_jk.conf
 +---+
 # Where to find workers.properties
 # Update this path to match your conf directory location (put
 workers.properties next to httpd.conf)
 JkWorkersFile /etc/apache2/workers.

properties

 # Where to put jk logs
 # Update this path to match your logs directory location (put mod_jk.log
 next to access_log)
 JkLogFile /var/log/apache2/mod_jk.log

 # Set the jk log level [debug/error/info]
 JkLogLevelinfo

 # Select the log format
 JkLogStampFormat [%a %b %d %H:%M:%S %Y] 

 #JkOptions +ForwardURICompatUnparsed

 #JkOptions +ForwardURIEscaped

 #JkOptions +ForwardURICompat

 # JkOptions indicate to send SSL KEY SIZE,
 # la sgte linea la he comentado yo
 JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories

 # JkRequestLogFormat set the request format
 JkRequestLogFormat %w %V %T

 # Send everything for context /examples to worker named worker1 (ajp13)
 JkMount  /jsp-examples/* worker1
 JkMount  /blojsom/* worker1



 +---+
 mod_jk.load
 +---+
 LoadModule jk_module /usr/lib/apache2/modules/mod_jk.so


 Then link this files in /etc/apache2/mods-enabled/


 Put a workers.property file in your apache2 conf dir (/etc/apache2 in my
 linux). This is my workers.properties

   # Define 1 real worker using ajp13
   worker.list=worker1
   # Set properties for worker1 (ajp13)
   worker.worker1.type=ajp13
   worker.worker1.host=localhost
   worker.worker1.port=8009
   worker.worker1.lbfactor=50
   worker.worker1.cachesize=10
   worker.worker1.cache_timeout=600
   worker.worker1.socket_keepalive=1
   worker.worker1.reclycle_timeout=300




 In tomcat you must use URIEncoding=UTF-8 in your connectors in
 server.xml:

   (I forgot this connector ...)

Connector port=8009
enableLookups=false redirectPort=8443 debug=0
protocol=AJP/1.3 URIEncoding=UTF-8/



 Connector port=8080
maxThreads=150 minSpareThreads=25 maxSpareThreads=75
enableLookups=false redirectPort=8443
 acceptCount=100
debug=0 

Re: Apache2+jk+tomcat5.028+uri utf-8 [NOT] SOLVED

2005-07-01 Thread Paul George Constantine
I'm using Fedora Core 4. I enabled port 8009 on my firewall. Here's the
relevant line from iptables -L
--
0 0 ACCEPT tcp  --  anyany anywhere anywhere
   state NEW tcp dpt:8009
--
I used the lokkit utility to add it. Rebooted. Nothing. I had a typo in a
config file, but correcting that didn't work. I still get the browser error
--
The server is temporarily unable to service your request due to maintenance
downtime or capacity problems. Please try again later.
--
They call it a 503 error. And I'm still getting the same error in my mod_jk
log file.


Quoting Bruno Georges [EMAIL PROTECTED]:

 Hi
 Depending on your configuration and operating system, you may have some
 firewall restriction which prevents connecting to the port 8009.
 Please check this first, especially if you use XP SP2.

 Best Regards
 Bruno Georges

 Glencore International AG
 Tel. +41 41 709 3204
 Fax +41 41 709 3000



   Paul George
   Constantine  To:  Tomcat Users List
 tomcat-user@jakarta.apache.org
   [EMAIL PROTECTED] cc:
   d.edu   Subject: Re:
 Apache2+jk+tomcat5.028+uri utf-8 SOLVED

   01.07.05 09:35   Distribute:
   Please respond   Personal?   |---|
   to Tomcat Users | [ ] x |
   List|---|






 I've essentially done all of this, but I still get the following error in
 the browser:
 ---
 Internal Server Error

 The server encountered an internal error or misconfiguration and was
 unable
 to complete your request.

 Please contact the server administrator, [EMAIL PROTECTED] and inform them
 of
 the time the error occurred, and anything you might have done that may
 have
 caused the error.

 More information about this error may be available in the server error
 log.
 ---

 But there was no error in the server error log. In the jk log I get:
 ---
 [Sun Jun 26 15:55:45 2005] [info]  jk_open_socket::jk_connect.c (433):
 connect to 127.0.0.1:8009 failed with errno=13
 [Sun Jun 26 15:55:45 2005] [info]
 ajp_connect_to_endpoint::jk_ajp_common.c
 (880): Failed opening socket to (127.0.0.1:8009) with (errno=13)
 [Sun Jun 26 15:55:45 2005] [info]  ajp_send_request::jk_ajp_common.c
 (1239):
 Error connecting to the Tomcat process.
 [Sun Jun 26 15:55:45 2005] [info]  ajp_service::jk_ajp_common.c (1737):
 Sending request to tomcat failed,  recoverable operation attempt=1
 [Sun Jun 26 15:55:45 2005] [info]  jk_open_socket::jk_connect.c (433):
 connect to 127.0.0.1:8009 failed with errno=13
 [Sun Jun 26 15:55:45 2005] [info]
 ajp_connect_to_endpoint::jk_ajp_common.c
 (880): Failed opening socket to (127.0.0.1:8009) with (errno=13)
 [Sun Jun 26 15:55:45 2005] [info]  ajp_send_request::jk_ajp_common.c
 (1239):
 Error connecting to the Tomcat process.
 [Sun Jun 26 15:55:45 2005] [info]  ajp_service::jk_ajp_common.c (1737):
 Sending request to tomcat failed,  recoverable operation attempt=2
 [Sun Jun 26 15:55:45 2005] [info]  jk_open_socket::jk_connect.c (433):
 connect to 127.0.0.1:8009 failed with errno=13
 [Sun Jun 26 15:55:45 2005] [info]
 ajp_connect_to_endpoint::jk_ajp_common.c
 (880): Failed opening socket to (127.0.0.1:8009) with (errno=13)
 [Sun Jun 26 15:55:45 2005] [info]  ajp_send_request::jk_ajp_common.c
 (1239):
 Error connecting to the Tomcat process.
 [Sun Jun 26 15:55:45 2005] [info]  ajp_service::jk_ajp_common.c (1737):
 Sending request to tomcat failed,  recoverable operation attempt=3
 [Sun Jun 26 15:55:45 2005] [error] ajp_service::jk_ajp_common.c (1746):
 Error connecting to tomcat. Tomcat is probably not started or is
 listening
 on the wrong port. worker=ajp13w failed
 [Sun Jun 26 15:55:45 2005] ajp13w ill-conditioned 0.002938
 
 I know that Tomcat is both started and listening on the correct port. I
 think it might have to do with permissions (errno=13 is a permission
 denied
 error), but I don't know what I need to change.



 Quoting Luis Sánchez Sánchez [EMAIL PROTECTED]:

  Install mod_jk. I downloaded it from
 

http://www.apache.org/dist/jakarta/tomcat-connectors/jk/binaries/linux/jk-1.2.10
 /

 
  Copy the jakarta-connector*.so to your apache2 modules directory.
 
  Activate your new module:
 
  I used this two files in /etc/apache/mods-avaliable:
 
  +---+
  mod_jk.conf
  +---+
  # Where to find workers.properties
  # Update this path to match your conf directory location (put
  workers.properties next to httpd.conf)
  JkWorkersFile /etc/apache2/workers.

 properties
 
  # Where to put jk logs
  # Update this path to match your logs directory location (put
 mod_jk.log
  next to access_log)
  JkLogFile /var/log/apache2/mod_jk.log
 
  # Set the jk log level [debug/error/info]
  JkLogLevelinfo
 
  # Select

Re: jsp include/RequestDispatcher incompatible?

2005-06-29 Thread George Finklang
So before each request dispatcher call I need to call a flush on the
out in the JspPage?  How do I get access to it?

Do I also need to call flush at the end of each request dispatcher call?

--George

On 6/28/05, Tim Funk [EMAIL PROTECTED] wrote:
 The out from the jspwriter is NOT the same out as receieved by
 response.getWriter();
 
 The out in the JspPage is  buffered.
 
 -Tim
 
 George Finklang wrote:
 
  have the following code in my jsp, which is called by a forward from my
  Controller servlet. The various Dispatchers are either servlets or jsps 
  declared
  in my web.xml.
 
  All the servlets and jsps get run correctly. The problem is the output. The
  output of the root jsp and the 3-4 included jsps are arbitrarily 
  rearranged, see
  below. Bizarre shuffling, not reverse order, but a different order and not
  interleaved with the text from the jsp.
 
  If I translate the jsp into servlet code, and use RequestDispatchers
  for all the components,
  the page works.  The documentation says something about flushing buffers, 
  but I
  can't see how to do this with RequestDispatchers.
 
 
  Code:
 
  BODY
  jsp:include page=WEB-INF/jsps/portal/header.jsp flush=true/
  % if(option1) {
  
  application.getNamedDispatcher(Option1Servlet).include(request,response);
  } else { %
  tabletr
  % if(option2) { %
  td%
 
  application.getNamedDispatcher(Option2Servlet).include(request,response);
  %/td
  %  } %
  td%
 application.getNamedDispatcher(page).include(request,response); 
  %/td
  td%
 
  application.getNamedDispatcher(InfoServlet).include(request,response);
  %/td
  /tr/table
  %  } %
  /BODY
 
 
 
  generated html:
 
  BODY
 
 
  Page text  // from the page dispatcher
 
  Info servlet text   // from the infoservlet dispatcher
 
  Header form text // from the header.jsp dispatcher
 
 
  tabletr
 
  td/td
  td/td
  /tr/table
 
  /BODY
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


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



Re: jsp include/RequestDispatcher incompatible?

2005-06-29 Thread George Finklang
Feh.  Easier to just translate the whole jsp into a servlet by hand
which is what I already did.

--George

On 6/29/05, Tim Funk [EMAIL PROTECTED] wrote:
 Try flush first, otherwise you might need to pass a
 HttpServletResponseWrapper() to include() where the wrapper oversrides
 getOutputStream() (or getWriter()
 
 -Tim
 
 George Finklang wrote:
  So before each request dispatcher call I need to call a flush on the
  out in the JspPage?  How do I get access to it?
 
  Do I also need to call flush at the end of each request dispatcher call?
 
  --George
 
  On 6/28/05, Tim Funk [EMAIL PROTECTED] wrote:
 
 The out from the jspwriter is NOT the same out as receieved by
 response.getWriter();
 
 The out in the JspPage is  buffered.
 
 -Tim
 
 George Finklang wrote:
 
 
 have the following code in my jsp, which is called by a forward from my
 Controller servlet. The various Dispatchers are either servlets or jsps 
 declared
 in my web.xml.
 
 All the servlets and jsps get run correctly. The problem is the output. The
 output of the root jsp and the 3-4 included jsps are arbitrarily 
 rearranged, see
 below. Bizarre shuffling, not reverse order, but a different order and not
 interleaved with the text from the jsp.
 
 If I translate the jsp into servlet code, and use RequestDispatchers
 for all the components,
 the page works.  The documentation says something about flushing buffers, 
 but I
 can't see how to do this with RequestDispatchers.
 
 
 Code:
 
 BODY
 jsp:include page=WEB-INF/jsps/portal/header.jsp flush=true/
 % if(option1) {
 
  application.getNamedDispatcher(Option1Servlet).include(request,response);
 } else { %
 tabletr
 % if(option2) { %
 td%
 
 application.getNamedDispatcher(Option2Servlet).include(request,response);
 %/td
 %  } %
 td%
application.getNamedDispatcher(page).include(request,response); 
  %/td
 td%

  application.getNamedDispatcher(InfoServlet).include(request,response);
 %/td
 /tr/table
 %  } %
 /BODY
 
 
 
 generated html:
 
 BODY
 
 
 Page text  // from the page dispatcher
 
 Info servlet text   // from the infoservlet dispatcher
 
 Header form text // from the header.jsp dispatcher
 
 
 tabletr
 
 td/td
 td/td
 /tr/table
 
 /BODY
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


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



jsp include/RequestDispatcher incompatible?

2005-06-28 Thread George Finklang
have the following code in my jsp, which is called by a forward from my
Controller servlet. The various Dispatchers are either servlets or jsps declared
in my web.xml.

All the servlets and jsps get run correctly. The problem is the output. The
output of the root jsp and the 3-4 included jsps are arbitrarily rearranged, see
below. Bizarre shuffling, not reverse order, but a different order and not
interleaved with the text from the jsp. 

If I translate the jsp into servlet code, and use RequestDispatchers
for all the components,
the page works.  The documentation says something about flushing buffers, but I
can't see how to do this with RequestDispatchers.


Code:

BODY
jsp:include page=WEB-INF/jsps/portal/header.jsp flush=true/
% if(option1) {
application.getNamedDispatcher(Option1Servlet).include(request,response);
} else { %
tabletr
% if(option2) { %
td% 
  
application.getNamedDispatcher(Option2Servlet).include(request,response);
%/td
%  } %
td% 
   application.getNamedDispatcher(page).include(request,response); %/td
td% 
   application.getNamedDispatcher(InfoServlet).include(request,response);
%/td
/tr/table
%  } %
/BODY



generated html:

BODY
 
 
Page text  // from the page dispatcher
 
Info servlet text   // from the infoservlet dispatcher
 
Header form text // from the header.jsp dispatcher
 
 
tabletr
 
td/td
td/td
/tr/table
 
/BODY

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



memory issues with live redeploy

2005-06-28 Thread George Finklang
Working with a couple different tomcat 5.0.X versions, I'm having
issues with tomcat's memory footprint increasing when I live redeploy.
 I do this 2 or 3 times and the server runs out of memory, though
normally it can run for weeks without problem.

I can't seem to find direct references to this in the online docs.  Is
it jsp compilation or session state usage (or other things I can
affect)?  Or is it just a known limitation in the container?

--George

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



RE: Servlet Concurrency Issues

2005-06-07 Thread George Sexton
You're probably using instance properties on the servlet object. 

George Sexton
MH Software, Inc.
http://www.mhsoftware.com/
Voice: 303 438 9585
  

 -Original Message-
 From: Michael Pasko [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, June 07, 2005 12:09 PM
 To: 'tomcat-user@jakarta.apache.org'
 Subject: Servlet Concurrency Issues
 
 I've recently developed a servlet that connects to an AS/400, 
 and returns
 results off an sql query based off criteria submitted by a 
 form.  I've had
 pretty much exclusive use of the Tomcat server during 
 development, but when
 I started allowing other users on it, I stumbled on some problems.
 Basically what happens, when user A submits the form, and 
 then 2 seconds
 later user B submits the same form.  User A stops getting 
 results, and User
 B receives the output for his request as well as the end of User A's
 request.  User A is on a different computer than B and both 
 have different
 session ID's.  I'm sure this is a configuration error on my 
 part, but would
 appreciate a direction on where to look.
  
 PS - I create a session if it doesn't exist, and store the 
 username and DB
 connection in it.  (Will use JNDI later) 
  
  
  
  
 I'm using Tomcat 5.5.7
 


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



RE: Poor Performance Tomcat5.5.7, Apache2.0.52, Solaris 9

2005-06-04 Thread George Sexton
It's almost certainly your application.

I would start with findbugs

http://findbugs.sourceforge.net/

And if it doesn't help you sort it out, look at an application profiler.

I run about 40 virtual hosts, with a fairly complex calendar app, that gets
10s of thousands of hits per day, on a PIII 500, and the utilization is
around 5-10% during the day.

George Sexton
MH Software, Inc.
http://www.mhsoftware.com/
Voice: 303 438 9585
  

 -Original Message-
 From: BATCHELOR, SCOTT (CONTRACTOR) [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, June 02, 2005 8:52 AM
 To: tomcat-user@jakarta.apache.org
 Subject: Poor Performance Tomcat5.5.7, Apache2.0.52, Solaris 9
 
 I am hoping someone has experienced this before. 
 
 The installation is a binary install of Tomcat and a binary 
 install of mod_jk 1.2.6 connector.
 
 We have been running performance tests on this install and 
 Tomcat is very, very cpu intensive topping out at 55% of the 
 cpu's on the box. I have never experienced this before and I 
 am having a hard time tracking down the problem.  The 
 application does lookups and updates to an Oracle 9i database 
 and it does use its own homegrown connection pool. But the 
 poor performance seems to be on the web side with server 
 threads climbing up into the four hundreds at times.
 
 I am including portions of my config files hoping that 
 someone will spot something that I am doing wrong.
 
 Httpd.conf:
 
 Timeout 300
 KeepAlive On
 MaxKeepAliveRequests 500
 KeepAliveTimeout 15
 StartServers2
 MaxClients  400
 MinSpareThreads 150
 MaxSpareThreads 300 
 ThreadsPerChild 25
 MaxRequestsPerChild 1 
 AcceptMutex fcntl
 
 Tomcat Server.xml:
 
  !-- Define an AJP 1.3 Connector on port 8009 --
 Connector port=8011 
enableLookups=false redirectPort=8443 
 protocol=AJP/1.3
maxThreads=500 minSpareThreads=75 
 maxSpareThreads=250/
 
  Host name=localhost appBase=webapps
unpackWARs=true autoDeploy=true
xmlValidation=false xmlNamespaceAware=false
 
 Tomcat workers.properties:
 
 worker.ajp13w.type=ajp13
 worker.ajp13w.host=somehost
 worker.ajp13w.port=8011
 worker.ajp13w.cachesize=600
 worker.ajp13w.cache_timeout=600
 
 Can someone tell the correlation of the worker.cachesize and 
 an htptd.conf directive?
 
 Thanks in advance.
 
 -SB
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


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



RE: .pst file type unknown in tomcat

2005-05-30 Thread George Sexton
 .pst file mime type is not decalred by default in web.xml

So, why don't you declare it?

George Sexton
MH Software, Inc.
http://www.mhsoftware.com/
Voice: 303 438 9585
  

 -Original Message-
 From: Marot Laurent [mailto:[EMAIL PROTECTED] 
 Sent: Monday, May 30, 2005 2:33 PM
 To: Tomcat Users List
 Subject: .pst file type unknown in tomcat
 
 
  Hi all,
 
 I'm trying to manage .pst files stored on my Tomcat server. But
 unfortunately when i click on a pst file link it opens the file in a
 pop-up (an of course content is not readable). How could i 
 pevent tomcat
 from serving the file this way  but better propose do save it 
 on user's
 local disk ?
 
 .pst file mime type is not decalred by default in web.xml
 
 
 Thanks a lot
 
 Laurent
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


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



RE: JRE vs. JDK for Tomcat

2005-05-29 Thread George Sexton
If you aren't using JSP, you can change the startup batch file to skip the
test for the full JDK.

George Sexton
MH Software, Inc.
http://www.mhsoftware.com/
Voice: 303 438 9585
  

 -Original Message-
 From: Iannis Hanen [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, May 18, 2005 7:59 PM
 To: tomcat-user@jakarta.apache.org
 Cc: [EMAIL PROTECTED]
 Subject: JRE vs. JDK for Tomcat
 
 Hi,
 
  
 
 It seems that tomcat requires a JDK (and not only a JRE) to be present
 on the physical machine in order to run properly. I am a bit surprised
 that a JDK is also required. Is there a way to run Tomcat on top of a
 JRE only? How do I setup this?
 
  
 
 Thanks,
 
 Iannis
 
 


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



RE: HttpSessionListener

2005-05-26 Thread Randy George

Hi Christopher,

I think I've fixed the problem. I did two things 
1) I renamed the SessionCounter to MyCounter
2) Somehow I had commented out the 
HttpSession session = request.getSession(true);
Once I had a session started everything worked (including the Tomcat Manager
sessions). I am still baffled as to why it continued to work on the
developer server after the session was commented out, but assume it was
cached somehow. I finally noticed it after rebooting the system and finding
the developer server having the same problem. 

A little humbling, but a happy ending. Thanks for your help!

randy


-Original Message-
From: Christoph Kutzinski [mailto:[EMAIL PROTECTED] 
Sent: Thursday, May 26, 2005 2:01 AM
To: Tomcat Users List
Subject: Re: HttpSessionListener

Hi Randy,

Randy George wrote:

Hi Will and Christopher,

   Good thought. I shut down Tomcat and started it again with a clean
set of logs:
localhost.2005-05-25.log
   .
   .
May 25, 2005 11:22:17 AM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
May 25, 2005 11:27:45 AM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: sessionCreated('BD963D7E6AACE0E2387F37919BB277FC')

   I interpret this to show that the listener element in web.xml is
initialized and later a sessionCeated() method was actually called:
  .
  .
public synchronized void sessionCreated (HttpSessionEvent se) {
System.out.println(sessionCreated +sessionCount);
sessionCount++;
}

However, there is no entry in the stout log so whatever sessionCreated
method is called it is not the one registered?
   listener
   listener-classcom.test.SessionCounter/listener-class
   /listener
  

Yes that is my thought, too. There is a SessionListener initialized but 
apparently not yours. You should put a log statement into the 
constructor of your listener and make sure.
You didn't answer my question about deployment: do you deploy your 
application on the development and the production box in the same way. 
If not, you should try to do it in the same way on the devel box as you 
do on the prod box and look if the problem appears on the prod box, too.
Another idea: the name (com.test.SessionCounter) of your listenere is 
not very unique. Maybe there is a conflcit with an existing class in 
Tomcats shared or common folder on the production system. Are there any 
other applications installed on the production tomcat?

I also just noticed that the Tomcat WebApp Manager is showing only 0's for
sessions regardless of how many sessions are started?
  

That is really strange. Are you sure that you are hitting the production 
tomcat with your tests? Any other log entries which could confirm that?


greetings,
Christoph

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


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



RE: HttpSessionListener

2005-05-26 Thread Randy George

Hi Christopher,

I think I've fixed the problem. I did two things 
1) I renamed the SessionCounter to MyCounter
2) Somehow I had commented out the 
HttpSession session = request.getSession(true);
Once I had a session started everything worked (including the Tomcat Manager
sessions). I am still baffled as to why it continued to work on the
developer server after the session was commented out, but assume it was
cached somehow. I finally noticed it after rebooting the system and finding
the developer server having the same problem. 

A little humbling, but a happy ending. Thanks for your help!

randy


-Original Message-
From: Christoph Kutzinski [mailto:[EMAIL PROTECTED] 
Sent: Thursday, May 26, 2005 2:01 AM
To: Tomcat Users List
Subject: Re: HttpSessionListener

Hi Randy,

Randy George wrote:

Hi Will and Christopher,

   Good thought. I shut down Tomcat and started it again with a clean
set of logs:
localhost.2005-05-25.log
   .
   .
May 25, 2005 11:22:17 AM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
May 25, 2005 11:27:45 AM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: sessionCreated('BD963D7E6AACE0E2387F37919BB277FC')

   I interpret this to show that the listener element in web.xml is
initialized and later a sessionCeated() method was actually called:
  .
  .
public synchronized void sessionCreated (HttpSessionEvent se) {
System.out.println(sessionCreated +sessionCount);
sessionCount++;
}

However, there is no entry in the stout log so whatever sessionCreated
method is called it is not the one registered?
   listener
   listener-classcom.test.SessionCounter/listener-class
   /listener
  

Yes that is my thought, too. There is a SessionListener initialized but 
apparently not yours. You should put a log statement into the 
constructor of your listener and make sure.
You didn't answer my question about deployment: do you deploy your 
application on the development and the production box in the same way. 
If not, you should try to do it in the same way on the devel box as you 
do on the prod box and look if the problem appears on the prod box, too.
Another idea: the name (com.test.SessionCounter) of your listenere is 
not very unique. Maybe there is a conflcit with an existing class in 
Tomcats shared or common folder on the production system. Are there any 
other applications installed on the production tomcat?

I also just noticed that the Tomcat WebApp Manager is showing only 0's for
sessions regardless of how many sessions are started?
  

That is really strange. Are you sure that you are hitting the production 
tomcat with your tests? Any other log entries which could confirm that?


greetings,
Christoph

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


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



RE: HttpSessionListener

2005-05-25 Thread Randy George
Hi Jacob,

Thanks for the reply.

My situation is a little more straightforward than the replication
cluster you are dealing with. In my case the first server is simply the
development environment and the second server is the production deployment
server. The two environments use identical OS and Tomcat so I am baffled at
why HttpSessionListener will only work on the server used for development.

Thanks
Randy

-Original Message-
From: Jacob Champlin [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 25, 2005 8:51 AM
To: tomcat-user@jakarta.apache.org
Subject: Re: HttpSessionListener

Randy,

I don't believe you have session replication set up in your cluster.  
This is why when a session is created it only calls your 
HttpSessionListener on one box.  The second box will only get the 
session if its replicated over to that box.

However!  I tried to do the same thing and I was getting server lockups 
when it a cluster.  The HttpSessionListener would work fine on a single 
box, but in a cluster both servers would lock up.

It is my belief that there is some concurrency issue in Tomcat/Session 
Replication/HttpSessionListeners.  However, I never found anything firm, 
as is usually the case with concurrency issues.

Well I would love to hear if you get this working.

Jacob Champlin
EMO Corporation

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


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



RE: HttpSessionListener

2005-05-25 Thread Randy George
Hi Jacob,

Thanks for the reply.

My situation is a little more straightforward than the replication
cluster you are dealing with. In my case the first server is simply the
development environment and the second server is the production deployment
server. The two environments use identical OS and Tomcat so I am baffled at
why HttpSessionListener will only work on the server used for development.

Thanks
Randy

-Original Message-
From: Jacob Champlin [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 25, 2005 8:51 AM
To: tomcat-user@jakarta.apache.org
Subject: Re: HttpSessionListener

Randy,

I don't believe you have session replication set up in your cluster.  
This is why when a session is created it only calls your 
HttpSessionListener on one box.  The second box will only get the 
session if its replicated over to that box.

However!  I tried to do the same thing and I was getting server lockups 
when it a cluster.  The HttpSessionListener would work fine on a single 
box, but in a cluster both servers would lock up.

It is my belief that there is some concurrency issue in Tomcat/Session 
Replication/HttpSessionListeners.  However, I never found anything firm, 
as is usually the case with concurrency issues.

Well I would love to hear if you get this working.

Jacob Champlin
EMO Corporation

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


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



RE: HttpSessionListener

2005-05-25 Thread Randy George
Hi Will and Christopher,

Good thought. I shut down Tomcat and started it again with a clean
set of logs:
localhost.2005-05-25.log
   .
   .
May 25, 2005 11:22:17 AM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
May 25, 2005 11:27:45 AM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: sessionCreated('BD963D7E6AACE0E2387F37919BB277FC')

I interpret this to show that the listener element in web.xml is
initialized and later a sessionCeated() method was actually called:
  .
  .
public synchronized void sessionCreated (HttpSessionEvent se) {
System.out.println(sessionCreated +sessionCount);
sessionCount++;
}

However, there is no entry in the stout log so whatever sessionCreated
method is called it is not the one registered?
listener
listener-classcom.test.SessionCounter/listener-class
/listener

I also just noticed that the Tomcat WebApp Manager is showing only 0's for
sessions regardless of how many sessions are started?

Thanks
Randy

-Original Message-
From: Will Hartung [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 25, 2005 10:46 AM
To: Tomcat Users List
Subject: Re: HttpSessionListener

 From: Christoph Kutzinski [EMAIL PROTECTED]
 Sent: Wednesday, May 25, 2005 9:04 AM

 I suspect that the Listener class is not found on the production server.
 You should check your deployment. Are you deplyoing via WAR files in
 both cases?

Yea, I would make sure that your listener is even being instantiated.

Tomcat is pretty quiet with things like Listners, it doens't write error or
output where you typically see it for you application.

Check all of your logs to make sure the class is loading and starting up
correctly.

Regards,

Will Hartung
([EMAIL PROTECTED])


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


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



RE: HttpSessionListener

2005-05-25 Thread Randy George
Hi Will and Christopher,

Good thought. I shut down Tomcat and started it again with a clean
set of logs:
localhost.2005-05-25.log
   .
   .
May 25, 2005 11:22:17 AM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
May 25, 2005 11:27:45 AM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: sessionCreated('BD963D7E6AACE0E2387F37919BB277FC')

I interpret this to show that the listener element in web.xml is
initialized and later a sessionCeated() method was actually called:
  .
  .
public synchronized void sessionCreated (HttpSessionEvent se) {
System.out.println(sessionCreated +sessionCount);
sessionCount++;
}

However, there is no entry in the stout log so whatever sessionCreated
method is called it is not the one registered?
listener
listener-classcom.test.SessionCounter/listener-class
/listener

I also just noticed that the Tomcat WebApp Manager is showing only 0's for
sessions regardless of how many sessions are started?

Thanks
Randy

-Original Message-
From: Will Hartung [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 25, 2005 10:46 AM
To: Tomcat Users List
Subject: Re: HttpSessionListener

 From: Christoph Kutzinski [EMAIL PROTECTED]
 Sent: Wednesday, May 25, 2005 9:04 AM

 I suspect that the Listener class is not found on the production server.
 You should check your deployment. Are you deplyoing via WAR files in
 both cases?

Yea, I would make sure that your listener is even being instantiated.

Tomcat is pretty quiet with things like Listners, it doens't write error or
output where you typically see it for you application.

Check all of your logs to make sure the class is loading and starting up
correctly.

Regards,

Will Hartung
([EMAIL PROTECTED])


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


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



Re: HttpSessionListener

2005-05-24 Thread Randy George
Hello,

 

I have two identical Tomcat 5.5.9 servers setup on two different Windows
servers. 

 

On one the HttpSessionListener which I am using to count active sessions
works fine. However on the second it appears that the HttpSessionListener is
never notified of sessionCreated or sessionDestroyed events?

 

I have identical webapps/TestCounter as well as identical conf/server.xml
and conf/web.xml files

 

The application web.xml contains a listener element:

 

  listener

listener-classtest.SessionCounter/listener-class

  /listener

 

Is there some additional setting or authorization required to make the
Session Listener work on the second system?

 

Thanks



Re: HttpSessionListener

2005-05-24 Thread Randy George
Hello,

 

I have two identical Tomcat 5.5.9 servers setup on two different Windows
servers. 

 

On one the HttpSessionListener which I am using to count active sessions
works fine. However on the second it appears that the HttpSessionListener is
never notified of sessionCreated or sessionDestroyed events?

 

I have identical webapps/TestCounter as well as identical conf/server.xml
and conf/web.xml files

 

The application web.xml contains a listener element:

 

  listener

listener-classtest.SessionCounter/listener-class

  /listener

 

Is there some additional setting or authorization required to make the
Session Listener work on the second system?

 

Thanks



RE: filesystem independent tomcat [OT]

2005-05-02 Thread George Sexton
You could probably do it, but at the end you wouldn't have a servlet engine.

The spec EXPLICITLY states that java.io.tmpdir must be writable. Are you
allowing file uploads? Commons-fileupload uses that area for disk file
upload. Are you creating PDF output? Some packages use  the area for
temporary file space.

George Sexton
MH Software, Inc.
http://www.mhsoftware.com/
Voice: 303 438 9585
  

 -Original Message-
 From: sandy kumar [mailto:[EMAIL PROTECTED] 
 Sent: Friday, April 29, 2005 2:56 AM
 To: Tomcat Users List
 Subject: filesystem independent tomcat [OT]
 
 
 Hi,
 
 I am doing some exploratory work on tomcat and was
 wondering If anyone has felt the need for tomcat which
 can be loaded across the network and doesnt rely on
 the underlying filesystem in anyway including the
 temporary work directory, logging, catalina_home,
 catalina_base etc ?
 
 Is there any such version already out there? If not,
 then does it break any servlet/jsp specs ?
 
 Thanks for your replies.
 
 cheers,
 sandie
 
 Send instant messages to your online friends 
 http://uk.messenger.yahoo.com 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


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



RE: non-root on 80

2005-04-04 Thread George Sexton
In Linux, the workaround is to run on port 8080, and then write an IPTables
rule to forward port 80 to 8080.

George Sexton
MH Software, Inc.
http://www.mhsoftware.com/
Voice: 303 438 9585
  

 -Original Message-
 From: news [mailto:[EMAIL PROTECTED] On Behalf Of NetSQL
 Sent: Monday, April 04, 2005 2:15 PM
 To: tomcat-user@jakarta.apache.org
 Subject: non-root on 80
 
 apache drops to non root after bind to 80.
 How can this be done w/ tc 5.5?
 .V
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


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



RE: Wild Card Hosting

2005-03-24 Thread George Sexton
That doesn't do what I need. I have a very large, existing application that
needs to pick up a parameter based on which host name is used. Changing the
path structure will be hopelessly complicated.

The issue of getting the DNS wild-carding to work is the client's issue.

George Sexton
MH Software, Inc.
http://www.mhsoftware.com/
Voice: 303 438 9585
  

 -Original Message-
 From: Rob Hunt [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, March 24, 2005 9:02 AM
 To: tomcat-user@jakarta.apache.org
 Subject: Re: Wild Card Hosting
 
 There are some domain-name-registrars/DNS-providers that 
 allow you to set up a wildcard host where their domain name 
 servers will dynamically redirect HTTP requests.  For example:
 
 http://*.domain.tld/  
 
 could be redirected to something like 
 
 http://mywildcardhost.domain.tld/%SERVER_NAME%/ 
 
 
 where %SERVER_NAME% would take on the whatever host was 
 originally used in the HTTP request.  It's then a simple task 
 of using a wildcard url-pattern/ servlet mapping (/* in 
 this example) to direct the request accordingly.
 
 This obviates the need to customize Tomcat code.  However, 
 you'll probably need a nominal monetary outlay to use the 
 services of said DDNS provider.
 
 
 
 Read more:  http://www.changeip.com/
 


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



RE: Wild Card Hosting

2005-03-24 Thread George Sexton
Right now I'm running tomcat with 40 some virtual hosts without using
Apache. Throwing in the additional configuration/complication issue of
dealing with Apache isn't my preferred route.

It would be a lot simpler to add regex support to the aliases function of
tomcat.

If worst comes to worse, I'll just make an alias for the various hosts. It's
probably going to top at at around 6-10 anyway.

George Sexton
MH Software, Inc.
http://www.mhsoftware.com/
Voice: 303 438 9585
  

 -Original Message-
 From: Robert r. Sanders [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, March 24, 2005 9:26 AM
 To: Tomcat Users List
 Subject: Re: Wild Card Hosting
 
 You might also be able to do something similar by using 
 Apache httpd as 
 frontend and combining mod_jk with either mod_vhost or mod_rewrite.
 
 Rob Hunt wrote:
 
 There are some domain-name-registrars/DNS-providers that 
 allow you to set up a wildcard host where their domain name 
 servers will dynamically redirect HTTP requests.  For example:
 
 http://*.domain.tld/  
 
 could be redirected to something like 
 
 http://mywildcardhost.domain.tld/%SERVER_NAME%/ 
 
 
 where %SERVER_NAME% would take on the whatever host was 
 originally used in the HTTP request.  It's then a simple task 
 of using a wildcard url-pattern/ servlet mapping (/* in 
 this example) to direct the request accordingly.
 
 This obviates the need to customize Tomcat code.  However, 
 you'll probably need a nominal monetary outlay to use the 
 services of said DDNS provider.
 
 
 
 Read more:  http://www.changeip.com/
   
 
 
 -- 
 Robert r. Sanders
 Chief Technologist
 iPOV
 (334) 821-5412
 www.ipov.net
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


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



RE: Problem migrating from 4.1.30 to 5.5.7

2005-03-24 Thread George Sexton
The 

conf/serviceName/hostname

directory

George Sexton
MH Software, Inc.
http://www.mhsoftware.com/
Voice: 303 438 9585
  

 -Original Message-
 From: Hay, Markus [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, March 24, 2005 11:10 AM
 To: tomcat-user@jakarta.apache.org
 Subject: Problem migrating from 4.1.30 to 5.5.7
 
 I'm in the process of testing our Java-based application on a newer
 version of Tomcat and it appears some significant changes have been
 made. In Tomcat 4.1.30, I was able to drop a application.xml 
 file in the
 webapps directory and it would redirect to the application by using
 http://localhost/appname, which is installed to c:\program
 files\application_name\html. Now I'm trying to accomplish the 
 same with
 5.5.7, but I'm not sure where to put this application.xml file, which
 has the context path defined. Is it as simple as putting this 
 file in a
 different directory or do I need to modify other xml files in the new
 version of Tomcat?
 
 Thanks in advance for any help.
 
 - Markus
 


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



RE: Wild Card Hosting

2005-03-24 Thread George Sexton
Well, yes the machine has a fixed IP address.

I don't care about the DNS resolution aspect. I want tomcat to wildcard
forward to the right virtual host based on the name.

George Sexton
MH Software, Inc.
http://www.mhsoftware.com/
Voice: 303 438 9585
  

 -Original Message-
 From: Drew Jorgenson [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, March 24, 2005 4:14 PM
 To: Tomcat Users List
 Subject: Re: Wild Card Hosting
 
 Are you able to assign a static IP address to your virtual 
 host, meaning
 do you have a static IP available?
 
 Drew.
 
 
 On Wed, 2005-03-23 at 10:42, George Sexton wrote:
  Does anyone know if Tomcat supports Wild card hosting? Can 
 I specify a
  pattern say
  
  *.domain.com
  
  And have all requests get forwarded to a specific host?
  
  Making the host the default host is not an option, because 
 there is already
  another default host that is used.
  
  
  
  George Sexton
  MH Software, Inc.
  http://www.mhsoftware.com/
  Voice: 303 438 9585
   
  
  
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


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



RE: Wild Card Hosting

2005-03-24 Thread George Sexton
Oh, I see where you are headed. 

One way to go would be to have a new service, with a new IP address, and
make that the default host.

That's out of the question since I host for so many people.

George Sexton
MH Software, Inc.
http://www.mhsoftware.com/
Voice: 303 438 9585
  

 -Original Message-
 From: Drew Jorgenson [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, March 24, 2005 4:14 PM
 To: Tomcat Users List
 Subject: Re: Wild Card Hosting
 
 Are you able to assign a static IP address to your virtual 
 host, meaning
 do you have a static IP available?
 
 Drew.
 
 
 On Wed, 2005-03-23 at 10:42, George Sexton wrote:
  Does anyone know if Tomcat supports Wild card hosting? Can 
 I specify a
  pattern say
  
  *.domain.com
  
  And have all requests get forwarded to a specific host?
  
  Making the host the default host is not an option, because 
 there is already
  another default host that is used.
  
  
  
  George Sexton
  MH Software, Inc.
  http://www.mhsoftware.com/
  Voice: 303 438 9585
   
  
  
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


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



Wild Card Hosting

2005-03-23 Thread George Sexton
Does anyone know if Tomcat supports Wild card hosting? Can I specify a
pattern say

*.domain.com

And have all requests get forwarded to a specific host?

Making the host the default host is not an option, because there is already
another default host that is used.



George Sexton
MH Software, Inc.
http://www.mhsoftware.com/
Voice: 303 438 9585
 


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



RE: Wild Card Hosting

2005-03-23 Thread George Sexton
I'll try looking through the alias handling code and see how hard it would
be to come up with something to cover it.

George Sexton
MH Software, Inc.
http://www.mhsoftware.com/
Voice: 303 438 9585
  

 -Original Message-
 From: QM [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, March 23, 2005 5:09 PM
 To: Tomcat Users List
 Subject: Re: Wild Card Hosting
 
 On Wed, Mar 23, 2005 at 11:42:09AM -0700, George Sexton wrote:
 : Does anyone know if Tomcat supports Wild card hosting? Can 
 I specify a
 : pattern say
 : 
 : *.domain.com
 : 
 : And have all requests get forwarded to a specific host?
 
 Not possible with a stock Tomcat install.
 Perhaps possible with some source tweakage, but then you have 
 the fun of
 running a custom install.
 
 -QM
 
 -- 
 
 software   -- http://www.brandxdev.net/
 tech news  -- http://www.RoarNetworX.com/
 code scan  -- http://www.JxRef.org/
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


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



Document xmlValidation for Host

2005-03-22 Thread George Sexton
I noticed on the page:

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

That xmlValidation is not documented on the host page. 

Also, it tools like xmlNameSpace is another attribute not documented.


George Sexton
MH Software, Inc.
http://www.mhsoftware.com/
Voice: 303 438 9585
 


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



Documentation Change Recommendation for Logging

2005-03-21 Thread George Sexton

For the page:

http://jakarta.apache.org/tomcat/tomcat-5.5-doc/logging.html

For the sample log4j.properties file, I would recommend changing:

log4j.appender.R.File=${catalina.home}/logs/tomcat.log

To

log4j.appender.R.File=${catalina.base}/logs/tomcat.log


George Sexton
MH Software, Inc.
http://www.mhsoftware.com/
Voice: 303 438 9585
 


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



RE: servlet api question ?

2005-03-21 Thread George Sexton
I have customers running my software on 

WebSphere
WebLogic
Orion/Oracle 9iAS
Tomcat
Resin
Jrun

With no specific modifications for any specific product. If you want to sell
into an enterprise market, the ability to run on various enterprise servers
is a winner.

George Sexton
MH Software, Inc.
http://www.mhsoftware.com/
Voice: 303 438 9585
  

 -Original Message-
 From: brian [mailto:[EMAIL PROTECTED] 
 Sent: Monday, March 21, 2005 9:32 AM
 To: tomcat list
 Subject: servlet api question ?
 
 What are the advantages or the reason for the popularity of 
 servlet api vis-a-vis the web server specific api ?
 
 Say Netscape server or IIS server also have their own 
 specific api's as well where one could write server side 
 code. But the servlet api is so popular and wide spread and 
 one could argue that java sdk is free but then companies buy 
 the third party j2ee servers like websphere or weblogic. (why
 ?? what is the real reason or advantages of servlet api
 
 
 
   
 __ 
 Do you Yahoo!? 
 Make Yahoo! your home page 
 http://www.yahoo.com/r/hs
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


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



Admin Application

2005-03-21 Thread George Sexton
I'm hitting the error below with tomcat 5.5.8

This happens when I click on any object contained in a service (Host,
connector, etc). Clicking on a resource and the user database works.

The server.xml is at:

http://www.mhsoftware.com/~gsexton/server.xml

And the admin.xml is:

http://www.mhsoftware.com/~gsexton/admin.xml



 ERROR http-8080-Processor4
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/admin] -
action: Error retrieving attribute debug
 javax.management.AttributeNotFoundException:  Cannot find attribute debug
at
org.apache.commons.modeler.BaseModelMBean.getAttribute(BaseModelMBean.java:3
06)
at
mx4j.server.interceptor.InvokerMBeanServerInterceptor.getAttribute(InvokerMB
eanServerInterceptor.java:244)
at
mx4j.server.interceptor.DefaultMBeanServerInterceptor.getAttribute(DefaultMB
eanServerInterceptor.java:135)
at
mx4j.server.interceptor.SecurityMBeanServerInterceptor.getAttribute(Security
MBeanServerInterceptor.java:106)
at
mx4j.server.interceptor.DefaultMBeanServerInterceptor.getAttribute(DefaultMB
eanServerInterceptor.java:135)
at
mx4j.server.interceptor.DefaultMBeanServerInterceptor.getAttribute(DefaultMB
eanServerInterceptor.java:135)
at
mx4j.server.interceptor.ContextClassLoaderMBeanServerInterceptor.getAttribut
e(ContextClassLoaderMBeanServerInterceptor.java:269)
at
mx4j.server.MX4JMBeanServer.getAttribute(MX4JMBeanServer.java:1002)
at
org.apache.webapp.admin.service.EditServiceAction.perform(EditServiceAction.
java:173)
at org.apache.struts.action.Action.execute(Action.java:420)
at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProces
sor.java:484)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:252)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:173)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:213)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:178)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase
.java:482)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126
)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105
)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:526)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:107)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:825)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java:743)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.jav
a:527)
at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWo
rkerThread.java:80)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:684)
at java.lang.Thread.run(Thread.java:534)

George Sexton
MH Software, Inc.
http://www.mhsoftware.com/
Voice: 303 438 9585
 


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


RE: POST no longer working

2005-03-17 Thread George Sexton
You might want to refer to this FAQ:

http://www.catb.org/~esr/faqs/smart-questions.html

The stated goal of the FAQ is:

How to ask questions of hackers in a way that makes it most likely that
you'll get a useful answer.

George Sexton
MH Software, Inc.
http://www.mhsoftware.com/
Voice: 303 438 9585
  

 -Original Message-
 From: Jimmy Ray [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, March 17, 2005 7:46 AM
 To: tomcat-user@jakarta.apache.org
 Subject: POST no longer working
 
 Tomcat 5.0.28 on HP UNIX:  I was using a filter
 (jcfifs) in one of my web.xml files.  I have since
 removed the filter and all code refering to it.  Now
 web forms can not post to servlets in this app.  GET
 methods work fine, but POST does not.  I am only using
 Tomcat, no Apache front end.  Is there a security
 settings that I missed or otherwise boogered up?
 
 Regards,
 
 Jimmy Ray
 
 
   
 __ 
 Do you Yahoo!? 
 Read only the mail you want - Yahoo! Mail SpamGuard. 
 http://promotions.yahoo.com/new_mail 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


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



RE: image upload

2005-03-15 Thread George Sexton
I think most people are moving to the Jakarta Commons File Upload jar.

George Sexton
MH Software, Inc.
http://www.mhsoftware.com/
Voice: 303 438 9585
  

 -Original Message-
 From: Shannon Scott [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, March 15, 2005 10:07 AM
 To: tomcat-user@jakarta.apache.org
 Subject: image upload
 
 I have been preparing to write a servlet to handle image uploads.
 It looks like most people are using the latest cos[date].jar file from
 http://www.servlets.com/cos/index.html
 Is this still the recommended method?
 Are there any security concerns that I should address?
  
 Thank you for any help.
 Take Care.
  
  
  
 


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



RE: Too many open files exception

2005-03-14 Thread George Sexton
Most likely, you are not properly closing resources like files and such, and
a change in the Garbage collection is hurting you.

My advice would be to run findbugs and fix any issues it points out.

http://findbugs.sourceforge.net/


George Sexton
MH Software, Inc.
http://www.mhsoftware.com/
Voice: 303 438 9585
  

 -Original Message-
 From: Moderate Extremist [mailto:[EMAIL PROTECTED] 
 Sent: Friday, March 11, 2005 5:38 AM
 To: tomcat-user@jakarta.apache.org
 Subject: Too many open files exception
 
 A coworker of mine had a Tomcat-driven site switched over to JVM 1.4.2
 from JVM 1.3.1.  He got an email from the client about two hours later
 saying they were getting a bunch of errors:
 
 Internal Servlet Error:
 
 javax.servlet.ServletException: common.cException: common.cException:
 java.io.FileNotFoundException: 
 /space/icrp/WEB-INF/icrp.properties (Too
 many open files)
 at
 org.apache.jasper.runtime.PageContextImpl.handlePageException(
 PageContextImpl.java:461)
 at
 _0002ferror_0002ejsperror_jsp_5._jspService(_0002ferror_0002ej
 sperror_jsp_5.java:187)
 at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
 ...
 Root cause:
 
 common.cException: common.cException: common.cException:
 java.io.FileNotFoundException: 
 /space/icrp/WEB-INF/icrp.properties (Too
 many open files)
 at common.cUtils.closeConnections(cUtils.java:871)
 at
 _0002ferror_0002ejsperror_jsp_5._jspService(_0002ferror_0002ej
 sperror_jsp_5.java:177)
 at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
 ...
 
 After he got the email he restarted the site only to have it 
 behave in a
 similar fashion over half an hour later.  We scoured online 
 with the above
 Java error msg to no avail.
 
 My initial thought was to peruse the Apache logs to see if there were
 entries that correlated to when the crashes occured and what were the
 resulting message; this is what I found:
 
 143.65.99.20 - - [07/Mar/2005:20:38:51 -0500] GET 
 /wizsearch.jsp?add=...
 HTTP/1.1 500 612 http://www...; Mozilla/4.0 (compatible; MSIE 6.0;
 Windows NT 5.1)
 217.44.173.38 - - [07/Mar/2005:20:38:51 -0500] GET
 /abstract.jsp?SID=67466ProjectID=164428 HTTP/1.1 500 612
 http://www.../projectlist.jsp?SID=67466ShowCart=false; Mozilla/5.0
 (Macintosh; U; PPC Mac OS X; en-gb) AppleWebKit/125.5.5 (KHTML, like
 Gecko) Safari/125.12
 212.174.145.126 - - [07/Mar/2005:20:38:51 -0500] GET / 
 HTTP/1.1 500 607
 - Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5)
 Gecko/20041107 Firefox/1.0
 169.142.1.1 - - [07/Mar/2005:20:38:51 -0500] GET 
 /servlet/search/?CSO=5.5
 HTTP/1.1 302 448 http://www.google.com/search?q=...; Mozilla/4.0
 (compatible; MSIE 6.0; Windows 98)
 
 62.128.179.3 - - [08/Mar/2005:08:23:57 -0500] GET 
 /error.jsp?SID=68030
 HTTP/1.1 500 612 http://www.../projectlist.jsp?SID=68030; 
 Mozilla/4.0
 (compatible; MSIE 6.0; Windows NT 5.0)
 62.128.179.2 - - [08/Mar/2005:08:23:57 -0500] GET 
 /error.jsp?SID=68031
 HTTP/1.0 500 600 http://www.../wizsearch.jsp?add=...; Mozilla/4.0
 (compatible; MSIE 6.0; Windows NT 5.0)
 
 [Mon Mar  7 20:38:51 2005] [info] [client 169.142.1.1] 
 (32)Broken pipe:
 client stopped connection before rflush completed
 [Mon Mar  7 20:38:51 2005] [info] [client 217.44.173.38] 
 (32)Broken pipe:
 client stopped connection before rflush completed
 [Mon Mar  7 20:38:51 2005] [info] [client 143.65.99.20] 
 (32)Broken pipe:
 client stopped connection before rflush completed
 [Mon Mar  7 20:38:51 2005] [info] [client 212.174.145.126] (32)Broken
 pipe: client stopped connection before rflush completed
 
 [Tue Mar  8 08:23:57 2005] [info] [client 62.128.179.3] 
 (32)Broken pipe:
 client stopped connection before rflush completed
 [Tue Mar  8 08:23:57 2005] [info] [client 62.128.179.2] 
 (32)Broken pipe:
 client stopped connection before rflush completed
 
 I found out the rflush message normally meant that a user 
 has pressed
 the browser's stop button, but to have the same messages appear
 simultaneously 25-30 times from the same 2-4 IPs seems kind 
 of fishy.  I
 did a nslookup and I don't think those IPs belong to indexing 
 services.
 Has anyone seen anything like this, and if so, what does this 
 mean?  What
 kind of problems normally manifest itself through Too many 
 open files
 messages?  And is this really a Tomcat problem, Apache problem, or a
 problem caused by
 something else?
 
 BTW this site is currently using Apache 1.3.26 and Tomcat 
 3.2.4; would we
 be able to get rid of this issue if we started using Apache 
 2.0.xx and/or
 a new version of Tomcat?
 
 Thanks
 
 --
 
 
 Joe Tseng
 
 I can be Googled.  Therefore I am.
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


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



RE: tomcat freezes when accessing db after several queries

2005-03-14 Thread George Sexton
Look for something like this:

Try {
statement.execUupdate(some statement);
} catch (SQLException se){
}


Make sure that the catch has:

conn.rollback();

In JDBC, a failed update leaves the underlying record locked until it is
rolled back.



George Sexton
MH Software, Inc.
http://www.mhsoftware.com/
Voice: 303 438 9585
  

 -Original Message-
 From: Larry Johnson [mailto:[EMAIL PROTECTED] 
 Sent: Monday, March 14, 2005 2:39 PM
 To: tomcat-user@jakarta.apache.org
 Subject: tomcat freezes when accessing db after several queries
 
 Hi all,
 
   I've encountered a rather strange error that I need some help
 getting to the bottom of. Recently I lost the hard drive on 
 one of my tomcat
 application servers. I've since reinstalled and set everything on the
 effected machine to mirror the configuration of my other app 
 servers (which
 are working fine). However, now when I access the webapp on 
 this server
 tomcat seems to freeze (like it's waiting for something) after several
 queries to the database are executed. After this happens I am 
 unable to
 shutdown tomcat without finding the process number and 
 terminating it using
 kill -9 as shutdown.sh fails to halt execution. This seems 
 pretty strange to
 me since one, the problem occurs without any errors appearing in
 catalina.out or the localhost_log files and two the webapp is 
 able to access
 the DB with several queries before it encounters any 
 problems. Does anyone
 have any ideas what may be causing this to happen?
 
 Thanks in advance,
 
 Larry 
 
 Here's some info about my runtime environment:
 
 OS: Redhat 9
 Tomcat: 5.0.28
 JVM: 1.5.02
 DB: Oracle 9i
 
 Here's the JDBC connection pool XML I'm using:
 
 ?xml version='1.0' encoding='utf-8'? 
 Context docBase=/opt/tomcat/webapps/jupiter path= cookies=false
 workDir=work/Catalina/localhost/jupiter 
   Resource auth=Container description=Oracle datasource pool.  See
 server.xml file. name=jdbc/EnvictusDB 
 type=javax.sql.DataSource/ 
   ResourceParams name=jdbc/EnvictusDB 
 parameter 
   namefactory/name 
   valueorg.apache.commons.dbcp.BasicDataSourceFactory/value 
 /parameter 
 parameter 
   namepassword/name 
   value3nv1ctus/value 
 /parameter 
 parameter 
   nameurl/name 
   valuejdbc:oracle:thin:@11.10.10.1:1521:dbname/value 
 /parameter 
 parameter 
   namedriverClassName/name 
   valueoracle.jdbc.driver.OracleDriver/value 
 /parameter 
 parameter 
   namemaxActive/name 
   value0/value 
 /parameter 
 parameter 
   namemaxIdle/name 
   value40/value 
 /parameter 
 parameter 
   namemaxWait/name 
   value15000/value 
 /parameter 
 parameter 
   nameusername/name 
   valueenvictus/value 
 /parameter 
 parameter  
   nameremoveAbandoned/name  
   valuetrue/value  
 /parameter   
 parameter  
   nameremovedAbandonedTimeout/name  
   value60/value  
 /parameter  
   /ResourceParams 
 /Context
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


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



RE: Date parsing

2005-03-08 Thread George Sexton
I wrote my own date handling class, and it will do what you are looking for:

Essentially, to provide a picture for the users you pass in the locale to
SaneDate.getDateFormat().

To parse the date, 

try {
new SaneDate(request.getParameter(parm),lc);
} catch (InvalidDateException ide) {
}


http://www.mhsoftware.com/resources/jar/doc/com/MHSoftware/dates/SaneDate.ht
ml

You can download it from:

http://www.mhsoftware.com/bin/MHS.zip


George Sexton
MH Software, Inc.
http://www.mhsoftware.com/
Voice: 303 438 9585
  

 -Original Message-
 From: Charles P. Killmer [mailto:[EMAIL PROTECTED] 
 Sent: Monday, March 07, 2005 11:17 AM
 To: Tomcat Users List
 Subject: Date parsing
 
 I have an object with a TimeStamp member.  This will be populated by
 users of a website and entered into a database.
  
 My problem is, I would like to allow the users to enter the date in a
 number of formats.  Does anyone have any recommendations aside from
 multiple try catch blocks each trying to parse the given date with a
 different expected format?
  
 Thanks you for any help,
 Charles Killmer
  
 


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



RE: Date parsing

2005-03-08 Thread George Sexton
Well because of the ambiguities you have to have some expectation of what
format the date will be in.

What date is 05/12/2005? In the US its May 12th. In Britain it's December
5th. You have to have some expectation and validate against it. 

The software is designed to use a Locale as an aid to parsing to set up the
expectation. In our software, we use the browser's accept-language to
retreive a locale.

The class as designed doesn't handle times. It's strictly a date class. Im
thinking about writing a date/time class, but haven't yet.

George Sexton
MH Software, Inc.
http://www.mhsoftware.com/
Voice: 303 438 9585
  

 -Original Message-
 From: Charles P. Killmer [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, March 08, 2005 10:16 AM
 To: Tomcat Users List
 Subject: RE: Date parsing
 
 This has a bunch of useful methods in it.  Thank you.
 
 However what I am looking for is some class that can handle a 
 date/time
 string in many different formats and return a date/time object back to
 me.  I tried your code with 3/1/2005 and it worked fine.  3-1-2005 did
 not.  This probably means that locale change is required.  
 Also I tried
 3/1/2005 11:45 am, and that failed as well.  I am assuming 
 this code was
 not meant to handle time as well as the date portion.
 
 Am I using your code incorrectly, or should I be looking at some other
 code?
 
 Thank You
 Charles 
 
 -Original Message-
 From: George Sexton [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, March 08, 2005 9:39 AM
 To: 'Tomcat Users List'
 Subject: RE: Date parsing
 
 I wrote my own date handling class, and it will do what you 
 are looking
 for:
 
 Essentially, to provide a picture for the users you pass in the locale
 to SaneDate.getDateFormat().
 
 To parse the date, 
 
 try {
 new SaneDate(request.getParameter(parm),lc);
 } catch (InvalidDateException ide) {
 }
 
 
 http://www.mhsoftware.com/resources/jar/doc/com/MHSoftware/dat
 es/SaneDat
 e.ht
 ml
 
 You can download it from:
 
 http://www.mhsoftware.com/bin/MHS.zip
 
 
 George Sexton
 MH Software, Inc.
 http://www.mhsoftware.com/
 Voice: 303 438 9585
   
 
  -Original Message-
  From: Charles P. Killmer [mailto:[EMAIL PROTECTED]
  Sent: Monday, March 07, 2005 11:17 AM
  To: Tomcat Users List
  Subject: Date parsing
  
  I have an object with a TimeStamp member.  This will be 
 populated by 
  users of a website and entered into a database.
   
  My problem is, I would like to allow the users to enter the 
 date in a 
  number of formats.  Does anyone have any recommendations aside from 
  multiple try catch blocks each trying to parse the given 
 date with a 
  different expected format?
   
  Thanks you for any help,
  Charles Killmer
   
  
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


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



RE: Question for Tomcat Developers - How to Plug In Encryption for JDBC passwords

2005-02-28 Thread George Sexton
Your argument about short duration attacks is optimistic at best. Most
systems are so poorly secured and monitored, that breakins aren't detected
anywhere near that quickly.

Let's face reality here. The only safe way to hide the JDBC information is
to have the SECRET (encryption password) not available on the server. Any
other method is not secure, it is just obfuscation. The tomcat developers
quite rightly are refusing to implement any kind of scheme that isn't
correct.

Look at the startup sequence for Apache using SSL certificates. You have to
type in the password for the private key.

If you really want to do this, then you will need to have your application
startup have a method that permits an operator to enter in the password for
the JDBC information at startup. This means that every time your application
is re-started, an operator will have to re-enter the information before the
application can run.

I'd really suggest you purchase and read Bruce Schneir's book Applied
Cryptography. Plan on spending a several evenings with it.

Just for grins, here's a link to a Javadoc for a crypto system that I
designed for a shopping cart. The overriding design goal was to ensure that
credit card data would not be revealed even if the database were
compromised. I don't see any shortcomings in it, but I haven't opened it up
to public review before.

http://www.mhsoftware.com/~gsexton/Crypto.html


George Sexton
MH Software, Inc.
http://www.mhsoftware.com/
Voice: 303 438 9585
  

 -Original Message-
 From: Edmon Begoli [mailto:[EMAIL PROTECTED] 
 Sent: Sunday, February 27, 2005 1:15 AM
 To: Tomcat Users List
 Subject: Re: Question for Tomcat Developers - How to Plug In 
 Encryption for JDBC passwords
 
 
 Please do not start the flame war. Check what I have to say. 
 I am really 
 not a beginner in this area.
 
 First, feature I mentioned is commonly implemented on every major 
 application server platform that I know- JBoss, WebSphere, WebLogic, 
 Oracle AS.


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



RE: Capitalizing names OT

2005-02-18 Thread George Sexton
If you are doing proper names, it's a lot harder than that. Some issues with
names are:

The Mac names

McNeil, McKendry, and the other variants that are Mac.

Names that contain an apostrophe

O'Hara, O'Neil

Then you have Generational qualifiers,

III, IV, V


George Sexton
MH Software, Inc.
http://www.mhsoftware.com/
Voice: 303 438 9585
  

 -Original Message-
 From: David Short [mailto:[EMAIL PROTECTED] 
 Sent: Friday, February 18, 2005 3:29 PM
 To: Tomcat Users Group (E-mail)
 Subject: Capitalizing names OT
 
 Does anyone know if there is an equivalent to the Oracle 
 Initcap() function?
 I am trying to write a database independent name 
 capitalization routine.
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


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



RE: Tale of two servers

2005-02-11 Thread George Sexton
The most common thing for this kind of issue is DNS resolution.

George Sexton
MH Software, Inc.
http://www.mhsoftware.com/
Voice: 303 438 9585
  

 
 On Thu, 10 Feb 2005 01:19:10 -0800 (PST), Dola Woolfe
 [EMAIL PROTECTED] wrote:
  The offender is a super duper new dell desktop with
  4gb of ram, etc. It's running java 1.5 and is
  committed to nothing by tomcat.
  
  The winner is a rinky-dink 2 year old laptop with
  little ram, and lots of spyware sucking out cpu.


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



RE: tomcat problem

2005-02-11 Thread George Sexton
I've seen this if the tags specified by the page are not available.

George Sexton
MH Software, Inc.
http://www.mhsoftware.com/
Voice: 303 438 9585
  

 -Original Message-
 From: ssk 2001 [mailto:[EMAIL PROTECTED] 
 Sent: Friday, February 11, 2005 12:30 AM
 To: tomcat-user@jakarta.apache.org
 Subject: tomcat problem
 
 After starting the tomcar when i enter my application url it 
 fails .. The error is given below , pls help me ..
  
 HTTP Status 500 - 
 -
 
 type Exception report
 
 message 
 
 description The server encountered an internal error () that 
 prevented it from fulfilling this request.
 
 exception 
 org.apache.jasper.JasperException 
 org.apache.jasper.servlet.JspServletWrapper.service(JspServlet
 Wrapper.java:373) 
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet
 .java:295)
 org.apache.jasper.servlet.JspServlet.service(JspServlet.ja
 va:245)   
 javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
 
 
 
 root cause 
 java.lang.NullPointerException
 org.apache.jasper.JspCompilationContext.createCompiler(JspComp
 ilationContext.java:220)  
 org.apache.jasper.JspCompilationContext.compile(JspCompilation
 Context.java:552) 
 org.apache.jasper.servlet.JspServletWrapper.service(JspServlet
 Wrapper.java:296) 
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet
 .java:295)
 org.apache.jasper.servlet.JspServlet.service(JspServlet.ja
 va:245)   
 javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
 
 
 
 note The full stack trace of the root cause is available in 
 the Apache Tomcat/5.5.4 logs.
 
 -
 Apache Tomcat/5.5.4
 
   
 -
 Do you Yahoo!?
  Yahoo! Search presents - Jib Jab's 'Second Term'
 


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



RE: Running heavily loaded tomcat sites.

2005-02-10 Thread George Sexton
You are really just starting document the issues necessary for running a
high volume site.

The URL

http://www.mhsoftware.com/resources/top10asp.html

Has some things that are IIS specific, but also apply to Tomcat
applications:

Specifically:

Store as little as possible on the session. I'm working on an app right now,
where the author decided storing the db connection on the session was the
way to go.

Watch contention.

Use an automated code analysis tool like PMD or Findbugs to eliminate bad
and redundant code. PMD will detect things like string concatenation in
loops, using string concatenation in StringBuffer.append() methods, and
other non-optimal techniques.

Stress test using a tool like Jmeter.



George Sexton
MH Software, Inc.
http://www.mhsoftware.com/
Voice: 303 438 9585
  

 -Original Message-
 On Wed, 09 Feb 2005 00:18:52 +0100, Wojciech Sobczuk
 [EMAIL PROTECTED] wrote:
  Hello,
  
  I have collected my experiences with running a heavily 
 loaded (and soon
  to be high availability) tomcat setup in a paper available here:
  http://brandlay.com/wojtek/publ/tomcat.jsp
  Have a look if you're interested and please email any 
 comments directly
  to my email.
  
  Thanks!
  
  --
  Wojciech Sobczuk
  [EMAIL PROTECTED]
  +48 605 607 170
  


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



RE: outOfMemory exception under high load

2005-02-07 Thread George Sexton
I would suggest running findbugs:

http://findbugs.sourceforge.net/

It has found issues in application code for other people on the list.


George Sexton
MH Software, Inc.
http://www.mhsoftware.com/
Voice: 303 438 9585
  

 -Original Message-
 From: Michael Cornell [mailto:[EMAIL PROTECTED] 
 Sent: Monday, February 07, 2005 3:37 AM
 To: Tomcat-User
 Subject: outOfMemory exception under high load
 
 Hi,
 
 Hi,
 
 I am experiencing a problem many others seem to have had before, but
 have found no answers.  I am running Tomcat 5.0.25 using jdk 1.4.2_06
 hotspot vm on RedHat Linux ES with 4G Ram and twin Intel procs.
 
 When load-testing, under high stress I receive the error below and the
 thread dies.
 
 04-Feb-2005 13:39:24 org.apache.coyote.tomcat5.CoyoteAdapter service
 SEVERE: An exception or error occurred in the container during the
 request processing
 java.lang.OutOfMemoryError
 at java.util.zip.ZipFile.open(Native Method)
 at java.util.zip.ZipFile.init(ZipFile.java:112)
 at java.util.jar.JarFile.init(JarFile.java:127)
 ..
 
 I have adjusted the vm parameters to the below ( the perm 
 space does not
 get full and the Xint to not use the optimised settings..
 -server -Xms1G -Xmx1G -Xmn384m -XX:SurvivorRatio=7 -XX:PermSize=64m
 -XX:MaxPermSize=128m -Xint
 
 In addition I have added the  reloading=false and 
 development=false in
 conf/web.xml.  as per instruction from this thread:
 http://www.junlu.com/msg/78566.html
 
 My connector is configured thus:
Connector
port=80
maxThreads=1000
minSpareThreads=1000
maxSpareThreads=1000
enableLookups=false
redirectPort=8443
acceptCount=3000
debug=0
connectionTimeout=2
disableUploadTimeout=true /
 
 
 However all of this is to no avail, and under high stress (80+
 concurrent requests, tomcat dies and terminates the thread dumping a
 hs_pid12345.log with  the above message
 
 Is this a known hotspot 1.4.x problem (some threads have hinted at
 this), or does someone have a solution for this??
 
 Thanks,
 
 M
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


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



RE: [OT]web development fee

2005-01-06 Thread George Sexton
I've got a package I plan on releasing under a  BSD license. It needs some
work, but it's pretty close. The only remaining major task is to port the
reports from an old proprietary reporting application to Datavision. If you
want to see a sample, go to:

http://www.stargateschool.org/sgstore/

The sample is not quite in production, so if you want to try it out, use a
Visa Card # of 4111 (4 followed by 15 1's). I'd appreciate any
feedback.

In many ways, it's very cool. Formats for the items are stored as HTML, and
parsed out. Products can belong to multiple categories, and shopping by
Manufacturer is supported. It does inventory, removing items from the store
when the quantity on hand drops to 0. It also supports quantity pricing
schedules as well as SKU Variants (vary on size, or color but not both).
Support for Accessory SKU's that can be shown in the checkout or cart review
screens. Orders are delivered to the fulfillment person via FAX, PDF or
Encrypted PDF. A CC of the PDF without the card data can also be sent to an
additional person.

It should be portable across PostgreSQL, SQL Server, Oracle, Sybase, and
DB2, but I've only tested PostgreSQL and SQL Server so far.

I'll be the first to admit it could use some more features. Here are things
I'm thinking of:

Localization Support via Resource Bundles
Actual Charge Clearing Support 
Additional Reports
Re-Order Quantities and Notification Messages


George Sexton
MH Software, Inc.
http://www.mhsoftware.com/
Voice: 303 438 9585
  

 -Original Message-
 From: Daniel Watrous [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, January 05, 2005 11:03 PM
 To: Tomcat Users List
 Subject: Re: [OT]web development fee
 
 I have heard of 
 http://www.merchantspace.com/product/index.jsp.  I haven't 
 used it though.  A search on Google will likely give you a 
 handful to choose 
 from.  Also you might consider taking ideas from the Java Pet Store.
 
 The hourly rate depends on a lot of things.  I can't make a good 
 generalization about hourly rate...
 
 Daniel
 
 - Original Message - 
 From: epyonne [EMAIL PROTECTED]
 To: Tomcat Users List tomcat-user@jakarta.apache.org
 Sent: Wednesday, January 05, 2005 10:30 AM
 Subject: Re: [OT]web development fee
 
 
  Daniel,
 
  Thanks for the response. No, what I develop for my employer is not 
  eCommerce
  related. They are mostly for internal processing. Some of my web 
  application
  are used by our call centers.
 
  Among the 3 options that you have stated, I think I will go 
 with either #1
  or #3. If I go with #3, do you know where I can find such 
 application?
 
  Also, can you tell me what is the going rate for a contract 
 job like this?
  $50/hr, $100/hr, or more? I don't have any idea at all.
 
  Thank you very much for your help and all the other posters' help!
 
 
  - Original Message - 
  From: Daniel Watrous [EMAIL PROTECTED]
  To: Tomcat Users List tomcat-user@jakarta.apache.org
  Sent: Wednesday, January 05, 2005 10:00 AM
  Subject: Re: [OT]web development fee
 
 
  Epyonne,
 
  First off, I don't think that you hijacked anyone's 
 thread, but this list
  seems to be very sensitive to that (and perhaps more 
 affected by it than
  other lists I have seen).
 
  From my experience there are a couple of options you can pursue:
  1) You could build the application from the ground up and 
 charge an 
  hourly
  rate.  The rate will have to be agreed upon by you and the person
  contracting you.
  2) You could develop the eCommerce application at your own 
 cost and sell 
  a
  license to it.  In this case you would have more direct 
 control over the
  features you build into it.  Also, while this costs you 
 more up front
  there
  is more possibility to recover the cost in selling 
 multiple licenses.
  3) You could purchase a license to an existing application 
 and adapt it 
  to
  meet your clients' needs.  In this case you would likely 
 charge a flat 
  fee
  to recover your hard costs for the purchase and an hourly 
 after that for
  any
  adaptations.  In this case I personally would ask for the 
 hard costs up
  front so as to not go to the expense and then have the 
 client change
  his/her
  mind.
 
  Now about the way you asked your question, I'm not sure if the web
  application you have developed for your employer is an eCommerce
  application.  In the event that it is eCommerce related 
 you will likely
  use
  that as a base for whatever you build for your new client. 
  In this case
  you
  should discuss with your employer how he feels about you 
 building off of 
  a
  code base that he has funded.  It may be that you could work out an
  arrangement with your employer to accomplish option 3 
 above, and that 
  your
  employer will give you a license at a significant savings to you.
 
  As far as contracts go,  you should probably consult with 
 a lawyer for
  that.
 
  Daniel
 
  - Original Message - 
  From: epyonne

RE: Tomcat 5.0.28 running Windows 2003 Server CPU to 100%

2005-01-03 Thread George Sexton
I think it's something in Tomcat personally. I have had a customer report
this with our Application, which when run under Tomcat on Unix will run for
weeks at a time.
 

George Sexton
MH Software, Inc.
http://www.mhsoftware.com/
Voice: 303 438 9585
  

 


  _  

From: David Bilodeau [mailto:[EMAIL PROTECTED] 
Sent: Monday, January 03, 2005 11:13 AM
To: tomcat-user@jakarta.apache.org
Subject: Tomcat 5.0.28 running Windows 2003 Server CPU to 100%


Can anyone point me to a thread discussing the following configuration or
something similar, where the discussion relates to the CPU running up to
100%?
 
Windows 2003 Server Standard Edition running IIS 6.0
Tomcat 5.0.28 installed and running (as a service)
SQL Server 2000 SP3 connected to Tomcat (and IIS), but running from another
server.
 
Our symptom is that after a few days the server CPU usage hits 100%, with
Tomcat consuming most of it.  Stopping and restarting each Tomcat virtual
site, or stopping  restarting the Apache service does not resolve the
issue.  Only a box reboot will.
 
I need some guidance as to where to suggest to the developers they should
look, presuming this is caused by the code.  I am the system admin of the
environment and so do not develop the code myself, but I am seeing this
symptom and now need to ask the developers to examine their code to find a
root cause.
 
I bet someone, somewhere, has run across this on a thread on this forum and
can point me to it?  I've been searching some but have not found much yet
that is recent.
 
Regards,
 
  
David Bilodeau
Enterprise Marketing  Sales Automation
Verizon Data Services, Inc.
919 Hidden Ridge, HQM03C76
Irving, TX 75038



RE: OutOfMemory Errors

2004-12-13 Thread George Sexton
You probably have a resource leak in your application.

You might want to run FindBugs on it:

http://findbugs.sourceforge.net/

George Sexton
MH Software, Inc.
http://www.mhsoftware.com/
Voice: 303 438 9585
  

 -Original Message-
 From: Asim Alp [mailto:[EMAIL PROTECTED] 
 Sent: Monday, December 13, 2004 11:32 AM
 To: Tomcat Users List
 Subject: Re: OutOfMemory Errors
 
 Hello Peter,
 
 Sorry.  My system config is:
 
 Windows Server 2003
 Apache 2.0.49 (Win32) mod_ssl/2.0.51 OpenSSL/0.9.7d DAV/2 mod_jk/1.2.6
 Tomcat 5.5.4
 sun jdk 1.5.0-b64
 
 We have a 2 node tomcat cluster each running with the -Xms128m
 -Xmx1024m options.
 
 We have a heavily loaded JDBC application running and our MySQL server
 has enough max_connections to handle our load.  For now, we have
 Apache, one of the Tomcats and MySQL running on the same machine (2 x
 3.8 Ghz Intel with 2GB of Ram).  We're also using this server as a
 file server with RAID 5.
 
 From Task Managers performance monitor, I'm looking at the Handles (I
 hope I'm looking at the correct thing).  Total number of handles is
 around 30400 (almost two times 16K).  Apache is usually using about
 3000, Tomcat 5000, MySQL 9000, System 2600, svchost 1000.
 
 Do these values look normal?
 
 Asim
 
 On Mon, 13 Dec 2004 17:53:35 -, Peter Crowther
 [EMAIL PROTECTED] wrote:
   From: Asim Alp [mailto:[EMAIL PROTECTED]
   I'm trying to solve an OOME on our Tomcat.
  
  Tomcat version?
  JVM version and settings?
  Application characteristics?
  Other libraries in use (eg JDBC)?
  
   We profiled our
   application using JProfiler and there are no memory 
 leakages on our
   end.  Currently, I'm focusing on some system resource 
 problems such as
   file descriptors.  Would this be a valid problem on Windows Server
   2003?  And if so, how can I change the max number of file 
 descriptors?
  
  I suspect someone else will give a better Java solution, but I'm a
  Windows hack who's a relative latecomer to Java...
  
  You've got 16k to go at by default.  How many are you 
 using, according
  to Performance Monitor?  And how many in the JVM running Tomcat?
  
   One last thing...  What other resources should I 
 investigate for this
   sort of OOME?
  
  http://www.sysinternals.com/ for 'handle' and Process 
 Explorer if you
  suspect a resource problem on Windows.
  
  - Peter
  
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


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



Re: Problems compiling mod_jk 1.2.6

2004-11-19 Thread Lars George
Hi Lars,
I solved your (my) problem. Just added a
#define in_addr_t unsigned long
into the jk_connect.h and compiled. Runs smoothly so far. Darn C code ;-)
Thanks,
Lars
PS: me, myself and I
Lars George wrote:
Hi,
We are trying to compile mod_jk 1.2.6 on a Linux system with 2.2 kernel 
where we get this error:

[EMAIL PROTECTED] native]# make
Making all in common
make[1]: Entering directory 
`/downloads/jakarta-tomcat-connectors-jk-1.2.6-src/jk/native/common'
/bin/sh /usr/local/apache2/build/libtool --silent --mode=compile gcc 
-I/usr/local/apache2/include -g -O2 -g -O2 -pthread -DHAVE_APR 
-I/downloads/httpd-2.0.52/srclib/apr/include -g -O2 -DLINUX=2 
-D_REENTRANT -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_SVID_SOURCE 
-D_GNU_SOURCE -I /usr/local/jdk1.4/include -I /usr/local/jdk1.4/include/ 
-c jk_ajp12_worker.c
/bin/sh /usr/local/apache2/build/libtool --silent --mode=compile gcc 
-I/usr/local/apache2/include -g -O2 -g -O2 -pthread -DHAVE_APR 
-I/downloads/httpd-2.0.52/srclib/apr/include -g -O2 -DLINUX=2 
-D_REENTRANT -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_SVID_SOURCE 
-D_GNU_SOURCE -I /usr/local/jdk1.4/include -I /usr/local/jdk1.4/include/ 
-c jk_connect.c
jk_connect.c: In function `jk_resolve':
jk_connect.c:56: `in_addr_t' undeclared (first use in this function)
jk_connect.c:56: (Each undeclared identifier is reported only once
jk_connect.c:56: for each function it appears in.)
jk_connect.c:56: parse error before `laddr'
jk_connect.c:100: `laddr' undeclared (first use in this function)
make[1]: *** [jk_connect.lo] Error 1
make[1]: Leaving directory 
`/downloads/jakarta-tomcat-connectors-jk-1.2.6-src/jk/native/common'
make: *** [all-recursive] Error 1

Apparently when Googleing for it it seems like the older code base of 
the 2.2 kernel does not have that in_addr_t defined. How is this amended?

Thanks,
Lars

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

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


Problems compiling mod_jk 1.2.6

2004-11-18 Thread Lars George
Hi,
We are trying to compile mod_jk 1.2.6 on a Linux system with 2.2 kernel 
where we get this error:

[EMAIL PROTECTED] native]# make
Making all in common
make[1]: Entering directory 
`/downloads/jakarta-tomcat-connectors-jk-1.2.6-src/jk/native/common'
/bin/sh /usr/local/apache2/build/libtool --silent --mode=compile gcc 
-I/usr/local/apache2/include -g -O2 -g -O2 -pthread -DHAVE_APR 
-I/downloads/httpd-2.0.52/srclib/apr/include -g -O2 -DLINUX=2 
-D_REENTRANT -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_SVID_SOURCE 
-D_GNU_SOURCE -I /usr/local/jdk1.4/include -I /usr/local/jdk1.4/include/ 
-c jk_ajp12_worker.c
/bin/sh /usr/local/apache2/build/libtool --silent --mode=compile gcc 
-I/usr/local/apache2/include -g -O2 -g -O2 -pthread -DHAVE_APR 
-I/downloads/httpd-2.0.52/srclib/apr/include -g -O2 -DLINUX=2 
-D_REENTRANT -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_SVID_SOURCE 
-D_GNU_SOURCE -I /usr/local/jdk1.4/include -I /usr/local/jdk1.4/include/ 
-c jk_connect.c
jk_connect.c: In function `jk_resolve':
jk_connect.c:56: `in_addr_t' undeclared (first use in this function)
jk_connect.c:56: (Each undeclared identifier is reported only once
jk_connect.c:56: for each function it appears in.)
jk_connect.c:56: parse error before `laddr'
jk_connect.c:100: `laddr' undeclared (first use in this function)
make[1]: *** [jk_connect.lo] Error 1
make[1]: Leaving directory 
`/downloads/jakarta-tomcat-connectors-jk-1.2.6-src/jk/native/common'
make: *** [all-recursive] Error 1

Apparently when Googleing for it it seems like the older code base of 
the 2.2 kernel does not have that in_addr_t defined. How is this amended?

Thanks,
Lars

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


Re: Errors in mod_jk2 log

2004-11-18 Thread Lars George
Hi Phillip,
I think it would be nice if this is explained by someone and then 
ideally put into the docs for Tomcat. I wonder how many more system 
admins sort of silently inore these messages since they do not harm 
necessarly - but then who knows.

So I second your idea.
Lars
Phillip Qin wrote:
There are tons of these messages appeared in my log. I've asked this
question before, no one seems bother answering it. Shall we post it to
connector's dev list?
-Original Message-
From: Lars George [mailto:[EMAIL PROTECTED] 
Sent: November 17, 2004 7:31 PM
To: Tomcat Users List
Subject: Errors in mod_jk2 log

Hi,
We get these errors in the Apache logs coming from mod_jk2:
[Wed Nov 17 13:37:32 2004] [error] ajp13.service() ajpGetReply 
recoverable error 3
[Wed Nov 17 13:37:32 2004] [error] ajp13.service() Error  forwarding
ajp13:b19socket 1 0 [Wed Nov 17 13:37:32 2004] [error] mod_jk2.handler()
Error connecting to tomcat 3, status 200

I read the jk_worker_ajp13.c code to see what that means, but cannot 
really make out how to determine the actual reason.

Could someone suggest how to investigate that further? Would the extra 
debug help? And where would I switch it on best? I mean on the channel 
or socket element?

Thanks,
Lars
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
!DSPAM:419bed4791457924012082!

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


RE: Tomcat JRE vs JDK Issue

2004-11-17 Thread George Sexton
One aside, the script (batch file) has an exit statement on the case where
the JDK is not detected. This results in a mysterious window closing which
causes a lot of hair pulling.

George Sexton
MH Software, Inc.
http://www.mhsoftware.com/
Voice: 303 438 9585
  

 -Original Message-
 From: Remy Maucherat [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, November 16, 2004 9:04 AM
 To: Tomcat Users List
 Subject: Re: Tomcat JRE vs JDK Issue
 
 On Tue, 16 Nov 2004 10:46:38 -0500, Hubble, Christopher
 [EMAIL PROTECTED] wrote:
  How does one precompile the JSPs?  Then I should be able to 
 use TC with just
  a JRE, correct?  Once TC is deployed, there should not be 
 any need for
  changes to it, so it's fine to precompile the JSPs.
 
 Some JSP 2.0 features prevent precompilation, so, with Jasper, you
 cannot claim compliance without a Java compiler.
 
 So I can only recommend using TC 5.5 if you want to use a JRE. Note
 that the shell scripts will still complain about not having a JDK, as
 they have options which use JDK features. We have not decided what to
 do about that at the moment, but you can easily edit the script to
 bypass the check.
 
 -- 
 x
 Rémy Maucherat
 Developer  Consultant
 JBoss Group (Europe) SàRL
 x
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


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



Errors in mod_jk2 log

2004-11-17 Thread Lars George
Hi,
We get these errors in the Apache logs coming from mod_jk2:
[Wed Nov 17 13:37:32 2004] [error] ajp13.service() ajpGetReply 
recoverable error 3
[Wed Nov 17 13:37:32 2004] [error] ajp13.service() Error  forwarding
ajp13:b19socket 1 0
[Wed Nov 17 13:37:32 2004] [error] mod_jk2.handler() Error connecting to
tomcat 3, status 200

I read the jk_worker_ajp13.c code to see what that means, but cannot 
really make out how to determine the actual reason.

Could someone suggest how to investigate that further? Would the extra 
debug help? And where would I switch it on best? I mean on the channel 
or socket element?

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


RE: Remote debugging a web app with Eclipse?

2004-11-14 Thread George Sexton
Here is a wrapper that I use to start tomcat for remote debugging with
Eclipse. Note that the indented CATALINA_OPTS is actually one long line in
the batch file.

REM @ECHO OFF
SET CATALINA_VER=5.0.28
SET CATALINA_BASE=M:\cdaily
SET CATALINA_HOME=C:\SERVLET\Jakarta-Tomcat-%CATALINA_VER%
SET CATALINA_OPTS=-Xdebug -Xnoagent 
-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=7100 
-Djava.compiler=NONE 
-Dfile.encoding=ISO-8859-1
SET JAVA_HOME=C:\J2SDK1.4.2_04
%CATALINA_HOME%\bin\catalina.bat %1 %2 %3 %4 %5 %6 %7 %8 %9



George Sexton
MH Software, Inc.
http://www.mhsoftware.com/
Voice: 303 438 9585
  

 -Original Message-
 From: Michael Schuerig [mailto:[EMAIL PROTECTED] 
 Sent: Sunday, November 14, 2004 9:06 AM
 To: [EMAIL PROTECTED]
 Subject: Remote debugging a web app with Eclipse?
 
 
 I've tried to remote debug a web app with Eclipse, but didn't 
 make the 
 first hurdle. Apparently, Eclipse can't connect to Tomcat's JVM. I'm 
 using Tomcat 5.5.1, J2SE 5.0 and Eclipse 3.1M3.
 
 I take it, that in some way I need to tell the JVM that it's 
 running in 
 debug mode and what port it ought to listen on. All I found out, 
 though, is that there's a deprecated -Xdebug option. Is there a short 
 tutorial somewhere on remote debugging?
 
 Michael
 
 -- 
 Michael Schuerig  Failures to use one's frontal lobes
 mailto:[EMAIL PROTECTED]can result in the loss of them.
 http://www.schuerig.de/michael/   --William H. Calvin
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


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



ChannelSocket is loosing connections

2004-11-10 Thread Lars George
Hi,
After investigating the problem we have reported earlier a little more, 
it looks like we have the following problem:

Every now and then we get heaps of SocketExceptions in the logs on 
Tomcat, all in ChannelSocket.invoke() in jk.common.ChannelSocket.java. 
Then all TP-Processor threads are going into standby mode, ie. if I do a 
dump of all threads of the JVM, all Tomcat TP-Processor threads sit in 
the socketRead0() call waiting for mod_jk to send some subsequent data.

But the mod_jk side of things looks different, it claims it is waiting 
for Tomcat to send back data for the current requests! I did a netstat 
-p then on the app servers and saw that mod_jk did indeed still have a 
socket connection to the Java processes.

So, Tomcat/CoyoteConnector sits idle waiting for connections but in 
reality, the socket connections are stuck somewhere and not closed 
properly. Apache/mod_jk is waiting for Tomcat to write the response back 
to the user, but since the exception was thrown it is not going to do that.

While reading the ChannelSocket.processConnection() code I came across a 
final and this comment:

  /*
  * Whatever happened to this connection (remote closed it, timeout, 
read error)
  * the socket SHOULD be closed, or we may be in situation where the 
webserver
  * will continue to think the socket is still open and will forward 
request
  * to tomcat without receiving ever a reply
  */

Well, this seem to be exactly our problem! I see from the code that it 
should closethe connection since a SocketException is thrown in 
this.invoke(recv, ep);, which should trigger the close call. But then, 
what is going wrong?

Why is Tomcat and mod_jk getting out of sync with connections?
I am puzzled.
Please can anyone out there help?
Thanks,
Lars
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


BufferOverflowException in Apache error logs

2004-11-01 Thread Lars George
Hi,
We have some trouble with Apache 2, mod)jk2 and Tomcat 5. We get these 
errors in the generic error log for Apache:

msg_ajp.getInt(): BufferOverfowException 5 4
Sometimes we get 20-30 of those within 2 or 3 seconds.
What does that mean?
Thanks,
Lars
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Problems wth Apache, mod_jk2 and Tomcat

2004-10-26 Thread Lars George
Hi Christoph,
I would recommend to upgrade to Apache 2 and mod_jk2 as soon as 
possible. With the old Apache 1 and mod_jk we had a whole set of other 
problems when it came to load related instabilities. The new version is 
heaps better.

Lars
Christoph Fischer wrote:
Hi,
this seems also to be a problem in mod_jk , tomcat4.1.10, apache 1.3 on 
a linux server however it does build up slowly over the day.
The problem seems to be that the connection via mod_jk (Port 8009) does 
not close, so the java/tomcat processes
will not quit after responding to the request (or the other way 
around?). This problem occurs only in
heavy load situations. After that I see many open socket connections an 
some tomcat processes that will not quit.

Snapshot of the logfiles:
tomcat / catalina.out:
Failed to authentice as null
Error number: 50
tomcat / catalna_log:
2004-10-22 08:52:29 Ajp13Processor[8009][358] Starting background thread
2004-10-22 08:52:34 Ajp13Processor[8009][359] Starting background thread
2004-10-22 08:52:34 Ajp13Connector[8009] No processor available, 
rejecting this connection
2004-10-22 08:52:34 Ajp13Connector[8009] No processor available, 
rejecting this connection

apache / mod_jk
[Fri Oct 22 08:52:34 2004]  [jk_ajp_common.c (738)]: ERROR: can't 
receive the response message from tomcat, network problems or tomcat is 
down. err=-104
[Fri Oct 22 08:52:34 2004]  [jk_ajp_common.c (1137)]: Error reading 
reply from tomcat. Tomcat is down or network problems.

Is this a mod_jk problem not closing the connections or a tomcat problem 
not telling mod_jk that it's finished or a system problem not
releasing the sockets ?

Thanks for any ideas...
Chris
David Smith wrote:
Hmmm..  My assumption to your email was their was some kind of 
possible probing of your Apache server and/or a misbehaving client.  
Do you run snort on the box hosting the Apache httpd service?  It's an 
intrusion detection tool designed to log suspicious activity.  That 
could be something to look at.  Otherwise I can't think of a reason in 
the world for httpd to spontaneously go full out.  It's not something 
I've ever seen.

--David
Lars George wrote:
David,
This proves more difficult, since the requests look like standard 
requests that work at other times. Moreover the POST data is no 
logged anyway so I cannot check if it was a value that was sent in by 
chance.

Is there anything else I can check to see what is going on? I was 
more thinking along the lines of using some low-level tools to see if 
everything is OK, for example critical resources related to Apache or 
Tomcat (note, they are on separate machines). For example I tried 
using netstat -p on either side to see what the connections are 
saying. I als did a thread dump of the Tomcat JVM to see what the 
Coyote connectors and all the other threads are up to. But There is 
nothing conclusive so far. Just out of the blue the apache runs full, 
and there seems no relation to when during the day or how high the 
load etc.

Thanks,
Lars
David Smith wrote:
I would start with the apache logs and find out what kind of 
requests are logged in the access just before the event.  That 
should get you going in the right direction.

--David
Lars George wrote:
Hi,
We have an odd problem we cannot solve. Maybe someone else has come 
across this too.

We use Apache 2.0.52 with the Tomcat 5.0.25 and its included 
mod_jk2 with Coyote/JK2 AJP 1.3 connector.

Usually Apache uses 230 slots out of 1000 it has set as the 
maximum. This can be seen from the server-status page, it equals to 
say 32 requests per second.

Then all of sudden the Apache runs full and exceeds all empty 
slots, ie. goes up to 1000 requests currently being processed and 
accepts no further connections. All but a handful of these slots 
are in state W. Looking at the URI's the requests are both static 
content (like images) served directly by Apache, but of course many 
requests are to the dynamic content created by the app server 
(Tomcat).

I do not think this is a load issue per se, ie. where we have 
someone hammering us with requests, since looking at the 
connections and URL's they are all so random but valid at the same 
time that I do not think this is it.

What puzzles me more is that they are all in the state W. which 
means sending reply. The network seems to be OK at that point of 
time too since I can connect to the machines no problem.

Only if I restart Apache by ultimately killing (killall -9 httpd) 
all processes I can revive the site. After the Apache restart 
everything goes back to normal right away. This seems to mean 
something too, at least that it seems to be getting stuck somehow 
but whatever caused it does not seem to exist anymore. Like 
something short, for example a specific request, caused this.

What could I check from here? I cannot take the Apache out since we 
need  it for rewriting and session handling.

Any help or pointers are greatly appreciated.
Thanks,
Lars

Re: Problems wth Apache, mod_jk2 and Tomcat

2004-10-26 Thread Lars George
David,
Checking my log files, I can see that I get many of thoe lines in the 
generic apache error log:

[...timestamp...] [error] child process xyzabc still did not exit, 
sending a SIGKILL

I get at least 40 of these just after it starts running full. That does 
not look ok, does it?

Lars
David Smith wrote:
Hmmm..  My assumption to your email was their was some kind of possible 
probing of your Apache server and/or a misbehaving client.  Do you run 
snort on the box hosting the Apache httpd service?  It's an intrusion 
detection tool designed to log suspicious activity.  That could be 
something to look at.  Otherwise I can't think of a reason in the world 
for httpd to spontaneously go full out.  It's not something I've ever seen.

--David
Lars George wrote:
David,
This proves more difficult, since the requests look like standard 
requests that work at other times. Moreover the POST data is no logged 
anyway so I cannot check if it was a value that was sent in by chance.

Is there anything else I can check to see what is going on? I was more 
thinking along the lines of using some low-level tools to see if 
everything is OK, for example critical resources related to Apache or 
Tomcat (note, they are on separate machines). For example I tried 
using netstat -p on either side to see what the connections are 
saying. I als did a thread dump of the Tomcat JVM to see what the 
Coyote connectors and all the other threads are up to. But There is 
nothing conclusive so far. Just out of the blue the apache runs full, 
and there seems no relation to when during the day or how high the 
load etc.

Thanks,
Lars
David Smith wrote:
I would start with the apache logs and find out what kind of requests 
are logged in the access just before the event.  That should get you 
going in the right direction.

--David
Lars George wrote:
Hi,
We have an odd problem we cannot solve. Maybe someone else has come 
across this too.

We use Apache 2.0.52 with the Tomcat 5.0.25 and its included mod_jk2 
with Coyote/JK2 AJP 1.3 connector.

Usually Apache uses 230 slots out of 1000 it has set as the maximum. 
This can be seen from the server-status page, it equals to say 32 
requests per second.

Then all of sudden the Apache runs full and exceeds all empty slots, 
ie. goes up to 1000 requests currently being processed and accepts 
no further connections. All but a handful of these slots are in 
state W. Looking at the URI's the requests are both static content 
(like images) served directly by Apache, but of course many requests 
are to the dynamic content created by the app server (Tomcat).

I do not think this is a load issue per se, ie. where we have 
someone hammering us with requests, since looking at the connections 
and URL's they are all so random but valid at the same time that I 
do not think this is it.

What puzzles me more is that they are all in the state W. which 
means sending reply. The network seems to be OK at that point of 
time too since I can connect to the machines no problem.

Only if I restart Apache by ultimately killing (killall -9 httpd) 
all processes I can revive the site. After the Apache restart 
everything goes back to normal right away. This seems to mean 
something too, at least that it seems to be getting stuck somehow 
but whatever caused it does not seem to exist anymore. Like 
something short, for example a specific request, caused this.

What could I check from here? I cannot take the Apache out since we 
need  it for rewriting and session handling.

Any help or pointers are greatly appreciated.
Thanks,
Lars
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

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

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

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


Re: JK2: mapping urls from Apache to Tomcat

2004-10-25 Thread Lars George
Andrzej,
If you are referring to rewriting URI's before hitting the app servers 
then we do this with mod_rewrite which executes before mod_jk. So fr 
example if we have to change a legacy URI to a new one then we do this 
with a rewrite rule before even mod_jk is called. Works great for us.

HTH,
Lars George
WorldLingo
Andrzej Jan Taramina wrote:
Still hoping for some enlightenment on this
Douglas WF Acheson has said late last year:

# Define the Manager proxy that comes with Tomcat
[uri:/tomcat/manager/*]
context=/manager
info=Manager prefix mapping
But, after frustrating attempts I cannot seem to get it correct.  I have
search the mail archives and a few people have asked similar questions, but I
have not see any replies.  Hope someone can help me ...

I'm trying to do the same thing. I want Apache/JK2 to trap a specific URI 
(tomcat/manager/* in this example), but to map it to something else (eg. 
manager) before it sends the request on to Tomcat through the JK 
connection.

The context parameter shown above in workers2.properties does not do this, in 
fact, who knows what it does. I agree with Doug that the JK2 docs are 
abysmal. 

Anyone figured out a way to do such URI mapping using JK2?  Is it even 
possible?

Thanks!
Andrzej Jan Taramina
Chaeron Corporation: Enterprise System Solutions
http://www.chaeron.com
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

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


Problems wth Apache, mod_jk2 and Tomcat

2004-10-25 Thread Lars George
Hi,
We have an odd problem we cannot solve. Maybe someone else has come 
across this too.

We use Apache 2.0.52 with the Tomcat 5.0.25 and its included mod_jk2 
with Coyote/JK2 AJP 1.3 connector.

Usually Apache uses 230 slots out of 1000 it has set as the maximum. 
This can be seen from the server-status page, it equals to say 32 
requests per second.

Then all of sudden the Apache runs full and exceeds all empty slots, ie. 
goes up to 1000 requests currently being processed and accepts no 
further connections. All but a handful of these slots are in state W. 
Looking at the URI's the requests are both static content (like images) 
served directly by Apache, but of course many requests are to the 
dynamic content created by the app server (Tomcat).

I do not think this is a load issue per se, ie. where we have someone 
hammering us with requests, since looking at the connections and URL's 
they are all so random but valid at the same time that I do not think 
this is it.

What puzzles me more is that they are all in the state W. which means 
sending reply. The network seems to be OK at that point of time too 
since I can connect to the machines no problem.

Only if I restart Apache by ultimately killing (killall -9 httpd) all 
processes I can revive the site. After the Apache restart everything 
goes back to normal right away. This seems to mean something too, at 
least that it seems to be getting stuck somehow but whatever caused it 
does not seem to exist anymore. Like something short, for example a 
specific request, caused this.

What could I check from here? I cannot take the Apache out since we need 
 it for rewriting and session handling.

Any help or pointers are greatly appreciated.
Thanks,
Lars
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Problems wth Apache, mod_jk2 and Tomcat

2004-10-25 Thread Lars George
David,
This proves more difficult, since the requests look like standard 
requests that work at other times. Moreover the POST data is no logged 
anyway so I cannot check if it was a value that was sent in by chance.

Is there anything else I can check to see what is going on? I was more 
thinking along the lines of using some low-level tools to see if 
everything is OK, for example critical resources related to Apache or 
Tomcat (note, they are on separate machines). For example I tried using 
netstat -p on either side to see what the connections are saying. I 
als did a thread dump of the Tomcat JVM to see what the Coyote 
connectors and all the other threads are up to. But There is nothing 
conclusive so far. Just out of the blue the apache runs full, and there 
seems no relation to when during the day or how high the load etc.

Thanks,
Lars
David Smith wrote:
I would start with the apache logs and find out what kind of requests 
are logged in the access just before the event.  That should get you 
going in the right direction.

--David
Lars George wrote:
Hi,
We have an odd problem we cannot solve. Maybe someone else has come 
across this too.

We use Apache 2.0.52 with the Tomcat 5.0.25 and its included mod_jk2 
with Coyote/JK2 AJP 1.3 connector.

Usually Apache uses 230 slots out of 1000 it has set as the maximum. 
This can be seen from the server-status page, it equals to say 32 
requests per second.

Then all of sudden the Apache runs full and exceeds all empty slots, 
ie. goes up to 1000 requests currently being processed and accepts no 
further connections. All but a handful of these slots are in state 
W. Looking at the URI's the requests are both static content (like 
images) served directly by Apache, but of course many requests are to 
the dynamic content created by the app server (Tomcat).

I do not think this is a load issue per se, ie. where we have someone 
hammering us with requests, since looking at the connections and URL's 
they are all so random but valid at the same time that I do not think 
this is it.

What puzzles me more is that they are all in the state W. which 
means sending reply. The network seems to be OK at that point of 
time too since I can connect to the machines no problem.

Only if I restart Apache by ultimately killing (killall -9 httpd) all 
processes I can revive the site. After the Apache restart everything 
goes back to normal right away. This seems to mean something too, at 
least that it seems to be getting stuck somehow but whatever caused it 
does not seem to exist anymore. Like something short, for example a 
specific request, caused this.

What could I check from here? I cannot take the Apache out since we 
need  it for rewriting and session handling.

Any help or pointers are greatly appreciated.
Thanks,
Lars
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

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


Re: [tomcat] tomcat not running

2004-10-18 Thread George A


Antony Paul [EMAIL PROTECTED] wrote:
I know nothing about Turbine and it is Tomcat list. You can better ask
it at Turbine list. 

yes : ) , it is a tomcat list , uhh , and was it that since i am using tomcat i need 
to ask on tomcat ? uhh ok , i thought it's related to tomcat basically so i sent the 
mail to tomcat list also : ( . sorry about that ten i should say .

But on seeing the error message I can give you a
checklist.
What the application contains. 
Does application have an index.jsp.

yes, it does have index.jsp at the location :

E:\software\TDK_2.3\webapps\app1\templates\jsp\screens
Does application have a web.xml in WEB-INF directory. 


yes, it does have.

Does this contains servlet.jar in WEB-INF\lib ? This jar is not needed there.

yes it does contain.

Also go to Tomcat installation directory. There will be one webapps
directory. Check it contains a ROOT folder.


it doesnt contain a folder called ROOT but it does have following folders :

bin,common,conf,logsserver,tdk,temp,webapps,work


rgds
Antony Paul


On Mon, 18 Oct 2004 06:34:13 +0100 (BST), George A
wrote:
 hello all,
 i hope i have posted to the correct lists : ( . i am first time user to tdk. my 
 tomcat is not running. i am using tdk 2.3. my question is:
 
 when all applications from webapps folder are deleted following messages come when i 
 click on startup.bat
 
 Oct 18, 2004 10:33:42 AM org.apache.commons.modeler.Registry loadRegistry
 INFO: Loading registry information
 Oct 18, 2004 10:33:42 AM org.apache.commons.modeler.Registry getRegistry
 INFO: Creating new Registry instance
 Oct 18, 2004 10:33:42 AM org.apache.commons.modeler.Registry getServer
 INFO: Creating MBeanServer
 Oct 18, 2004 10:33:43 AM org.apache.coyote.http11.Http11Protocol init
 INFO: Initializing Coyote HTTP/1.1 on port 8080
 Starting service Tomcat-Standalone
 Apache Tomcat/4.1.27-LE-jdk14
 Oct 18, 2004 10:33:43 AM org.apache.coyote.http11.Http11Protocol start
 INFO: Starting Coyote HTTP/1.1 on port 8080
 Oct 18, 2004 10:33:43 AM org.apache.jk.common.ChannelSocket init
 INFO: JK2: ajp13 listening on /0.0.0.0:8009
 Oct 18, 2004 10:33:43 AM org.apache.jk.server.JkMain start
 INFO: Jk running ID=0 time=0/15 config=E:\software\TDK_2.3\conf\jk2.properties
 
 and in the browser when i type http://localhost:8080 then Http Status 500 error 
 comes.
 
 and when i shut it down and create an application then following error comes on 
 clicking startup :
 WebappClassLoader:
 validateJarFile(E:\software\TDK_2.3\webapps\appl1\WEB-INF\lib\servlet.jar) - jar not 
 loaded.
 See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
 log4j:ERROR setFile(null,false) call failed.
 java.io.FileNotFoundException: \logs\turbine.log (The system cannot find the path 
 specified)
 .and a big list of errors and exceptions 
 
 [INFO] Turbine - -Turbine: init() Ready to Rumble!
 Oct 18, 2004 10:45:34 AM org.apache.coyote.http11.Http11Protocol start
 INFO: Starting Coyote HTTP/1.1 on port 8080
 Oct 18, 2004 10:45:34 AM org.apache.jk.common.ChannelSocket init
 INFO: JK2: ajp13 listening on /0.0.0.0:8009
 Oct 18, 2004 10:45:34 AM org.apache.jk.server.JkMain start
 INFO: Jk running ID=0 time=0/47 config=E:\software\TDK_2.3\conf\jk2.proper
 
 and in browser again i get : Http Status 500 error .
 
 my directory structure is:
 
 webapps
 -appl1
 -WEB-INF
 -build
 -classes
 -conf
 -db
 -lib
 -src
 ummm, this can be a very primary question to most of you over there. so it might 
 sound silly to you : ) .but i just joined this mailing list with a hope to get some 
 answer. any answers are welcome : ) .
 thanks a lot,
 bye,
 george.
 
 
 -
 Yahoo! Messenger - Communicate instantly...Ping your friends today! Download 
 Messenger Now


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





-
  Yahoo! Messenger - Communicate instantly...Ping your friends today! Download 
Messenger Now

[tomcat] tomcat not running

2004-10-17 Thread George A
hello all,
i hope i have posted to the correct lists : ( . i am first time user to 
tdk. my tomcat is not running. i am using tdk 2.3. my question is:
 
when all applications from webapps folder are deleted following messages come when i 
click on startup.bat
 
Oct 18, 2004 10:33:42 AM org.apache.commons.modeler.Registry loadRegistry
INFO: Loading registry information
Oct 18, 2004 10:33:42 AM org.apache.commons.modeler.Registry getRegistry
INFO: Creating new Registry instance
Oct 18, 2004 10:33:42 AM org.apache.commons.modeler.Registry getServer
INFO: Creating MBeanServer
Oct 18, 2004 10:33:43 AM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on port 8080
Starting service Tomcat-Standalone
Apache Tomcat/4.1.27-LE-jdk14
Oct 18, 2004 10:33:43 AM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on port 8080
Oct 18, 2004 10:33:43 AM org.apache.jk.common.ChannelSocket init
INFO: JK2: ajp13 listening on /0.0.0.0:8009
Oct 18, 2004 10:33:43 AM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/15  config=E:\software\TDK_2.3\conf\jk2.properties

and in the browser when i type http://localhost:8080 then Http Status 500 error comes.
 
 
and when i shut it down and create an application then following error comes on 
clicking startup :
WebappClassLoader: 
validateJarFile(E:\software\TDK_2.3\webapps\appl1\WEB-INF\lib\servlet.jar) - jar not 
loaded. 
See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
log4j:ERROR setFile(null,false) call failed.
java.io.FileNotFoundException: \logs\turbine.log (The system cannot find the path 
specified)
.and a big list of errors and exceptions 
 
[INFO] Turbine - -Turbine: init() Ready to Rumble!
Oct 18, 2004 10:45:34 AM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on port 8080
Oct 18, 2004 10:45:34 AM org.apache.jk.common.ChannelSocket init
INFO: JK2: ajp13 listening on /0.0.0.0:8009
Oct 18, 2004 10:45:34 AM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/47  config=E:\software\TDK_2.3\conf\jk2.proper
 
and in browser again i get : Http Status 500 error .
 
my directory structure is:
 
webapps
-appl1
-WEB-INF
-build
-classes
-conf
-db
-lib
-src
ummm, this can be a very primary question to most of you over there. so it might sound 
silly to you : ) .but i just joined this mailing list with a hope to get some answer. 
any answers are welcome : ) .
thanks a lot,
bye,
george.
 


-
  Yahoo! Messenger - Communicate instantly...Ping your friends today! Download 
Messenger Now

RE: missing resource bundle shouldn't be

2004-09-06 Thread George Sexton
Different class loader. The JSP's are running in a class-loader with the
application, while the common/lib jars are in a different class-loader where
the WEB-INF/classes are not part of the search path.

George Sexton
MH Software, Inc.
http://www.mhsoftware.com/
Voice: 303 438 9585
  

 -Original Message-
 From: Garret Wilson [mailto:[EMAIL PROTECTED] 
 Sent: Monday, September 06, 2004 11:40 AM
 To: [EMAIL PROTECTED]
 Subject: Re: missing resource bundle shouldn't be
 
 Oh, and I'm using JDK 1.5 RC.
 
 Garret
 
 Garret Wilson wrote:
  I just installed Tomcat 5.5.0 on Windows XP Professional 
 SP2. I have an 
  existing application that worked under Tomcat 4.x. It consists of a 
  servlet in a jar file located here:
  
  \tomcat\common\lib\myservlet.jar
  
  That jar contains a servlet mapped to, for example:
  
  servlet-mapping
servlet-namemyservlet/servlet-name
url-pattern/myservlet/test/url-pattern
  /servlet-mapping
  
  I have a resource bundle installed here:
  
  ...mywebapp\WEB-INF\classes\myresourcebundle.properties
  
  My JSP files do the following with no problem:
  
  ResourceBundle.getBundle(myresourcebundle);
  
  However, when my servlet in my jar tries to execute the 
 exact same code, 
  I get:
  
  java.util.MissingResourceException: Can't find bundle for base name 
  myresourcebundle, locale en_US
  
 java.util.ResourceBundle.throwMissingResourceException(Resourc
 eBundle.java:837) 
  
  java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:727)
  java.util.ResourceBundle.getBundle(ResourceBundle.java:577)
  
  [etc.]
  
  * I've tried taking my servlet out of a jar and putting it in 
  ...mywebapp\WEB-INF\classes\
  
  * I've tried copying my resource bundles to 
 ...mywebapp\WEB-INF\classes\ 
  to the same subdirectory as the actual classfiles (even 
 though I'm using 
  a non-hierarchical resource bundle name: myresourcebundle)
  
  * I've tried creating an explicit myresourcebundle_en_US.properties
  
  The only thing that works is to comment out the 
  ResourceBundle.getBundle(); line from my servlet.
  
  I've looked at the generated JSP source code from Tomcat, 
 and they have 
  the same ResourceBundle.getBundle(); as does my servlet.
  
  Why can my JSP files find my resource bundle, yet my servlet can't?
  
  Garret
  
  P.S. I'm sure that this worked under Tomcat 4.x. Then 
 again, Tomcat 4.x 
  didn't issue an error when my JSP files imported a class 
 but didn't use 
  it, either.
  
  
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


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



ISAPI and SSI w/ IIS

2004-08-02 Thread George Sexton
I have been playing with trying to server side include a URL that is in a
context handled by the ISAPI redirector. This is on Windows Server 2003 with
isapi_redirector2.dll version 2.0.4. The chain is something like this:

URL /calendar/OutputCurrentWeek.html is in a context handled by the ISAPI
Filter. Directly invoking this URL produces output.

Attempting to invoke the URL via SSI as shown below fails:

!-- #include virtual=/calendar/OutputCurrentWeek.html?calendar_id=2 --

I'm pretty sure that what is happening is the SSI handler is not passing the
request through the ISAPI filter chain.

I also tried something like:

!-- #exec
isa=/jakarta/isapi_redirector2.dll?/calendar/OutputCurrentWeek.html?calenda
r_id=2 --
And
!-- #exec
cgi=/jakarta/isapi_redirector2.dll?/calendar/OutputCurrentWeek.html?calenda
r_id=2 --

The last two trys generated 500 errors.

Does anyone have any ideas on how I can do a server side include to a
context URL?

As a fallback, I can use some code to invoke the URL using a
Microsoft.XMLHTTP control, and retrieving the body text.

Any ideas are appreciated.

George Sexton
MH Software, Inc.
http://www.mhsoftware.com/
Voice: 303 438 9585
 


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


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



Re: HttpUrlConnection.getInputStream() returns empty

2004-07-29 Thread Honey George
Hi David,
  My environment is Tomcat 4.1.18 + Sun JDK 1.4. I do
not use JSP and in my case a servlet invokes a java
class.
Now I got solution to my problem. The issue was that
the InputStream.avaulable() was returning 0 even
through there is byates to read.
My old code for reading bytes from the stream was like
this..
InputStream is = ..
byte[] b = new byte[is.available()];
is.read(b);

I modified this to...

ArrayList lines = new ArrayList();
BufferedReader r = new BufferedReader
(new InputStreamReader(in));
String line = null;
while ( (line=r.readLine()) != null )
{
if (StringUtils.isNotEmpty(line))
{
lines.add(line.trim());
}
}

Now I am getting the contents from the stream.

From the JSSE Ref Guide:

Implementation Note: Due to the complexity of the SSL
and TLS protocols, it is difficult to predict whether
incoming bytes on a connection are handshake or
application data, and how that data might affect the
current connection state (even causing the process to
block). In the Sun JSSE implementation, the
available() method on the object obtained by
SSLSocket.getInputStream() returns a count of the
number of application data bytes successfully
decrypted from the SSL connection but not yet read by
the application.

Thanks,
  George

 --- David Goodenough [EMAIL PROTECTED]
wrote: 
 Could you list your operating environment.  I have
 (see my other note) a
 very similar problem, and I think that by working
 out which components
 are common to both of us we can narrow this down
 much quicker.
 
 I am using 5.0.27 Tomcat (I also used 4.1 and got
 the same problem), I am
 using JSPs with JSTL and the IO taglib, I am running
 on Sun JVM 1.4.2_05
 (also tried 1.4.1) on a Linux system.  As you are
 not using JSPs etc that 
 just about leaves Tomcat itself, JVM and the
 operating system.
 
 David
 
 On Monday 26 July 2004 19:15, Honey George wrote:
  Hi All,
 I am facing a problem with HttpUrlConnection in
  Tomcat. I wanted to extract the contents of an
 https
  enabled URL,
  actually from the same site where my application
 is
  running(Will not try to access external URLs). My
  program will look
  like this.
 
 

===
 === import
 java.net.*;
  import java.util.*;
  import java.io.*;
 
  import javax.net.ssl.HostnameVerifier;
  import javax.net.ssl.HttpsURLConnection;
  import javax.net.ssl.SSLSession;
  import javax.net.ssl.*;
  .
 
 

System.getProperty(java.protocol.handler.pkgs,javax.net.ssl);
  java.security.Security.addProvider(new
  com.sun.net.ssl.internal.ssl.Provider());
  .
  HostnameVerifier hv = new
 HostnameVerifier()
  {
  public boolean verify(String
 urlHostName,
  SSLSession session)
  {
  System.out.println(Warning: URL
 Host:
  +urlHostName+ vs. +session.getPeerHost());
  return true;
  }
  };
 
  HttpsURLConnection.setDefaultHostnameVerifier(hv);
 
  // Create a trust manager that does not
  validate certificate chains
  TrustManager[] trustAllCerts = new
  TrustManager[]{
  new X509TrustManager() {
  public
  java.security.cert.X509Certificate[]
  getAcceptedIssuers() {
  return null;
  }
  public void checkClientTrusted(
 
 java.security.cert.X509Certificate[]
  certs, String authType) {
  }
  public void checkServerTrusted(
 
 java.security.cert.X509Certificate[]
  certs, String authType) {
  }
  }
  };
 
  // Install the all-trusting trust manager
  try
  {
  SSLContext sc =
  SSLContext.getInstance(SSL);
  sc.init(null, trustAllCerts, new
  java.security.SecureRandom());
 
 

HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory());
  } catch (Exception e) {
 
  }
 
  
 
  HttpURLConnection httpCon =
  (HttpURLConnection) new
 

java.net.URL(https://www.abc.com/test.txt;).openConnection();
 
 
 httpCon.setRequestProperty(USER_AGENT_HEADER_FIELD,
  );
 
  httpCon.setRequestProperty(ACCEPT_HEADER_FIELD,
  text/plain);
  return httpCon;
 
  InputStream is = httpCon.getInputStream();
 

===
 === Here the
 problem is that the
  InputStream does not
  return any contents when executed from inside
 Tomcat.
  But I am able to
  extract the contents of the URL when I execute
 outside
  tomcat in a command line program. The Connection
  object returned
  by new
 java.net.URL(https://www.abc.com/test.txt;)
  is
 sun.net.www.protocol.https.HttpsURLConnectionImpl.
 
  Can I get some help on this one?
 
  Thanks  Regards,
 George

Re: SSL Certificate Errors

2004-07-27 Thread Honey George
I do not know what caused this problem..but you can
solve this by explicitely trusting all the
certificates. And this will work if client side certs
are not used. You can find information on how to do
this in the following URL.
http://javaalmanac.com/egs/javax.net.ssl/TrustAll.html

Thanks,
  George

--- Craig, William S.
[EMAIL PROTECTED] wrote:  Hi,
 
 I'm experiencing the following errors while running
 Tomcat 4.1.27 on Win2K.
 I have a U.S. Government certificate in X.509 format
 trusted on Tomcat.
 I'm trying to communicate on SSL, but it appears
 that my certificate isn't
 trusted.  I followed the instructions - any ideas on
 why my certificate
 isn't being trusted (if that's my problem)   
 
 Thanks!!
 
 cacerts file:
 pa-ng-app, Jun 16, 2004 trustedCertEntry,
 Certificate fingerprint (MD5): DD:3D:8F.etc
 
 Errors:
 Exception Message:
 java.security.cert.CertificateException: Could not
 find
 trusted certificate 
  javax.net.ssl.SSLHandshakeException:
 java.security.cert.CertificateException: Could not
 find trusted certificate
 at

com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.a(DashoA6275)
 at

com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275)
 at

com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275)
 at

com.sun.net.ssl.internal.ssl.SunJSSE_az.a(DashoA6275)
 at

com.sun.net.ssl.internal.ssl.SunJSSE_az.a(DashoA6275)
 at

com.sun.net.ssl.internal.ssl.SunJSSE_ax.a(DashoA6275)
 at

com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275)
 at

com.sun.net.ssl.internal.ssl.SSLSocketImpl.j(DashoA6275)
 at

com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(DashoA6275)
 at

sun.net.www.protocol.https.HttpsClient.afterConnect(DashoA6275)
 at

sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(DashoA
 6275) at

sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(DashoA6275)
 at

com.plumtree.content.client.http.diagnostic.DiagnosticTestsUtil.connectAndCh
 eckResponseCode(DiagnosticTestsUtil.java:127) at

com.plumtree.content.client.http.diagnostic.DiagnosticTests.testConnectionWi
 thPortal(DiagnosticTests.java:644) at
 sun.reflect.NativeMethodAccessorImpl.invoke0(Native
 Method) at

sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
 ) at

sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
 .java:25) at
 java.lang.reflect.Method.invoke(Method.java:324) at

com.plumtree.content.client.http.diagnostic.DiagnosticTests.executeTestMetho
 d(DiagnosticTests.java:202) at

com.plumtree.content.client.http.diagnostic.DiagnosticTests.executeDiagnosti
 cTests(DiagnosticTests.java:178) at

com.plumtree.content.client.http.diagnostic.DiagnosticTests.getDiagnosticTes
 tResults(DiagnosticTests.java:150) at

org.apache.jsp.index_0002dinclude_0002ddiagnostics_jsp._jspService(index_000
 2dinclude_0002ddiagnostics_jsp.java:53) at

org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
 at
 ...etcetc. 
  





___ALL-NEW Yahoo! Messenger - 
all new features - even more fun!  http://www.allnewmessenger.com

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



Re: HttpUrlConnection.getInputStream() returns empty

2004-07-27 Thread Honey George
Hi reynir,
  I have made the changes as per you suggestion and I
am getting the response code as 200. But still the
inputstream returns empty, is.available() returns 0
bytes.

thanks,
 - george
--- Reynir_Þór_Hübner [EMAIL PROTECTED] wrote: 
hi,
 you could maybe try somthing like the following :
 
 try
 {
String str_url = https://www.domain.com;;
URL urlid = new URL(str_url);
HttpsURLConnection conn =
 (HttpsURLConnection)urlid.openConnection();
conn.setRequestMethod(GET);
conn.setDoOutput(false);
out.write(RESPONSECODE =  +
 conn.getResponseCode()+\nbr);
BufferedReader in1 = new BufferedReader(new 
 InputStreamReader(conn.getInputStream()));
String line;
while ((line = in1.readLine()) != null)
   out.write(line +\n);
 }
 catch (Exception e)
 {
e.printStackTrace(System.out);
 }
 
 hope it helps
 -reynir
 
 






___ALL-NEW Yahoo! Messenger - 
all new features - even more fun!  http://www.allnewmessenger.com

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



  1   2   3   4   5   >