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" 
> 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: 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: 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: 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: 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:  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:  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:  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  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  tag or what am I missing here?
> > 
> > Thanks in advance.
> > 
> > \trond
> > 
> > 
> > * server.xml
> > 
> > Server port="8005" shutdown="SHUTDOWN">
> > 
> >   
> > 
> >  >   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" />
> >   
> > 
> >   
> > 
> > 
> > 
> > 
> > 
> > 
> >>  resourceName="UserDatabase" />
> >   
> >   
> > 
> >   
> > 
> > 
> >   
> > 
> > **
> > 
> > 
> > 
> > 
> **
> > 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: 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: 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: 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:  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  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  tag or what am I missing here?
> 
> Thanks in advance.
> 
> \trond
> 
> 
> * server.xml 
> 
> Server port="8005" shutdown="SHUTDOWN">
> 
>   
> 
>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" />
>   
> 
>   
> 
> 
> 
> 
> 
> 
> resourceName="UserDatabase" />
>   
>   
> 
>   
> 
> 
>   
> 
> **
> 
> 
> 
> **
> 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: 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:  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  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  tag or what am I missing here?
> 
> Thanks in advance.
> 
> \trond
> 
> 
> * server.xml 
> 
> Server port="8005" shutdown="SHUTDOWN">
> 
>   
> 
>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" />
>   
> 
>   
> 
> 
> 
> 
> 
> 
> resourceName="UserDatabase" />
>   
>   
> 
>   
> 
> 
>   
> 
> **
> 
> 
> 
> **
> 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: 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
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 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 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:
> > > 
> > >  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
> > > > > 
> > > > 

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:
> 
>   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:
> > > > 
> > > >  > > docBase="webapps/test1">  > > > className="org.apache.catalina.realm.MemoryRealm"
> > > > debug=""
> > > > pathname="webapps/test1/META-INF/context-users.xml"
> > > > />
> > > > 
> > > 
> > > 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 
> > >  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: 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: 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: 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-03 Thread George Sexton
Yes. In my particular case, the server throughput in requests fell by 2.3%.

Of course, the bandwidth utilization fell also from 6Mb/s to 1.0Mb/s.

Additionally, you have to ask yourself how much more responsive the
application will seem to users. We host our web calendar application, and we
run compression on it.

Actually, at the co-location site we are moving to, we pay for bandwidth
usage. It's probably going to be cheaper to put another machine in than to
use 6 times more bandwidth.

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

> -Original Message-
> From: Peddireddy Srikanth [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, August 02, 2005 9:02 PM
> To: tomcat-user@jakarta.apache.org
> Subject: Re: HTTP/1.1 GZIP compression and its impact on server
> 
> Hi ,
> 
> On 8/1/05, George Sexton <[EMAIL PROTECTED]> wrote:
> > 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.
> 
> This means once u started using GZIP number of requests that are
> services by your server in one minute is fallen by 2.3 %. Essentially
> server's throughput is fallen.  Am I right ??
> 
> 
> > 
> > 
> > 
> > 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: 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]



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:
> 
>  
> enableLookups="false" redirectPort="8443" 
> protocol="AJP/1.3"
>maxThreads="500" minSpareThreads="75" 
> maxSpareThreads="250"/>
> 
>  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: 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
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]



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: Problem migrating from 4.1.30 to 5.5.7

2005-03-24 Thread George Sexton
The 

conf//

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



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]



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]



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]



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]



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: 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:
> 
>  
>  workDir="work/Catalina/localhost/jupiter"> 
>type="javax.sql.DataSource"/> 
>
>  
>   factory 
>   org.apache.commons.dbcp.BasicDataSourceFactory 
>  
>  
>   password 
>   3nv1ctus 
>  
>  
>   url 
>   jdbc:oracle:thin:@11.10.10.1:1521:dbname 
>  
>  
>   driverClassName 
>   oracle.jdbc.driver.OracleDriver 
>  
>  
>   maxActive 
>   0 
>  
>  
>   maxIdle 
>   40 
>  
>  
>   maxWait 
>   15000 
>  
>  
>   username 
>   envictus 
>  
>   
>   removeAbandoned  
>   true  
>
>   
>   removedAbandonedTimeout  
>   60  
>   
>
> 
> 
> 
> 
> 
> -
> 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: "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=67466&ProjectID=164428 HTTP/1.1" 500 612
> "http://www.../projectlist.jsp?SID=67466&ShowCart=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"
>

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: 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: 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: 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: 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: 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.(ZipFile.java:112)
> at java.util.jar.JarFile.(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:
>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" 
> 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" 
> > 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.
> &

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



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]



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:
> > 
> > 
> >   myservlet
> >   /myservlet/test
> > 
> > 
> > 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:



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:


And


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: WebSphere suuports servlets in does Tomcat?

2004-07-21 Thread George Sexton
I use Tomcat 5 and do this. Do you have a valid servlet mapping that points
to the servlet?

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

> -Original Message-
> From: R A [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, July 21, 2004 10:07 AM
> To: [EMAIL PROTECTED]
> Subject: WebSphere suuports servlets in  does Tomcat?
> 
> When entering a servlet(action) in the  tag, 
> Tomcat returns a directory listing. Does it support servlets 
> in the  tags?
> 
>   
> -
> Do you Yahoo!?
> Vote for the stars of Yahoo!'s next ad campaign!
> 


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



RE: Do servlets as welcome-files work in TC5?

2004-07-15 Thread George Sexton
The problem is the case of your entry in the Welcome file list, veruss the
case of your URL pattern.

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

> -Original Message-
> From: K.C. Baltz [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, July 14, 2004 3:22 PM
> To: Tomcat Users List
> Subject: Do servlets as welcome-files work in TC5?
> 
> I'm having trouble using a servlet as a welcome file in 
> Tomcat 5.  I haven't found any definitive documentation on 
> how to do it (The Servlet
> 2.4 spec doesn't even seem to be clear), but I've tried the 
> following (taken from: 
> http://www.onjava.com/pub/a/onjava/2004/02/11/jspcookbook.html):
> 
> |
> MyServlet 
> com.jspservletcookbook.MyServlet
> 
> 
> 
> MyServlet
> /myservlet
> 
> |
> 
> |
> MyServlet
> default.jsp
> |
> 
> 
> The names were changed to match my particular needs, but the 
> functionality should have been the same.  I'm using the 2.4 
> xsd.   The 
> servlet I'm trying to map is a Struts ActionServlet, so the 
> URL pattern is actually "*.do", not "/myservlet", but my 
> understanding is that it 
> shouldn't matter.   With that all done, requests to 
> http://mymachine/myWebapp/  should call MyServlet, but they don't.  
> Either default.jsp is returned or a directory listing if 
> default.jsp is missing. 
> 
> Does this work in TC5, and if so, how do I make it work?
> 
> K.C.
> 
> -
> 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] The Way Java Handles Date

2004-04-03 Thread George Sexton
I got tired of it once and wrote this class.

http://www.mhsoftware.com/resources/jar/doc/com/MHSoftware/dates/SaneDat
e.html

The totally brilliant thing about it is like xbase, date addition and
subtraction are greatly simplified.

George Sexton
MH Software, Inc.
Home of Connect Daily Web Calendar Software
http://www.mhsoftware.com/connectdaily.htm
Voice: 303 438 9585

-Original Message-
From: Yansheng Lin [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 02, 2004 9:48 AM
To: 'Tomcat Users List'
Subject: [OT] The Way Java Handles Date



Hi, Just wondering if anyone found this aspect of Java annoying.  I know
this is
usually a faq, and a lot of people have put a lot of efforts making it
better.
But I just find that the learning curve is a bit too steep for new
comers.  And
it hasn't been improve in j2sdk-1.5 either, at least from the interface
point of
view.  For example, a developer still has to go through the whole
Calendar and
DateFormat process to get a Date from a String 

I feel like complaining today:). 

-yan


-
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:Digitally Signing Posts

2004-03-16 Thread George Sexton
Would you either 

A)  Not sign posts to the group

Or 

B) Sign the posts with a working certificate?

Everytime I hit one of your messages, it locks my mail client up for 30
seconds.


Warning: 
The Certificate Revocation List needed to verify the signing certificate
is either unavailable or it has expired.
Signed by [EMAIL PROTECTED] using RSA/SHA1 at 12:48:09 AM 3/16/2004.

-Original Message-
From: Antonio Fiol Bonnín [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 16, 2004 12:48 AM
To: Tomcat Users List
Subject: Re: Load balancing for uptime


Hi,

To keep it up, you will need to setup session replication (See your 
Cluster element in server.xml), either in-memory or JDBC. Both are 
supposed to work.

However, that implies several things:
- Your session must contain Seralizable objects only.
- Your performance will be worse (how much worse highly depends on the 
size of the objects in your session)

And... nobody guarantees that your memory leak (if there is one) is not 
related to the information stored in sessions.

Depending on your load balancer, there is another option (IMHO, better 
for your case).

There are some load balancers that allow you to turn a server down while

keeping it up for currently established sessions, for a certain time. 
That allows you NOT to use session replication, thus not replicating any

instability related to sessions.

Oh, and last, if you need a good consultant for fixing, optimizing or 
redesigning your application, you just found one ;-)

Yours,


Antonio Fiol


Derek Clarkson wrote:

>Hi all,
>   We have an app written in a mix of JSP, servlets and struts
across 3
>instances of apache, tomcat and an RMI server. To say that it's a pile
of
>smelly stuff is an understatement, however it works (mostly) and our
>customers depend on it. At least once a week though it crashes with out
of
>memory errors. 
>
>Until we can redesign and fix it we are looking for a way to keep it
up. One
>suggest has been to have two servers running with a common DB server,
and to
>use a load balancer to allow us to keep one server up whilst we boot
the
>other, then vice versa. Thus on a daily basis we can reboot both
machines
>whilst mainting a working system for the users. 
>
>Can anyone see any problems with this ? I'm concerned about issue
realed to
>session management, etc.
>
>Ciao
>Derek
>
>
>__
>This email, including attachments, is intended only for the addressee
>and may be confidential, privileged and subject to copyright.  If you
>have received this email in error, please advise the sender and delete
>it.  If you are not the intended recipient of this email, you must not
>use, copy or disclose its content to anyone.  You must not copy or 
>communicate to others content that is confidential or subject to 
>copyright, unless you have the consent of the content owner.
>  
>



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



RE: Help tomcat problem with memory

2004-02-27 Thread George Sexton
Why don't you find someone who understands memory usage for your
operating system and have them explain the output of your commands to
you.

You have 700+MB being used as file cache. Your system is under no memory
pressure.

Your app is slow because

1)  It's compiling JSPs, and this takes some overhead on the first
hit.

OR

2)  You are hitting a database and not using connection pooling.
This can kill performance.

OR

3)  Your application is badly written.



-Original Message-
From: software [mailto:[EMAIL PROTECTED] 
Sent: Friday, February 27, 2004 1:35 PM
To: Tomcat Users List
Subject: Re: Help tomcat problem with memory


If  i have only two java proccess of 141 MB and 55 MB why my memory is 
over 90% of the utilization and the application working slowly or not 
working, when the users try to get access using the webserver in this 
server. i can't understand this problem...thnaks

Thanks a lot for you help
Fabian

software wrote:

> Hi this  the statemens that i posted in the catalina.sh file
> JAVA_HOME=/usr/java/j2sdk1.4.0 ; export JAVA_HOME
> CATALINA_HOME=/usr/local/tomcat1 ; export CATALINA_HOME
> JAVA_OPST="-server -Xms30m -Xmx40m -Dfile.encoding=ISO-8859-1"
> CATALINA_OPTS="-Xms30m -Xmx40m"
>
> This the output of the top command and both tomcats has been installed

> in the same server
>
> 1:22pm  up 21 days,  5:36,  6 users,  load average: 0.17, 0.23, 0.28
> 220 processes: 218 sleeping, 2 running, 0 zombie, 0 stopped
> CPU0 states:  9.5% user,  4.0% system,  0.0% nice, 85.5% idle
> CPU1 states:  7.4% user,  8.5% system,  0.4% nice, 83.3% idle
> Mem:  1030580K av, 1019220K used,   11360K free,   0K shrd,   
> 92348K buff
> Swap: 2096376K av,   58748K used, 2037628K free  
> 706776K cached
>
>  PID USER PRI  NI  SIZE  RSS SHARE STAT %CPU %MEM   TIME COMMAND
> 23447 root  25   0 86252  84M 18864 S 0.0  8.3   0:02 java
> 23461 root  15   0 86252  84M 18864 S 0.0  8.3   0:00 java
> 23462 root  15   0 86252  84M 18864 S 0.0  8.3   0:03 java
> 23463 root  15   0 86252  84M 18864 S 0.0  8.3   0:00 java
> 23464 root  15   0 86252  84M 18864 S 0.0  8.3   0:00 java
> 23474 root  15   0 86252  84M 18864 S 0.5  8.3   0:03 java
> 23475 root  20   0 86252  84M 18864 S 0.0  8.3   0:00 java
> 23476 root  20   0 86252  84M 18864 S 0.0  8.3   0:00 java
>
>
> Ralph Einfeldt wrote:
>
>> To what value did you set -Xms, -Xmm ?
>> Can you post the statement that sets the values ?
>> (Have seen to much typos in the past)
>> How much memory has your box ?
>>
>> What says the cpu load ?
>>
>> Can you post the head of the top output
>> hat shows the overall memory usage ?
>>
>> Are both tomcat instances on the same server ?
>>
>> Unless you have less than ~150 MB RAM I wouldn't expect that the 
>> memory usage is the problem if
>> each tomcat has it's own server, if they share the same server the 
>> box would need rougly 300 MB (Depending on how much memory is used by

>> other processes)
>>
>> Remember that all threads of the same vm share their memory.
>>
>>  
>>
>>> -Original Message-
>>> From: software [mailto:[EMAIL PROTECTED]
>>> Sent: Friday, February 27, 2004 6:07 PM
>>> To: Tomcat Users List
>>> Subject: Re: Help tomcat problem with memory
>>> Importance: High
>>>
>>>
>>> Yes i've configured the Tomcat environment -Xms, -Xmm but i think it

>>> doesn't work, because it's consume the server memory until 145 Mb 
>>> per process i need to limit the number of java proccess and the 
>>> memory that they consume on my Linux Red Hat 7.3  server
>>>
>>> thanks a lot
>>> fabian
>>>
>>> Ralph Einfeldt wrote:
>>>
>>>   
>>
>>
>> -
>> 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: so many servlets

2004-02-09 Thread George Sexton
While you can use the invoker, other engines don't have an equivalent.
If portability is at all important, you need to explicitly name them
out.

-Original Message-
From: geoffj [mailto:[EMAIL PROTECTED] 
Sent: Monday, February 09, 2004 12:56 AM
To: [EMAIL PROTECTED]
Subject: so many servlets


Hi

I have a large project on Tomcat 4.1 standalone.
Its servlets (about 100) are in four packages
and all in one jar. My problem is trivial
I'm sure but I cannot locate a solution.
Do I need to specify all the servlets
individually? Or can I just do something like

*
ie all the servlets in the lib-located jar of package package1
package1/*


 whatever

I'm really just trying to avoid typing out
this trivial info over and over. I have a
gadget that generates this tag-pair list from a
jar, but it is ugly.

Thanks

Geoff


-- 
Geoffrey Jenkins (Dr)

+61414 939523

[EMAIL PROTECTED]

thestrix.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: Yet another OT question.

2004-02-03 Thread George Sexton
Complain to the list maintainers or check your own MUA for a spurious
REPLY-TO header. The message comes in with two reply-to headers and my
MUA is just honoring them when I hit reply:

There are two cases going on here. The first is that you have invalid
SQL. You might be able to catch this by using a prepared statement
rather than a statement. In my experience, the preparation of the
statement will throw an error.

In the second case, if you really need notification about whether the
insert failed because the record existed, you need to create a stored
procedure and send back a result from it. The result will have to be in
the form of a record set (or if Oracle supports it, an OUTPUT variable).
This has the unfortunate side effect of increased overhead to handle the
result set.

I think the problem is that the executeUpdate() method was intentionally
designed to be light-weight and you are trying to use it in a situation
where you need more functionality.


Return-Path:
<[EMAIL PROTECTED]>
Received: from mail.apache.org (daedalus.apache.org [208.185.179.12])
by starbug.mhsoftware.com (8.12.8/8.12.8) with SMTP id
i135NvL8031350
for <[EMAIL PROTECTED]>; Mon, 2 Feb 2004 22:23:57 -0700
Received: (qmail 5054 invoked by uid 500); 3 Feb 2004 05:23:13 -
Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
Precedence: bulk
List-Unsubscribe: <mailto:[EMAIL PROTECTED]>
List-Subscribe: <mailto:[EMAIL PROTECTED]>
List-Help: <mailto:[EMAIL PROTECTED]>
List-Post: <mailto:[EMAIL PROTECTED]>
List-Id: "Tomcat Users List" 
Reply-To: "Tomcat Users List" <[EMAIL PROTECTED]>
Delivered-To: mailing list [EMAIL PROTECTED]
Received: (qmail 5030 invoked from network); 3 Feb 2004 05:23:12 -
Received: from unknown (HELO ms-smtp-01-eri0.socal.rr.com)
(66.75.162.133)
  by daedalus.apache.org with SMTP; 3 Feb 2004 05:23:12 -
Received: from short200 (dt0c5n7b.san.rr.com [24.94.16.123])
by ms-smtp-01-eri0.socal.rr.com (8.12.10/8.12.7) with SMTP id
i135NIOm024368
for <[EMAIL PROTECTED]>; Mon, 2 Feb 2004 21:23:21
-0800 (PST)
Reply-To: <[EMAIL PROTECTED]>
From: "David Short" <[EMAIL PROTECTED]>
To: "'Tomcat Users List'" <[EMAIL PROTECTED]>
Subject: RE: Yet another OT question.
Date: Mon, 2 Feb 2004 21:27:23 -0800
Message-ID: <[EMAIL PROTECTED]>
MIME-Version: 1.0
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook CWS, Build 9.0.6604 (9.0.2911.0)
In-reply-to: <[EMAIL PROTECTED]>
X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2600.
Importance: Normal
X-Virus-Scanned: Symantec AntiVirus Scan Engine
X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N
X-Bogosity: No, tests=bogofilter, spamicity=0.00, version=0.15.8




-Original Message-
From: David Short [mailto:[EMAIL PROTECTED] 
Sent: Monday, February 02, 2004 10:27 PM
To: 'Tomcat Users List'
Subject: RE: Yet another OT question.


How about replying to one email address or the other. ok?  I'm getting
duplicate messages.  Don't get me wrong, I appreciate your help. I just
don't need the same message twice.

-Original Message-
From: George Sexton [mailto:[EMAIL PROTECTED]
Sent: Monday, February 02, 2004 9:20 PM
To: 'Tomcat Users List'; [EMAIL PROTECTED]
Subject: RE: Yet another OT question.


The error is signaled by getting 0 back as the number of affected
records.

-Original Message-
From: David Short [mailto:[EMAIL PROTECTED]
Sent: Monday, February 02, 2004 10:16 PM
To: 'Tomcat Users List'
Subject: RE: Yet another OT question.


My statement is performing an insert, which would not return a result
set.
An executeQuery() would return a result set.  I too, read the
description
about returning an int.  I intentionally tried inserting a duplicate
value
in the index, trying to force an error, and no error was generated.  The
return value was 0.  So, it is returning zero (nothing was inserted) but
that's it.  No SQLException.  There's got to be a way to catch an error
like
this.

-Original Message-
From: George Sexton [mailto:[EMAIL PROTECTED]
Sent: Monday, February 02, 2004 8:10 PM
To: 'Tomcat Users List'; [EMAIL PROTECTED]
Subject: RE: Yet another OT question.


I broke out my JDBC handbook (JDBC API Tutorial and Reference, Second
Edition) and it says:

"Returns an int indicating the number of rows affeted by an
INSERT,UPDATE, or DELETE statement; 0 if no rows were affected or the
statement executed was a DDL statement."

"Throws SQLException if the sepcified argument is a statement that
generates a result set."

>From reading this, it appears the driver is compliant and working per
the specification.

-Original Message-
From: David Short [mailto:[EMAIL PROTECTED]
Sent: Mo

RE: Yet another OT question.

2004-02-02 Thread George Sexton
The error is signaled by getting 0 back as the number of affected
records.

-Original Message-
From: David Short [mailto:[EMAIL PROTECTED] 
Sent: Monday, February 02, 2004 10:16 PM
To: 'Tomcat Users List'
Subject: RE: Yet another OT question.


My statement is performing an insert, which would not return a result
set.
An executeQuery() would return a result set.  I too, read the
description
about returning an int.  I intentionally tried inserting a duplicate
value
in the index, trying to force an error, and no error was generated.  The
return value was 0.  So, it is returning zero (nothing was inserted) but
that's it.  No SQLException.  There's got to be a way to catch an error
like
this.

-Original Message-
From: George Sexton [mailto:[EMAIL PROTECTED]
Sent: Monday, February 02, 2004 8:10 PM
To: 'Tomcat Users List'; [EMAIL PROTECTED]
Subject: RE: Yet another OT question.


I broke out my JDBC handbook (JDBC API Tutorial and Reference, Second
Edition) and it says:

"Returns an int indicating the number of rows affeted by an
INSERT,UPDATE, or DELETE statement; 0 if no rows were affected or the
statement executed was a DDL statement."

"Throws SQLException if the sepcified argument is a statement that
generates a result set."

>From reading this, it appears the driver is compliant and working per
the specification.

-Original Message-
From: David Short [mailto:[EMAIL PROTECTED]
Sent: Monday, February 02, 2004 7:59 PM
To: 'Tomcat Users List'
Subject: RE: Yet another OT question.


I pulled the latest (1.2 for Oracle 8.1.7) off of Oracle's web site
today.

-Original Message-
From: George Sexton [mailto:[EMAIL PROTECTED]
Sent: Monday, February 02, 2004 6:33 PM
To: 'Tomcat Users List'; [EMAIL PROTECTED]
Subject: RE: Yet another OT question.


Probably a flake in the Oracle driver. Check you are using the latest
one.

-Original Message-
From: David Short [mailto:[EMAIL PROTECTED]
Sent: Monday, February 02, 2004 4:18 PM
To: 'Tomcat Users List'
Subject: Yet another OT question.


It seems like a slow day on the list so, thought I'd throw my issue out
there.

I'm working with Tomcat 4.1.0, Oracle 8.1.7 and JDBC 1.2.  It seems that
the
JDBC executeUpdate() method doesn't raise an exception when I pass an
incorrect SQL statement.  It returns 0 rows, but no exception.  Anyone
seen
this before?



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


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



RE: Yet another OT question.

2004-02-02 Thread George Sexton
I broke out my JDBC handbook (JDBC API Tutorial and Reference, Second
Edition) and it says:

"Returns an int indicating the number of rows affeted by an
INSERT,UPDATE, or DELETE statement; 0 if no rows were affected or the
statement executed was a DDL statement."

"Throws SQLException if the sepcified argument is a statement that
generates a result set."

>From reading this, it appears the driver is compliant and working per
the specification.

-Original Message-
From: David Short [mailto:[EMAIL PROTECTED] 
Sent: Monday, February 02, 2004 7:59 PM
To: 'Tomcat Users List'
Subject: RE: Yet another OT question.


I pulled the latest (1.2 for Oracle 8.1.7) off of Oracle's web site
today.

-----Original Message-
From: George Sexton [mailto:[EMAIL PROTECTED]
Sent: Monday, February 02, 2004 6:33 PM
To: 'Tomcat Users List'; [EMAIL PROTECTED]
Subject: RE: Yet another OT question.


Probably a flake in the Oracle driver. Check you are using the latest
one.

-Original Message-
From: David Short [mailto:[EMAIL PROTECTED] 
Sent: Monday, February 02, 2004 4:18 PM
To: 'Tomcat Users List'
Subject: Yet another OT question.


It seems like a slow day on the list so, thought I'd throw my issue out
there.

I'm working with Tomcat 4.1.0, Oracle 8.1.7 and JDBC 1.2.  It seems that
the
JDBC executeUpdate() method doesn't raise an exception when I pass an
incorrect SQL statement.  It returns 0 rows, but no exception.  Anyone
seen
this before?



-
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: Yet another OT question.

2004-02-02 Thread George Sexton
Probably a flake in the Oracle driver. Check you are using the latest
one.

-Original Message-
From: David Short [mailto:[EMAIL PROTECTED] 
Sent: Monday, February 02, 2004 4:18 PM
To: 'Tomcat Users List'
Subject: Yet another OT question.


It seems like a slow day on the list so, thought I'd throw my issue out
there.

I'm working with Tomcat 4.1.0, Oracle 8.1.7 and JDBC 1.2.  It seems that
the
JDBC executeUpdate() method doesn't raise an exception when I pass an
incorrect SQL statement.  It returns 0 rows, but no exception.  Anyone
seen
this before?



-
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: RTFM

2004-01-14 Thread George Sexton
I guess it just shows how much perceptions can vary with Email.

I read your first paragraph and formed the impression that the subject
was designed to generate additional interest and to work to prioritize
your request for help.



-Original Message-
From: Jerald Powel [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 14, 2004 5:33 PM
To: Tomcat Users List
Subject: RE: RTFM


in traditional fashion, the subject was related to the contents of body
of the email. 

George Sexton <[EMAIL PROTECTED]> wrote:I generally don't think it
is required to resort to things like this to
"get our attention". 

-Original Message-
From: Jerald Powel [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 14, 2004 3:11 PM
To: Tomcat Users List
Subject: RTFM



Hi,

Now I have your attention, will someone tell me if it is
possible to forward control (either by JSP or Servlet) from one context
to another, in the same browser window? i.e:



forward from http://locahost:8080/app1/...

to http://locahost:8080/app2/... in the same window (IE).



It is either so glaringly obvious that no one deems an answer worthwhile
(RTFM), or so really really difficult, and no one knows how do this.
Surely not. Either way I need to know. 



A yes or no will suffice, is it possible? If it is, any further
direction after that is of course appreciated!



Gerald.



P.S I am using Apache Tomcat 4.0.6, and have found no doco on this




-
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


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



RE: RTFM

2004-01-14 Thread George Sexton
I generally don't think it is required to resort to things like this to
"get our attention". 

-Original Message-
From: Jerald Powel [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 14, 2004 3:11 PM
To: Tomcat Users List
Subject: RTFM



Hi,

Now I have your attention, will someone tell me if it is
possible to forward control (either by JSP or Servlet) from one context
to another, in the same browser window? i.e:

 

forward from http://locahost:8080/app1/...

to http://locahost:8080/app2/... in the same window (IE).

  

It is either so glaringly obvious that no one deems an answer worthwhile
(RTFM), or so really really difficult, and no one knows how do this.
Surely not. Either way I need to know. 

 

A yes or no will suffice, is it possible? If it is, any further
direction after that is of course appreciated!

  

Gerald.

 

P.S I am using Apache Tomcat 4.0.6, and have found no doco on this

 


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


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



RE: Invoking JSPs in batch like environment

2004-01-12 Thread George Sexton
If you are using UNIX, then wget is the answer. If you are using
Windows, you will have to use Windows Scripting Host to create and
instance of IE and retrieve the URL.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] 
Sent: Monday, January 12, 2004 1:42 AM
To: [EMAIL PROTECTED]
Subject: Invoking JSPs in batch like environment


Hello,

I would like to use JSPs in oder to generate textfile like output in a
batch
program. 
The idea is to invoke the Servlets which have been gerenated on the
basis of
the JSPs. 
Also, the OutputStream of the JSP/Servlet Response class has to be
configured and necessary bean instances have to be added as attributes
before invokation.

I would like to know if the Jasper library (or something else) can be
used
in some way to alleviate the setup of the necessary environment for the
JSP
execution.

Kindest regards,

Alexander Thomas


-
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: Microsoft SQL Server validation query

2004-01-09 Thread George Sexton
How about one of these:

Select @@VERSION

Or

Select getdate() as CurrentDate

-Original Message-
From: Derek Mahar [mailto:[EMAIL PROTECTED] 
Sent: Thursday, January 08, 2004 8:15 AM
To: Tomcat Users List
Subject: Microsoft SQL Server validation query


Does anyone happen to know which validation query I should use for
Microsoft SQL Server?

Derek

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

2004-01-09 Thread George Sexton
Using SQL Enterprise manager, find out what process is holding a lock,
and what it's last statement was. You do know that you have to rollback
failed update statements don't you?

-Original Message-
From: Hooper, Brian [mailto:[EMAIL PROTECTED] 
Sent: Friday, January 09, 2004 9:19 AM
To: Tomcat Users List
Subject: Tomcat Deadlock


I'm having a weird problem with Tomcat locking up.  I have a couple of
functions on my site that rely heavily on transactions.  To do a simple
load test, I picked the function that hits the database the most and
opened that same page in two different browser windows.  I hit the
submit button at roughly the same time, and waited.  It appeared that
both browser windows stalled.  I looked at the processes in SQL Server
(2000) and it said that all of the processes for the app were sleeping,
and the two being used were sitting on insert statements for the same
table (database deadlock?).  I let both browsers sit trying to load for
a lot longer than it should have taken for the page to finish, then just
closed the windows.  After that, the site was no longer accessible.  The
only way to get it working again was to restart the Tomcat service.

Looking at the various log files, the only entry that appears
interesting is the following from the site's log:
2004-01-09 10:43:18 StandardWrapper[/WIPT:action]: Waiting for 2
instance(s) to be deallocated

I'm using tomcat 4.1.27 with SQL Server 2000 on a Win2K box.  I've been
having similar problems off and on for the last couple of weeks and have
tried a number of different things to fix it.  I made sure I closed all
connections, statements, and result sets.  I put all of the close code
in a finally block.  Another quick question - if the browser is closed
in the middle of an operation, is the code in the finally block
executed?

Here is the JNDI data source definition from server.xml:

  
  
 
factoryorg.apache.commons.dbcp.BasicDataS
ourceFactory

 
driverClassNamecom.jnetdirect.jsql.JSQLDr
iver
 
urljdbc:JSQLConnect://:1433/WIPT
username
password

maxActive15
maxIdle15
minIdle2
maxWait1

validationQuerySELECT
1+1
testOnBorrowtrue
testOnReturntrue
testWhileIdletrue
 
timeBetweenEvictionRunsMillis180
testWhileIdletrue
 
numTestsPerEvictionRun3

 
removeAbandonedtrue
 
removeAbandonedTimeout300
logAbandonedtrue
  

Thanks!
-Brian

-
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: RE: virtual hosting? anyone succeed?

2004-01-06 Thread George Sexton
Using the Admin application, click on the service (Generally, "Service
(Catalina)"). From the service actions dropdown, select the option to
create a new host.



-Original Message-
From: 29djeo [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 06, 2004 8:56 AM
To: George Sexton
Cc: [EMAIL PROTECTED]
Subject: RE: RE: virtual hosting? anyone succeed?




so you have two instances of tomcat running?  Otherwise how do you have
two root contexts? 

I was thinking of running two tomcats and fronting them with apache as a
way to achieve virtual hosting.  That way I could have seperate jvms
handle my servlet requests.

   ---Original Message---
   > From: George Sexton <[EMAIL PROTECTED]>
   > Subject: RE: RE: virtual hosting? anyone succeed?
   > Sent: 06 Jan 2004 10:32:53
   >
   >  I
   >  didn't. I created virtual hosts. Each virtual host has its own
root
   >  context.
   >  
   >  
   >  -Original Message-From: 29djeo
   >  [mailto:[EMAIL PROTECTED] Sent: Friday, January 02, 2004
   >  3:35 PMTo: George SextonSubject: Re: RE: virtual
   >  hosting? anyone succeed?How did you do this so that
   >  http://www.yourdomain.com will take you to a context named
/yourdomain in
   >  webapps and not the ROOT context?---Original
   >  Message---> From: George Sexton
   >  <[EMAIL PROTECTED]>> Subject: RE: virtual hosting? anyone
   >  succeed?> Sent: 21 Dec 2003 10:41:58>> I run about 6-8
   >  virtual hosts on one installation. I created them using> the Admin
   >  application and had no problems.> > -Original
   >  Message-> From: 29djeo [mailto:[EMAIL PROTECTED]>
   >  Sent: Saturday, December 20, 2003 11:34 AM> To:
   >  [EMAIL PROTECTED]> Subject: virtual hosting? anyone
   >  succeed?> > > Has anyone succeeded in getting tomcat
   >  5.0.16 set up for virtual hosting> without using apache as a front
   >  end?> > I'm trying to get one instance of tomcat to serve two
   >  domains on the> same machine.> > I have added two Host
   >  sections to server.xml and I see the following> behavior when I
access
   >  the sites from a browser running on the same host> as tomcat:>
   >  > http://localhost:8080 - default context>
   >  http://www.mydomain1.com - blank page> http://www.mydomain2.com -
blank
   >  page> http://mydomain1:8080 - correctly runs the mydomain1
   >  context> http://mydomain2:8080 - correctly runs the mydomain2
   >  context> > how do I get www.mydomain1.com and www.mydomain2.com
   >  to show the correct> contexts?> > from another host on my
   >  network the only context I can load is> http://hostname:8080 to
see the
   >  default context. All other contexts> like http://www.mydomain1.com
and
   >  http://domain1.com:8080 result in an> "action cancelled" from
ineternet
   >  explorer.> > Here is an excerpt from server.xml:>
   >  > >  maxSpareThreads="75"
   >  enableLookups="false" redirectPort="8443"> acceptCount="100"
   >  debug="0" connectionTimeout="2"> disableUploadTimeout="true"
   >  />>  debug="0" protocol="AJP/1.3"/>>
   >  >
   >  
   >  prefix="catalina_log." suffix=".txt" timestamp="true"/>> 
debug="0"
   >  resourceName="UserDatabase"/>>  unpackWARs="true" autoDeploy="true"
   >  xmlValidation="false"> xmlNamespaceAware="false">>
   >  
   >  directory="logs" prefix="localhost_log." suffix=".txt"/>>
   >  >  unpackWARs="true">>
   >  www.mydomain1.com> 
directory="logs"
   >  prefix="mydomain1." suffix=".log" timestamp="true"/>> 
   >  reloadable="true"/>> > 
   >  unpackWARs="true">>
   >  www.mydomain2.com> 
directory="logs"
   >  prefix="mydomain2." suffix=".log" timestamp="true"/>> 
   >  reloadable="true"/>> > >
   >  ---Original
   >  Message---
   ---Original Message---




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



RE: Have some questions, also possible contract work up for grabs

2004-01-03 Thread George Sexton
Stay away from hosting. Very few hosting companies have their act
together. Buy your own hardware and co-locate it if you must.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Friday, January 02, 2004 4:02 PM
To: [EMAIL PROTECTED]
Subject: Have some questions, also possible contract work up for grabs


Hi everyone,

I had some questions regarding Tomcat.  Is Tomcat able to handle a
steady 
stream of about 200 years efficiently without crashing, being
unreliable, 
etc.. ? I personally don't know the limitations of it as I am fairly new
to 
Java.

What would an ideal server be to handle that type of userbase?  Right
now it's 
running on a 1ghz celeron with I believe 512mb of ram running linux.

Do any hosting companies offer reasonably priced colocation or flexible 
accounts with tomcat, php, and mysql installed?  The IT company I work
for has 
developed a great piece of software using JSP and Java technology but we
need 
to get it onto a good box for production use.

Does anyone here offer services such as using SSH to install Tomcat
remotely?  
We would be willing to pay for someone to install Tomcat in a short
timeframe.  

The ideal person would be someone that knows Tomcat installation quite
well.  
We have installed it on a couple boxes,  but usually by a lot of trial
and 
error.  We would like to get it up and running properly very quickly.

If anyone is interested, please send me an email and I can send you the 
details.  I apologize in advance if this is not the place for an email
like 
this.  I figured this was probably one of the best places for an
experienced 
Tomcat userbase.

Thank you all very much for your time,

~Graham



-
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: How is catch{} code handled

2004-01-02 Thread George Sexton
If you are really wedded to this architecture (and it's not really that
bad) then a good approach could be something like:

Public class myServlet extends HttpServlet {
doGet(HttpServletRequest req, HttpServletResponse res) {

try {
// All servlet code happens between this try catch pair.
//
// Beginning of servlet
MyClass.invokeSubRoutine();

// End of Servlet
} catch (ProcessingInterruptedException PIE){
return;
} finally {
}

}
}

Public class MyClass {

public static int invokeSubRoutine() 
throws ProcessingInterruptedException {
ProcessingInterruptedException pieThrow=null;


try {
// Some JDBC Code
} catch (SQLException se) {
// Log it
// Send Redirect
pieThrow=new ProcessingInterruptedException();
// Alternatively
throw new ProcessingInterruptedException();
}

if (pieThrow!=null){
throw pieThrow;
}
return retVal;
}

}

This code is somewhat cleaner because it forces the caller to handle the
exception. In general, the idea behind exceptions is that nobody checks
return codes so let's use the compiler to force them to catch an error.

George Sexton
MH Software, Inc.
Home of Connect Daily Web Calendar Software
http://www.mhsoftware.com/connectdaily.htm
Voice: 303 438 9585

-Original Message-
From: Merrill Cornish [mailto:[EMAIL PROTECTED] 
Sent: Friday, January 02, 2004 1:00 PM
To: Tomcat Users List
Subject: Re: How is catch{} code handled


George,

>Unfortunately, your logic is flawed.
>  
>
Yes, that's very clear at this point.  :-)

I understand that the sendRedirect() does NOT terminate the execution 
flow that it is in.  That's why I follow each one with a return. 
However, I think I now recognize my problem.

In my mind, I've always associated a catch{} with an exception and 
nothing "escapes" from the exception.  And that's true, assuming you did

NOT do what I did and disolve the exception into a simple message that 
displayed as text on a JSP page.  As I now see, in THAT case, the 
catch{} DOES return, thereby allowing multiple sendRedirect()s to
occurs.

Thank you for setting my thinking straight.

Merrill

-
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: How is catch{} code handled

2004-01-02 Thread George Sexton
Unfortunately, your logic is flawed.

The major flaw is that sendRedirect() does not terminate processing of
the servlet. IOW, this is happening:

Servlet Invoked
Sub-Routine Invoked
SQLException Generated
Exception Caught
Send-Redirect to Error Handler
exit Sub-Routine Via Return
More code executed
Send-Redirect() Issued -> Throws IllegalStateException


Essentially, because you are not checking the return state from your
sub-routine, you are having a problem. You need to return some sort of
value from the sub-routine that indicates processing should stop.

-Original Message-
From: Merrill Cornish [mailto:[EMAIL PROTECTED] 
Sent: Friday, January 02, 2004 12:06 PM
To: Tomcat Users List
Subject: How is catch{} code handled


My sudden IllegalStateException problem turned out to be caused by my 
error handling technique, but I'm not sure why.

When I started this project (as a way or learning JSP), I have 
EVERYTHING in JSP pages, meaning that there was a lot of Java code in <%

... %> sections of the JSP page.  I added an errorPage declaration to 
each of my JSP pages to divert all errors to my standard error handling 
page--and all was well.

Later, I decided to limit the JSP pages to HTML as much as possible and 
move all of the Java program logic into servlets.  I left the errorPage 
declarations in the JSP pages, although there wasn't much left there to 
throw an exception.

In the servlets, I used the standard try/catch constructs to intercept 
exceptions.  However, I decided I wanted the exceptions caught in 
servlets to be handled by the same error page as the JSP pages used. 
Rather than have EVERY catch{} clause do the redirect, I defined a 
utility subroutine named errorPage() that collected various information 
in the catch{} clause, then called sendRedirect() to the error page.

Separate from these catch{} clauses, whenever the processing in a 
servlet was complete, it ended with a sendRedirect() to the next JSP 
page followed immediately by a return. I had assumed that the 
sendRedirect()s in the main servlet code were "safe" from the 
sendRedirect() in the catch{} cause since--as I understood it--once the 
exception was thrown and the catch{} entered, nothing else in the 
servlet was processed.

However, my "IllegalStateException" experience suggests there is 
something going on with catch{} that I don't understand.  Or, as a 
friend of mine used to say, "I don't understand all I know about that."
:-)

To recap, I got an IllegalStateExceptioni pointing to a sendRedirect() 
in a servlet until I effectively removed the sendRedirect() by returning

before the sendRedirect() could be reached.  Only then did I see an 
SQLException  intercepted by a catch{} and redirected with 
sendRedirect() to the error page.

Why did main servlet processing appear to continue (allowing the second 
sendRedirect() to cause a problem) after the exception was triggered?

Merrill Cornish

-
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: Admintool cannot save changes to servers.xml

2003-12-29 Thread George Sexton
At this point I only have two ideas.

Idea # 1 is that you are starting tomcat with some sort of flags that
affect security.

Idea # 2 is to use strace to run tomcat and see if you can sort out from
the strace logs what is happening.

-Original Message-
From: news [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED]
Sent: Monday, December 29, 2003 5:00 AM
To: [EMAIL PROTECTED]
Subject: Re: Admintool cannot save changes to servers.xml


George Sexton wrote:
> Do the log files contain no information?

Hi George,

I tried with a clean installation and this time also checked the log 
files. As I'm not so familiar with understanding these log files, I've 
put them all up on <http://home.arcor.de/plsdontreply/tomcatlogs/>.
In the adminlog, 
<http://home.arcor.de/plsdontreply/tomcatlogs/localhost_admin_log.2003-1
2-29.txt>
I cannot find anything regarding "save" or "Commit Changes".

Maybe you can find out whats wrong from my log files.

-- 
[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: Admintool cannot save changes to servers.xml

2003-12-28 Thread George Sexton
Do the log files contain no information?

-Original Message-
From: news [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED]
Sent: Sunday, December 28, 2003 2:06 AM
To: [EMAIL PROTECTED]
Subject: Re: Admintool cannot save changes to servers.xml


George Sexton wrote:
> I use the admin app and it works for me. Does the user that Tomcat run
> under have permissions to the file and directory?

Hi George,

I checked this already. In /etc/init.d/tomcat, I have:

TOMCAT_USER=root

and authorizations are:

drwxr-xr-x  3 root   root 264 2003-12-28 09:08 .
drwxr-xr-x 11 root   root 352 2003-12-27 13:47 ..
drwxr-xr-x  4 root   root  96 2003-12-27 14:23 Catalina
-rw---  1 root   root6804 2003-11-30 16:06 catalina.policy
-rw---  1 root   root2715 2003-11-30 16:06 catalina.properties
-rw---  1 root   root 778 2003-11-30 16:06 jk2.properties
-rw---  1 root   root   18052 2003-12-27 15:00 server.xml
-rw-r--r--  1 root   root 460 2003-12-28 09:08 tomcat-users.xml
-rw---  1 root   root   37398 2003-11-30 16:06 web.xml
linux:/opt/jakarta-tomcat-5.0.16/conf #

I can't see any reason why this shouldn't work. But when, after e.g.
Create_New_Host to a service, klicking on save button, the (left) 
navigation pane changes to admin-login-screen. And the only thing that 
Commit Changes button does is to change the top frame to
admin-login-screen.
   Also, after changing some User Definition, "Commit Changes" button 
will change top frame into login screen, whereas Save button does not 
affect the navigation pane.

Any other idea that would be helpful for me?

-- 
[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: StringBuffer Factory?

2003-12-27 Thread George Sexton
This is a really bad idea because of the implementation of
StringBuffer.toString() and setLength().


http://developer.java.sun.com/developer/bugParade/bugs/4724129.html



George Sexton
MH Software, Inc.
Home of Connect Daily Web Calendar Software
http://www.mhsoftware.com/connectdaily.htm
Voice: 303 438 9585


-Original Message-
From: Philipp Taprogge [mailto:[EMAIL PROTECTED] 
Sent: Saturday, December 27, 2003 6:21 PM
To: Tomcat Users List
Subject: StringBuffer Factory?


Hi!

I was just working on a little project of mine when a thought sprang 
to my mind...
In my servlets I often have to assemble Strings like SQL statements 
and the like. I use StringBuffers for this as they offer much better 
performance than concat. Now I was wondering: would it make any sense 
at all to get my StringBuffers from a pool by using JNDI instead of 
having each servlet create new ones? I am not sure of the runtime cost 
involved in JNDI lookups. Any thoughts?

Phil


-
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: Admintool cannot save changes to servers.xml

2003-12-27 Thread George Sexton
I use the admin app and it works for me. Does the user that Tomcat run
under have permissions to the file and directory?

-Original Message-
From: news [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED]
Sent: Saturday, December 27, 2003 2:16 PM
To: [EMAIL PROTECTED]
Subject: Admintool cannot save changes to servers.xml


Hi Folks,

I've just set up Tomcat 5.0.16 on my Linux (SuSe 8.2) and there is one 
little problem that I couldn't solve from Tomcat's documentation.

Problem:
Administration tool seems to work fine, but klicking "Commit Changes" 
after saving does not change anything on server.xml file nor does it 
backup that file.

Question:
What do I have to change in order to enable admintool to save changes to

server.xml?

Some details:
Java is version 1.4.2_02
Apache is 2.0.48 from SuSE
JK2 connection is working
Installation directory is /opt/jakarta-tomcat-5.0.16
Owner:group of tomcat is root:root

Can somebody give me a hint?
-- 
[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: Memory comsuption

2003-12-26 Thread George Sexton
They are threads in the same process.

> You may also want to search the web for "linux java ps threads"

-Original Message-
From: Luis Daniel Alvarez [mailto:[EMAIL PROTECTED] 
Sent: Friday, December 26, 2003 1:42 PM
To: Tomcat Users List
Subject: Re: Memory comsuption


What about the others 50 or 70 java process with 50M of memory
comsuption
too?

Daniel Alvarez
ISP-InfoCom

- Original Message - 
From: "George Sexton" <[EMAIL PROTECTED]>
To: "'Tomcat Users List'" <[EMAIL PROTECTED]>
Sent: Friday, December 26, 2003 3:30 PM
Subject: RE: Memory comsuption


> I don't understand why you think you have a problem.
>
> You have a machine with 2GB of memory installed.
>
> 84MB is free RAM, and the OS is using 330MB of ram for cache buffers.
>
> Tomcat is using some 50MB of RAM.
>
> The machine is clearly not under any kind of memory stress
>
> FWIW, the memory options are case sensitive, and I think you need a
> capital M at the end. Although, why you would want to limit RAM
> consumption to 1GB, when you are complaining about tomcat using 50MB
is
> quite beyond me.
>
> You may also want to search the web for "linux ps threads"
>
> -Original Message-
> From: Luis Daniel Alvarez [mailto:[EMAIL PROTECTED]
> Sent: Friday, December 26, 2003 12:59 PM
> To: Tomcat Users List
> Subject: Memory comsuption
>
>
> Hi list
> I'm having problem with my memory, as you can see from my top command
I
> get this:
>
> Mem:  2323420K av, 2239036K used,   84384K free,   0K shrd,
330720K
> buff
> Swap: 2097096K av,   19176K used, 2077920K free
1576784K
> cached
>
> PID USER PRI  NI  SIZE  RSS SHARE STAT %CPU %MEM   TIME COMMAND
> 25772 tomcat49   0 51112  49M 11072 S 0.0  2.1   0:00 java
> 25773 tomcat49   0 51112  49M 11072 S 0.0  2.1   0:00 java
> 25774 tomcat49   0 51112  49M 11072 S 0.0  2.1   0:00 java
> 25775 tomcat49   0 51112  49M 11072 S 0.0  2.1   0:00 java
>
> This is just an example of 52 or 75 java process that always been
> running
> What can I do to slow down memory comsuption of my java process.
>
> I try solve this changing
> maxProcessors="75" to maxProcessors="15" and
> exporting CATALINA_OPTS=-Djava.awt.headless=true -Xmx1024m
> but nothing change.
>
> thanks in advance
>
>
> Daniel Alvarez
> ISP-InfoCom
>
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.554 / Virus Database: 346 - Release Date: 20/12/2003
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.554 / Virus Database: 346 - Release Date: 20/12/2003


-
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: Memory comsuption

2003-12-26 Thread George Sexton
I don't understand why you think you have a problem. 

You have a machine with 2GB of memory installed.

84MB is free RAM, and the OS is using 330MB of ram for cache buffers.  

Tomcat is using some 50MB of RAM.

The machine is clearly not under any kind of memory stress

FWIW, the memory options are case sensitive, and I think you need a
capital M at the end. Although, why you would want to limit RAM
consumption to 1GB, when you are complaining about tomcat using 50MB is
quite beyond me.

You may also want to search the web for "linux ps threads"

-Original Message-
From: Luis Daniel Alvarez [mailto:[EMAIL PROTECTED] 
Sent: Friday, December 26, 2003 12:59 PM
To: Tomcat Users List
Subject: Memory comsuption


Hi list
I'm having problem with my memory, as you can see from my top command I
get this:

Mem:  2323420K av, 2239036K used,   84384K free,   0K shrd,  330720K
buff
Swap: 2097096K av,   19176K used, 2077920K free 1576784K
cached

PID USER PRI  NI  SIZE  RSS SHARE STAT %CPU %MEM   TIME COMMAND
25772 tomcat49   0 51112  49M 11072 S 0.0  2.1   0:00 java
25773 tomcat49   0 51112  49M 11072 S 0.0  2.1   0:00 java
25774 tomcat49   0 51112  49M 11072 S 0.0  2.1   0:00 java
25775 tomcat49   0 51112  49M 11072 S 0.0  2.1   0:00 java

This is just an example of 52 or 75 java process that always been
running
What can I do to slow down memory comsuption of my java process.

I try solve this changing 
maxProcessors="75" to maxProcessors="15" and 
exporting CATALINA_OPTS=-Djava.awt.headless=true -Xmx1024m
but nothing change.

thanks in advance


Daniel Alvarez
ISP-InfoCom


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.554 / Virus Database: 346 - Release Date: 20/12/2003


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



RE: RES: TCP-FIN problem

2003-12-23 Thread George Sexton
Just one little detail with setContentLength(). If you are writing a
string out, make really sure that your content length is correct. If it
is not, the connection will stay open.

A common mistake (at least one I have made) is to think that the
character count in a buffer is the number of bytes in the content.
Depending upon your character set, this may not be true. If you are
using UTF-8, accented characters are almost certainly being written as
two bytes.

-Original Message-
From: Sebastian Klenk [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 23, 2003 10:19 AM
To: Tomcat Users List
Subject: Re: RES: TCP-FIN problem


Maybe with a little bit more detail:


Application Code:




try {

ClientSocket = new Socket(IPAddress, Port);
Sender = new
OutputStreamWriter(ClientSocket.getOutputStream());
Reciever = new
InputStreamReader(ClientSocket.getInputStream());


} catch (UnknownHostException e) {
 System.err.println("Unknown host: " +
IPAddress);
} catch(IOException e){
 System.err.println("IOException: " + IPAddress
+ " -> " + 
e.getMessage());
}

.
.
.



String Message = new String(Method + " " + File +"
HTTP/1.1\r\n");
 Sender.write(Message,0,Message.length());

 /* HOST */
 Message = new String("Host: "+ IPAddress +":" + Port +
"\r\n");
 Sender.write(Message,0,Message.length());

 Message = new String("Content-Type: text/xml\r\n");
 Sender.write(Message,0,Message.length());

 Message = new String("Content-length: 
"+Data.length()+"\r\n\r\n");
 Sender.write(Message,0,Message.length());
 Sender.write(Data,0,Data.length());

 Sender.flush();

.
.
.



 try {

 int c;
 while(-1 != (c = Reciever.read()))
 XMLBuffer.append((char)c);

 }catch (EOFException e){
 }catch (Exception e) {
 System.out.println("getServer() : Exception Cought: " + 
e.getMessage());
 return null;
 }





Servlet code could look like this



 public void doGet(HttpServletRequest request, HttpServletResponse 
response)
 throws IOException, ServletException {





 try{
 
Data.getDataSQL(JDBCDriver,JDBCPath,JDBCUser,JDBCPasswd,Edit);
 }catch(Exception e){
 getLogger().writeToLog("Database Read Statement Error: 
" + e.toString() + " -> " + Edit);
 }
 response.getWriter().print(Data);
 response.setContentLength(Data.toString().length());
 }


Hope this makes all a little bit clearer!


Philipp Taprogge wrote:
> Hi!
> 
> Sebastian Klenk wrote:
> 
>> I didn't do anything ... the only problem I have is that my app. is 
>> not very fast, and that is because it has to wait for tomcat to close

>> the connection, but tomcat closes the connection a lot later (ca 1 
>> minute).
>> My question is now if there is a way to tell tomcat that all data has

>> been written an that the connection can be closend!?
> 
> 
> Your problem is not tomcat, but the application. Tomcat uses a default

> timeout of 60 seconds on the socket. But what seems to happen in your 
> case is not tomcat causing that timeout, but _experiencing_ it.
> Your application is not closing the connection properly and tomcat
keeps 
> it open until the timeout occurs. Could you perhaps post more 
> information on that application? Is it written in Java as well?
Perhaps 
> you could post some code snipplets?
> 
> Phil
> 
> 
> -
> 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: postgres configuration

2003-12-22 Thread George Sexton
This is obviously not a Tomcat problem.

Please ask your question in a forum for your operating system (probably
the best place) or in a PostgreSQL forum.

You may also want to refer to this document:

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

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Monday, December 22, 2003 4:32 AM
To: [EMAIL PROTECTED]
Subject: postgres configuration


 Hello all
 
 i am Inserting data to  postgresql question please help
me solve this problem  i am not given any username ans password by the
time of creating db what should be the username and password and how
shout i use -i option for starting postmaster 
pls help me


configuration i made are



I am connecting postgresql and inserting some data and 
i made in pg_hdb.conf file to host  all   all
127.0.0.0  255.255.255.255trust

and postgresql.conf  to tcpip_socket =true

pls
help me solve the problem


Regards
Dhayalan.G

[EMAIL PROTECTED] root]# java HelloPostgresql test root ""


***Exception:
org.postgresql.util.PSQLException: Connection refused. Check that the
hostname and port are correct and that the postmaster is accepting
TCP/IP connections.
org.postgresql.util.PSQLException: Connection refused. Check that the
hostname and port are correct and that the postmaster is accepting
TCP/IP connections.
   at
org.postgresql.jdbc1.AbstractJdbc1Connection.openConnection(AbstractJdbc
1Connection.java:204)
   at org.postgresql.Driver.connect(Driver.java:139)
   at java.sql.DriverManager.getConnection(DriverManager.java:512)
   at java.sql.DriverManager.getConnection(DriverManager.java:171)
   at HelloPostgresql.(HelloPostgresql.java:21)
   at HelloPostgresql.main(HelloPostgresql.java:102)
what should be the solution to solve this problem

-
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 hosting? anyone succeed?

2003-12-21 Thread George Sexton
I run about 6-8 virtual hosts on one installation. I created them using
the Admin application and had no problems.

-Original Message-
From: 29djeo [mailto:[EMAIL PROTECTED] 
Sent: Saturday, December 20, 2003 11:34 AM
To: [EMAIL PROTECTED]
Subject: virtual hosting? anyone succeed?


Has anyone succeeded in getting tomcat 5.0.16 set up for virtual hosting
without using apache as a front end?

I'm trying to get one instance of tomcat to serve two domains on the
same machine.

I have added two Host sections to server.xml and I see the following
behavior when I access the sites from a browser running on the same host
as tomcat:

http://localhost:8080 - default context
http://www.mydomain1.com - blank page
http://www.mydomain2.com - blank page
http://mydomain1:8080 - correctly runs the mydomain1 context
http://mydomain2:8080 - correctly runs the mydomain2 context

how do I get www.mydomain1.com and www.mydomain2.com to show the correct
contexts?

from another host on my network the only context I can load is
http://hostname:8080 to see the default context.  All other contexts
like http://www.mydomain1.com and http://domain1.com:8080 result in an
"action cancelled" from ineternet explorer.

Here is an excerpt from server.xml:

   
  
  
  
 
 
 

 
 
www.mydomain1.com


 
 
www.mydomain2.com


 
  
   


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



RE: Database Rollback doesn't work

2003-12-19 Thread George Sexton
I thought transactions were one of those features MySQL decided that
real developers didn't need. Are you really certain mySQL Supports
transactions in the relatively low version you are using?

Also, I hope you don't need to scale. You are essentially locking the
table until the mail goes or fails. What if it wedges for 60 seconds
doing a DNS lookup?

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Friday, December 19, 2003 9:30 AM
To: [EMAIL PROTECTED]
Subject: Database Rollback doesn't work


Hi!

I have a simple webapp that allows users to register. The user is
inserted
in the DB and a confirmation mail is sent to the user.
If the mail fails I'd like the DB to rollback the transaction, but it
doesn't do it. The new user entry is kept in the DB.
I'm using Tomcat 4.1 and mySQL 2.3.2.

I include the code, log and server.xml.

Thanks for your help.

Monica


***CODE:

Connection dbCon = null;
boolean isSuccess = false;
try {
//inser user in db
dbCon = new DBUtil().getDBConnection();
dbCon.setAutoCommit(false);
userDBPopulator.insertEntry(user, dbCon);

//send mail to user
[snip]
isSuccess = true;
}
//rollback  if fail
catch (MailException e) {
log.error("MailException " + e.getMessage(), e);
log.debug("trying to rollback and close");
try {
dbCon.rollback();
}
catch (SQLException e1) {
log.error("SQLException rollbacking " + e1.getMessage(),
e1);
}
try {
dbCon.close();
}
catch (SQLException e1) {
log.error("SQLException closing connection to DB " +
e1.getMessage(), e1);
}
}
catch (SQLException e) {
log.error("SQLException " + e.getMessage(), e);
try {
dbCon.rollback();
}
catch (SQLException e1) {
log.error("SQLException rollbacking " + e1.getMessage(),
e1);
}
try {
dbCon.close();
}
catch (SQLException e1) {
log.error("SQLException closing connection to DB " +
e1.getMessage(), e1);
}
throw new ServletException(e);
}

//commit user entry
if( isSuccess){
log.debug("commiting");
try {
dbCon.commit();
}
catch (SQLException e1) {
log.error("SQLException commiting " + e1.getMessage(),
e1);
throw new ServletException("SQLException commiting " +
e1.getMessage(), e1);
}
try {
dbCon.close();
}
catch (SQLException e1) {
log.error("SQLException closing connection to DB " +
e1.getMessage(), e1);
}
}

LOG:

2003-12-19 15:44:12,546 DEBUG [Thread-3] (RegisterServlet.java:200) -
handle register request
2003-12-19 15:44:12,562  INFO [Thread-3] (UserDBReader.java:202) - No
user
found with name monica
2003-12-19 15:44:12,578 DEBUG [Thread-3] (MailHelper.java:88) - Sending
mail to m
2003-12-19 15:44:12,625 ERROR [Thread-3] (MailHelper.java:121) -
Messaging
Exception: Sending failed
2003-12-19 15:44:12,625 ERROR [Thread-3] (MailHelper.java:124) - Next
Messaging Exception: Invalid Addresses;
2003-12-19 15:44:12,640 DEBUG [Thread-3] (RegisterServlet.java:282) -
trying to rollback and close


***SERVER.XML





factory

org.apache.commons.dbcp.BasicDataSourceFactory


maxActive
100


maxIdle
30


maxWait
1


username
***


password



driverClassName
com.mysql.jdbc.Driver


url

jdbc:mysql://myMachine.com/myDB?autoReconnect=true


removeAbandoned
true


logAbandoned
true



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


-
To unsubscribe, e-mail: [EMAIL PROTECTED

RE: A weird issue

2003-12-19 Thread George Sexton
Download the MS JDBC driver, and never use ODBJ-JDBC bridge.

-Original Message-
From: Cui Xiaojing-a13339 [mailto:[EMAIL PROTECTED] 
Sent: Friday, December 19, 2003 8:36 AM
To: Tomcat Users List
Subject: A weird issue


Hello All,

Now my software platform as below:

Windows 2000
JDK1.4.1_02
Tomcat 4.1.24
Sql Server 2000

I have a piece of code as below:

private String jdbcDriverClass="sun.jdbc.odbc.JdbcOdbcDriver";
private String jdbcURL="jdbc:odbc:cfdata";
private String jdbcUserName="sss";
private String jdbcPassword="sss";
try {
Class.forName(jdbcDriverClass);
con=DriverManager.getConnection(jdbcURL, jdbcUserName,
jdbcPassword);
stmt=con.createStatement();
} catch (SQLException se) {
throw new RuntimeException("A database error occured. "
+ se.getMessage());

try{
String sqls="select CID from CF_GDW_Load";
rs=stmt.executeQuery(sqls);
}

This piece of code is run in tomcat. It will extract data from table in
Sql Server 2000. In Sql Server 2000, the table is named as CF_GDW_LOAD,
but in the code I write it as CF_GDW_Load. I know that itis not case
sensitive in Sql Server, but when I run this piece code in Tomcat, an
exception occurs. it says that [Microsoft][ODBC SQL Server Driver][SQL
Server]Invalid object name 'CF_GDW_Load'. If I change CF_GDW_Load to
CF_GDW_LOAD in the code, no exception occurs. So in here it is case
sensitive. But making me surprised is that on the same software
platform, I run another piece of code in Tomcat, it extract data from a
table in another database in Sql Server 2000, it is not case sensitive.
Do you have any idea about the weird issue? Thanks.

Regards,
Xiaojing


-
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: URGENT PLEASE HELP ME........................................

2003-12-17 Thread George Sexton
Try reading the documentation. The default invoker is disabled in 4.1.x.
Either re-enable it, or create servlet/servlet mapping pairs in the
web.xml file.

-Original Message-
From: Pinguti Sridevi [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 17, 2003 1:22 AM
To: anand; javagroup; parvez; tomcat
Subject: URGENT PLEASE HELP ME


I could able to run servlets in tomcat 4.1. I created
a folder called webdev in webapps in that i created WEB-INF and 
classes. I stored web.xml in WEB-INF. as follows.
webapps/webdev/WEB-INF/classes
WEB-INF/web.xml
I configured web.xml with servletname,servletclass between webapps 
tags. After restarting the server when i say
http://localhost:8080/webdev/servlet/myservletfile
It showing 
404 Requested URI not found.
I tried like the below also
http://localhost:8080/webdev/myservletfile
But still it is not getting.
Let me tell anybody that tomcat4.1 have any bug in reading web.xml



-
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing


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



RE: web administration tool and tomcat-users.xml

2003-12-15 Thread George Sexton
There is a real, bigger problem.

Without looking at the source, my guess is that the parameters are not
being parsed correctly and they are being treated as ISO-8859-1 and not
UTF-8. This can happen when there is a mismatch between the character
encoding sent from the browser, and the encoding used by the
application.

The real solution would be to make sure that the application is using
the right character encoding.

Maybe one of the committers can find this.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]

Sent: Monday, December 15, 2003 6:45 AM
To: [EMAIL PROTECTED]
Subject: web administration tool and tomcat-users.xml


user administration with the "Tomcat Web Server Administration Tool" 
(/admin) 

a) umlauts
No umlauts are supported. Try to enter "Käsbär". The xml encoding is 
always utf-8. For Western Europe it should be "iso-8859-1". Even if I
set 
this encoding in the xml file it is overwritten by the web gui

b) users cannot be deleted
there is an action in the drop down box that adds checkboxes to the user

table but nothing happens on "save"

Thanks
Eckard


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



Re: javax.mail.SendFailedException: Sending failed

2003-12-12 Thread George Sexton
.run
(ThreadPool.java:619)
> at java.lang.Thread.run(Thread.java:534)
> 
> I have used valid domains and e-mail addresses, but the error still
> appears.  Tomcat has in its server.xml file the name of the server and the
> IP in the value tag under mail/Session Resource.  There are no
> restrictions on the network, and the smtp server is the same as the
> machine hosting the pages.
> 
> Any ideas?
> 
> Thanks.
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


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

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



RE: very basic winNT question

2003-12-11 Thread George Sexton
I think more likely, you need to increase your environment size by
specifiying /E: in your command line to run CMD.

-Original Message-
From: Edson Alves Pereira [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 10, 2003 10:49 AM
To: 'Tomcat-User List'
Subject: very basic winNT question


Hello folks, i know, this a list for Java and Tomcat, but i´m
facing
a problem that is a P.A., does anybody here know how can i change winNT
command line limit? That´s ´cause my CLASSPATH grew bigger and now my
Java
tools are complaining about it.

Regards,
Edson


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



RE: Lock on database file not being released...

2003-12-08 Thread George Sexton
At this point, I would have to say the answer is to get a real database.
FWIW, I use access in our application and except for the
ImplicitUserSync and UserCommitSync issue have never really had any
problems. Of course you could be running into problems specific to your
version of Java, or Jet.

-Original Message-
From: Chaikin, Yaakov Y (US SSA)
[mailto:[EMAIL PROTECTED] 
Sent: Monday, December 08, 2003 8:43 AM
To: Tomcat Users List
Subject: RE: Lock on database file not being released...


Hi,

I did as you said and adjusted those values for the odbc. Same result.
The database file is still showing as locked.

Yaakov Chaikin
Software Engineer
BAE SYSTEMS
301-838-6899 (phone)
301-838-6802 (fax)
[EMAIL PROTECTED]


> -Original Message-
> From: George Sexton [mailto:[EMAIL PROTECTED]
> Sent: Monday, December 08, 2003 1:11 AM
> To: 'Tomcat Users List'
> Subject: RE: Lock on database file not being released...
> 
> In the ODBC connection entry in the registry, or by using the ODBC
> Connection editor, change those two parameters. They are probably set
> for Yes and should be set to No.
> 
> If you are not using an ODBC Connection entry, then you need to pass
> these as arguments in the connection string.
> 
> -Original Message-
> From: Chaikin, Yaakov Y (US SSA)
> [mailto:[EMAIL PROTECTED]
> Sent: Sunday, December 07, 2003 11:07 PM
> To: Tomcat Users List
> Subject: RE: Lock on database file not being released...
> 
> 
> How do I do that in server.xml file? Is that what you are suggesting?
> Specifying other parameters for the connection pooling?
> 
> Please elaborate on what you think I should do.
> 
> Thanks.
> 
> Yaakov Chaikin
> Software Engineer
> BAE SYSTEMS
> 301-838-6899 (phone)
> 301-838-6802 (fax)
> [EMAIL PROTECTED]
> 
> 
> > -Original Message-
> > From: George Sexton [mailto:[EMAIL PROTECTED]
> > Sent: Sunday, December 07, 2003 11:28 PM
> > To: 'Tomcat Users List'
> > Subject: RE: Lock on database file not being released...
> >
> > OK, I now think I know the issue. Try changing the entries for the
> ODBC
> > connection. Specifically change:
> >
> > ImplicitCommitSync
> >
> > And
> >
> > UserCommitSync
> >
> > The docs are inconsistent on their usage, and I think the drivers
vary
> > depending upon the version of the Jet engine you are using.
> >
> > Anyhow, adjust these and see what happens.
> >
> >
> >
> > -Original Message-
> > From: Chaikin, Yaakov Y (US SSA)
> > [mailto:[EMAIL PROTECTED]
> > Sent: Sunday, December 07, 2003 2:13 PM
> > To: Tomcat Users List
> > Subject: RE: Lock on database file not being released...
> >
> >
> > > > However, I have used this driver before in a standalone app and
> when
> > you
> > > close a connection, it certainly does release the lock on the
> database
> > file.
> > >
> > > This makes me think, you didn't use pooling in this standalone
app.
> > Therefor
> > > check weather you close all your ResultSets and Statements. In
> > standalone
> > > apps where no pooling is involved, they are caught by the garbage
> > collector,
> > > but not in connection pooling.
> > >
> > > Trapped into this myself.
> >
> > Steffen,
> >
> > I tried what you said and closed the ResultSet and Statement before
I
> > close the Connection. Still same affect.
> >
> > Any other ideas anyone?
> >
> > I highly doubt it's the driver. I would bet that I am doing
something
> > wrong. I just can't figure out what it is.
> >
> > Thanks,
> > Yaakov.
> >
> >
> >
-
> > 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]



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



RE: Database pool problem

2003-12-08 Thread George Sexton
Why not go the extra mile and get a database that supports cutting edge
features like views?

PostgreSQL

-Original Message-
From: Edson Alves Pereira [mailto:[EMAIL PROTECTED] 
Sent: Monday, December 08, 2003 6:06 AM
To: 'Tomcat Users List'
Subject: RE: Database pool problem


Of course he has a choice, download MySQL in development machine
and
he will make his tests. This i´d choose.

> --
> De:   Dan Johnsson[SMTP:[EMAIL PROTECTED]
> Responder:Tomcat Users List
> Enviada:  sexta-feira, 5 de dezembro de 2003 20:46
> Para: Tomcat Users List
> Assunto:  Re: Database pool problem
> 
> I understand that you do not have a choice, but please not that the
> JDBC-ODBC bridge is *not for production* [according to Sun], it is
> *solely* for development and evaluation.
> 
> The bridge contains identified bugs that will not be addressed [i e
> support is EOLed]. So, you are using this at your own risk.
> 
> Check out the bug parade of the bridge; you might have encountered a
> well-known, documented bug. It that case, there might be a published
> work-around.
> 
> Otherwise: I am sorry to say that you are out in the wilderness alone.
> 
>   Dan Johnsson, System Architect and Security Consultant
> 
> Chaikin, Yaakov Y (US SSA) wrote:
> 
> > Hi,
> > 
> > I am having the following problem and how someone can point out to
me
> > what I am doing wrong.
> > 
> > I am trying to configure Tomcat to have a database connection pool
for
> > my database, but when I try to access the database through a jsp, it
> > gives me "wrong password" for the database... BUT it IS the right
> > password.
> > 
> > I am using MS Access as the database (not much choice right now) and
> > have set up a System DNS.
> > 
> > The weird part is that I am using the same values for a Realm I
defined
> > and I know that it DOES create a connection to the database and
> > authentication works.
> > The  that I have is this:
> >  > className="org.apache.catalina.realm.JDBCRealm"
> > connectionName="default" 
> > connectionPassword="afecrelease2003"
> > connectionURL="jdbc:odbc:afec" debug="0"
> > driverName="sun.jdbc.odbc.JdbcOdbcDriver" 
> > roleNameCol="UserRole"
> > userCredCol="UserPassword" 
> > userNameCol="UserName"
> > userRoleTable="TestUsers" 
> > userTable="TestUsers" 
> > validate="true"/> 
> > 
> > 
> > My server.xml file has this :
> > 
> > 
> >  > cachingAllowed="true"
> > charsetMapperClass="org.apache.catalina.util.CharsetMapper"
> > cookies="true" 
> > crossContext="true" 
> > debug="0"
> > displayName="AFECWEB" 
> > docBase="c:/corej2ee/stage/wls/afecWebApp/afecWEB.war"
> > mapperClass="org.apache.catalina.core.StandardContextMapper"
> > path="/afecWEB"
> > privileged="false" 
> > reloadable="true"
> > swallowOutput="false" 
> > useNaming="true"
> > wrapperClass="org.apache.catalina.core.StandardWrapper">
> >  > debug="0" directory="logs"
> > prefix="localhost_afecWEB_log." 
> > suffix=".txt"
> > timestamp="true" 
> > verbosity="99"/>
> >  > name="jdbc/afecWEBDB" 
> > auth="Container"
> > description="AFEC database; stores info about documents, login"
> > type="javax.sql.DataSource" 
> > scope="Shareable" />
> > 
> > 
> > factory
> > 
> > value>org.apache.commons.dbcp.BasicDataSourceFactory
> > 
> > 
> > maxActive
> > 1
> > 
> > 
> > maxIdle
> > 1
> > 
> > 
> > maxWait
> > 1
> > 
> > 
> > driverClassName
> > sun.jdbc.odbc.JdbcOdbcDriver
> > 
> > 
> > url
> > jdbc:odbc:afec
> > 
> > 
> > user
> > default
> > 
> > 
> > password
> > afecrelease2003
> > 
> > 
> > connectionName
> > default
> > 
> > 
> > connectionPassword
> > afecrelease2003
> > 
> > 
> > connectionURL
> > jdbc:odbc:afec
> > 
> > 
> > driverName
> > sun.jdbc.odbc.JdbcOdbcDriver
> > 
> > 
> > 
> > 
> > 
> > Any help would be greatly appreciated.
> > 
> > Thanks.
> > 
> > Yaakov Chaikin
> > Software Engineer
> > BAE SYSTEMS
> > 301-838-6899 (phone)
> > 301-838-6802 (fax)
> > [EMAIL PROTECTED]
> > 
> > 
> > 
> >
-
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> 
> -- 

RE: Installing Manager tool

2003-12-08 Thread George Sexton
Did you set the "privileged="true" " attribute in the context
definition?

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Monday, December 08, 2003 2:44 AM
To: [EMAIL PROTECTED]
Subject: Installing Manager tool







Hi,

I installed Tomcat 4.1 to test the Manager interface. I followed the
manual
step (add a user in the tomcat-users.xml file, add context ...). I use
the
default port and when I enter http://localhost:8080/manager, I get a 404
error (reported by tomcat).
I saw in the list archive the same trouble, but no solution was found
:-(

May I be more lucky ?

Thanks a lot !
 

 

 

 



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



RE: Lock on database file not being released...

2003-12-07 Thread George Sexton
In the ODBC connection entry in the registry, or by using the ODBC
Connection editor, change those two parameters. They are probably set
for Yes and should be set to No.

If you are not using an ODBC Connection entry, then you need to pass
these as arguments in the connection string.

-Original Message-
From: Chaikin, Yaakov Y (US SSA)
[mailto:[EMAIL PROTECTED] 
Sent: Sunday, December 07, 2003 11:07 PM
To: Tomcat Users List
Subject: RE: Lock on database file not being released...


How do I do that in server.xml file? Is that what you are suggesting?
Specifying other parameters for the connection pooling?

Please elaborate on what you think I should do.

Thanks.

Yaakov Chaikin
Software Engineer
BAE SYSTEMS
301-838-6899 (phone)
301-838-6802 (fax)
[EMAIL PROTECTED]


> -Original Message-
> From: George Sexton [mailto:[EMAIL PROTECTED]
> Sent: Sunday, December 07, 2003 11:28 PM
> To: 'Tomcat Users List'
> Subject: RE: Lock on database file not being released...
> 
> OK, I now think I know the issue. Try changing the entries for the
ODBC
> connection. Specifically change:
> 
> ImplicitCommitSync
> 
> And
> 
> UserCommitSync
> 
> The docs are inconsistent on their usage, and I think the drivers vary
> depending upon the version of the Jet engine you are using.
> 
> Anyhow, adjust these and see what happens.
> 
> 
> 
> -Original Message-
> From: Chaikin, Yaakov Y (US SSA)
> [mailto:[EMAIL PROTECTED]
> Sent: Sunday, December 07, 2003 2:13 PM
> To: Tomcat Users List
> Subject: RE: Lock on database file not being released...
> 
> 
> > > However, I have used this driver before in a standalone app and
when
> you
> > close a connection, it certainly does release the lock on the
database
> file.
> >
> > This makes me think, you didn't use pooling in this standalone app.
> Therefor
> > check weather you close all your ResultSets and Statements. In
> standalone
> > apps where no pooling is involved, they are caught by the garbage
> collector,
> > but not in connection pooling.
> >
> > Trapped into this myself.
> 
> Steffen,
> 
> I tried what you said and closed the ResultSet and Statement before I
> close the Connection. Still same affect.
> 
> Any other ideas anyone?
> 
> I highly doubt it's the driver. I would bet that I am doing something
> wrong. I just can't figure out what it is.
> 
> Thanks,
> Yaakov.
> 
> 
> -
> 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: Lock on database file not being released...

2003-12-07 Thread George Sexton
OK, I now think I know the issue. Try changing the entries for the ODBC
connection. Specifically change:

ImplicitCommitSync

And 

UserCommitSync

The docs are inconsistent on their usage, and I think the drivers vary
depending upon the version of the Jet engine you are using.

Anyhow, adjust these and see what happens.



-Original Message-
From: Chaikin, Yaakov Y (US SSA)
[mailto:[EMAIL PROTECTED] 
Sent: Sunday, December 07, 2003 2:13 PM
To: Tomcat Users List
Subject: RE: Lock on database file not being released...


> > However, I have used this driver before in a standalone app and when
you
> close a connection, it certainly does release the lock on the database
file.
> 
> This makes me think, you didn't use pooling in this standalone app.
Therefor
> check weather you close all your ResultSets and Statements. In
standalone
> apps where no pooling is involved, they are caught by the garbage
collector,
> but not in connection pooling.
> 
> Trapped into this myself.

Steffen,

I tried what you said and closed the ResultSet and Statement before I
close the Connection. Still same affect.

Any other ideas anyone?

I highly doubt it's the driver. I would bet that I am doing something
wrong. I just can't figure out what it is.

Thanks,
Yaakov.


-
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: Lock on database file not being released...

2003-12-07 Thread George Sexton
One other question. What is the setting of AutoCommit? Are you setting
it to TRUE?

-Original Message-
From: Chaikin, Yaakov Y (US SSA)
[mailto:[EMAIL PROTECTED] 
Sent: Sunday, December 07, 2003 2:13 PM
To: Tomcat Users List
Subject: RE: Lock on database file not being released...


> > However, I have used this driver before in a standalone app and when
you
> close a connection, it certainly does release the lock on the database
file.
> 
> This makes me think, you didn't use pooling in this standalone app.
Therefor
> check weather you close all your ResultSets and Statements. In
standalone
> apps where no pooling is involved, they are caught by the garbage
collector,
> but not in connection pooling.
> 
> Trapped into this myself.

Steffen,

I tried what you said and closed the ResultSet and Statement before I
close the Connection. Still same affect.

Any other ideas anyone?

I highly doubt it's the driver. I would bet that I am doing something
wrong. I just can't figure out what it is.

Thanks,
Yaakov.


-
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: Lock on database file not being released...

2003-12-07 Thread George Sexton
A common problem in beginner JDBC is not performing a ROLLBACK when an
update fails. Even when autocommit is set to TRUE, a failed update will
leave the records locked in the database. Update statements should
always be coded so that if an exception is thrown, a rollback is
performed on the connection.

-Original Message-
From: SH Solutions [mailto:[EMAIL PROTECTED] 
Sent: Sunday, December 07, 2003 10:51 AM
To: 'Tomcat Users List'
Subject: AW: Lock on database file not being released...


Hi

> However, I have used this driver before in a standalone app and when
you
close a connection, it certainly does release the lock on the database
file.

This makes me think, you didn't use pooling in this standalone app.
Therefor
check weather you close all your ResultSets and Statements. In
standalone
apps where no pooling is involved, they are caught by the garbage
collector,
but not in connection pooling.

Trapped into this myself.

cu
  Steffen


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



  1   2   >