Re: [OT] Request an app test (free beer!)

2004-12-21 Thread wim
Subir Sengupta wrote:
mandrake 10.1
Linux
RH Linux v9:
Linux
-Original Message-
From: Frank W. Zammetti [mailto:[EMAIL PROTECTED] 
Sent: Monday, December 20, 2004 2:26 PM
To: Commons User; Struts User; Tomcat User
Subject: [OT] Request an app test (free beer!)

I was informed last OT post I made that the subject should always 
include the word "beer".  I added the "free" to get your attention :)

I'm working on something for which I need to know what the os.name 
property on various OS's is.  I would greatly appreciate it if some 
folks could try the following:

public class test {
public static void main(String[] args) {
System.out.println(System.getProperty("os.name"));
}
}
I'm particularly interested in various *nix variants, Linux, Mac and 
such.  Windows I already have answers for (although some verification to

be sure nothing fishy is going on wouldn't hurt).
If you could just post your OS and what the result was, I would greatly 
appreciate it.  Thanks in advance!

 


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


[OT] Java developer friendly Linux distro

2004-12-21 Thread Antony Paul
Hi all,
   Which distro (free) is most friendly for Java development. I need
J2SE 1.4.2 to work on it plus Eclipse 3.x(Linux dont have a good text
editor in which I can run Ant builds). I also need a good GUI so that
others will be attracted to it.

rgds
Antony Paul

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



RE: [OT] Java developer friendly Linux distro

2004-12-21 Thread Søren Neigaard
I would recommend Mandrake then, or Fedora Core

I run Eclipse on both, with great success.

/Søren 

-Original Message-
From: Antony Paul [mailto:[EMAIL PROTECTED] 
Sent: 21. december 2004 10:10
To: Tomcat Users List
Subject: [OT] Java developer friendly Linux distro

Hi all,
   Which distro (free) is most friendly for Java development. I need
J2SE 1.4.2 to work on it plus Eclipse 3.x(Linux dont have a good text
editor in which I can run Ant builds). I also need a good GUI so that
others will be attracted to it.

rgds
Antony Paul

-
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: Adding withOUT server restart?

2004-12-21 Thread Peter Rossbach
HEy Robert,
I think you have also a jk2.properties at conf dir with 
channelSocket.port=8009 !
You are right you can also use the jk2.properties, but I preferred the 
direct server.xml configuration (Default 5.5).

The example configured the RMI JMX Adaptor:
mx.enabled=true
mx.jrmpPort=1099
mx.jrmpHost=localhost
This RMI Adaptor is only included at MX4J 1.1.1 and deprecated for MX4j 
2.x. Only chance to  get
this adaptor to work, is compiling the complete mx4j 2.x or get a old 
mx4j release.

The MX4J Http JMX Adaptor can be configured with:

(delete conf(jk2.properties)

Regards
Peter
Robert Hunt schrieb:
Peter,
I added the mx4j-tools.jar to the classpath and  node as noted.  I had to add 
'port="9050"' to the  node to skew it away from the 8009 default.
But now I'm stuck; what front-end should be used?  You instructions conflict 
with what's found here: http://mc4j.sourceforge.net/usageTomcat.html
 


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


Re: [OT] Java developer friendly Linux distro

2004-12-21 Thread Trond G. Ziarkowski
Hi!
Linux dont have a good text editor in which I can run Ant builds
That's where you are wrong my friend. Try jEdit from www.jedit.org. It 
is made in Java and runs on any platform, and it has several plugins 
capable of running Ant builds. A great editor in my opinion.

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


Re: [OT] Java developer friendly Linux distro

2004-12-21 Thread wim
Trond G. Ziarkowski wrote:
Hi!
Linux dont have a good text editor in which I can run Ant builds
That's where you are wrong my friend. Try jEdit from www.jedit.org. It 
is made in Java and runs on any platform, and it has several plugins 
capable of running Ant builds. A great editor in my opinion.

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

i agree, jedit = :-)
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


performance issue with JK und IIS6

2004-12-21 Thread Michael Südkamp
Hi,

We have a strange performance issue with Tomcat 4.1.30, JK1, IIS6 (Windows
2003 Server).
I placed a big file (20 MB) into a Tomcat web-app root and downloaded it on
some clients with "save link as".

On certain clients the download rate is about 50 KB/s if the file is
accessed via IIS and the JK connector, although there is a 100 MB network
connection. If these clients download the file directly from IIS root, it's
fast.

On other clients the download is fast for both access methods.

The client OSs are Windows 2000 and XP.

I also tried to use a new JK connector (1.2.6).

Do you have any ideas?

Michael


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



RE: Admin for TC 5.5.4 on Linux SUSE 9

2004-12-21 Thread Allistair Crossley
Hi,

Admin is broken in 5.5.4. Download a later version of Tomcat for a fix. You may 
even be able to get the 5.5.6 version going in 5.5.4, but may be worth just 
getting 5.5.6

Allistair.

> -Original Message-
> From: Lars Ohlén [mailto:[EMAIL PROTECTED]
> Sent: 18 December 2004 18:45
> To: [EMAIL PROTECTED]
> Subject: Admin for TC 5.5.4 on Linux SUSE 9
> 
> 
> Hi,
> 
> The Admin application behavious strange for TC 5.5.4 (or 
> perhaps my browsers)
> 
> I cannot expand or fold any of the leavs in the left hand pane.
> 
> I'm not sure if this is a JavaScript problem or on the server side.
> 
> Any ideas?
> 
> /Lars
> 
> 
> 
> 
> 
> 


 
---
QAS Ltd.
Developers of QuickAddress Software
http://www.qas.com";>www.qas.com
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---



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



performance issue with JK und IIS6

2004-12-21 Thread Michael Südkamp
Hi,

I found this link which confirms a IIS6 problem for ISAPI filters that use
the WriteClient API.
http://support.microsoft.com/default.aspx?scid=kb;EN-US;840875
Does this apply to the JK connector?

The workarounds described there show no difference for us, however.

Michael


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



Re: performance issue with JK und IIS6

2004-12-21 Thread Mladen Turk
Michael Südkamp wrote:
I found this link which confirms a IIS6 problem for ISAPI filters that use
the WriteClient API.
http://support.microsoft.com/default.aspx?scid=kb;EN-US;840875
You just must love Microsoft engineers just for that statement.
One has to make something like that, and then dare to say it's
a better product then before :).
Does this apply to the JK connector?
Frankly have no idea!
You a using IIS5 compatibility mode correct?
Mladen.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: performance issue with JK und IIS6

2004-12-21 Thread Parsons Technical Services
Check the archives. There was a similar issue less than a couple of month 
ago.

I think it involved a problem with ack.
Doug
- Original Message - 
From: "Michael Südkamp" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, December 21, 2004 5:32 AM
Subject: performance issue with JK und IIS6


Hi,
We have a strange performance issue with Tomcat 4.1.30, JK1, IIS6 (Windows
2003 Server).
I placed a big file (20 MB) into a Tomcat web-app root and downloaded it 
on
some clients with "save link as".

On certain clients the download rate is about 50 KB/s if the file is
accessed via IIS and the JK connector, although there is a 100 MB network
connection. If these clients download the file directly from IIS root, 
it's
fast.

On other clients the download is fast for both access methods.
The client OSs are Windows 2000 and XP.
I also tried to use a new JK connector (1.2.6).
Do you have any ideas?
Michael
-
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/JVM crashes on Linux

2004-12-21 Thread Greg Lappen
Well, turns out the RAM is fine in the server.  Our hosting provider 
tested it last night and said it checked out fine.  Is there any other 
reason that the JVM/Tomcat would just exit like this?  Could 
System.exit() be called somewhere?  Isn't there a way to prevent 
System.exit() from being called?  I know I'm grasping at straws, but 
what else is there to do in this situation?

Greg
On Dec 20, 2004, at 1:57 PM, Eric Rotick wrote:
I had a similar problem with an almost identical setup to yours which
turned out to be bad memory. An extra 1GB stick was added which had a
bad section in the top of the memory map. This memory only got used
when things got busy so everyone suspected some threading issue. We
got lucky and spotted something totally absurd in the logs which
prompted a memtest86 run and hey presto we got our answer.
On Mon, 20 Dec 2004 13:28:56 -0500, Wade Chandler
<[EMAIL PROTECTED]> wrote:
Greg Lappen wrote:
Hello-
Has anyone had a problem with Tomcat 5.0.28 crashing on Linux with no
error messages?
My production server running with JDK 1.4.2_06, RedHat EL 3.0 just
crashes, no core dump, no errors in catalina.out, no clues.  
Sometimes
it goes for days, sometimes it happens several times in one day.  I 
am
running the tomcat process behind Apache 2 with mod_proxy.  Setting
"ulimit -c unlimited" in the catalina.sh startup file still did not
produce a core file.

If nobody else has experienced this, do you have any suggestions on 
how
to debug it further?

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

I'm using the same setup as you less Apache2.  I use tomcat as the web
server.  Using TC5.0.28 and JDK1.4.2_06, and I have yet to have the
server crash once.  Not much help, but might give you some clues where
to look.
Connector log (mod_proxyassuming you mean you're using the new
connector code)is there anything in the Apache2 log?  I assume 
from
your post you mean that the java process just completely goes away.  
You
might find (depending on the running directory of the java process
running tomcat) a pid dump log file or something...not sure if the vm
produces one of these or not.  You also might check in 
/var/log/messages
file to see if for some reason the kernel or some lib got some error 
it
logged.

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


FORM based authentication config

2004-12-21 Thread Chris Chappell
Hi I'm having trouble getting form based authentication to work. Any help much 
appreciated.
I'm missing something simple I'm sure. (TC 5.0.19, W2K, Mysql4) 

I am using a JDBC Realm which works fine with BASIC auth.

After changing to FORM and try 
http://127.0.0.1:8080/MyApp/security/protected/login.jsp I get:
The requested resource (/MyApp/security/protected/login.jsp) is not available.
 
To set this up I copied the files from the JSP examples - login.jsp, error.jsp 
in folders \security\protected to \MyApp\security\protected\
I copied web.xml parts:

  

org.apache.jsp.security.protected_.error_jsp

org.apache.jsp.security.protected_.error_jsp




org.apache.jsp.security.protected_.index_jsp

org.apache.jsp.security.protected_.index_jsp




org.apache.jsp.security.protected_.login_jsp

org.apache.jsp.security.protected_.login_jsp


  and mappings



org.apache.jsp.security.protected_.error_jsp
/security/protected/error.jsp




org.apache.jsp.security.protected_.index_jsp
/security/protected/index.jsp




org.apache.jsp.security.protected_.login_jsp
/security/protected/login.jsp


with 



  Calendar
  /Calendar
  




  user
  admin
  sysadmin

  

and configured 


FORM
MyApp
/security/protected/login.jsp
/security/protected/error.jsp
  



Chris

Re: Tomcat/JVM crashes on Linux

2004-12-21 Thread Eric Rotick
I've not tried this myself but you could add a Runtime.addShutdownHook
and get it to print out anything which will give you a clue.


On Tue, 21 Dec 2004 08:47:49 -0500, Greg Lappen <[EMAIL PROTECTED]> wrote:
> Well, turns out the RAM is fine in the server.  Our hosting provider
> tested it last night and said it checked out fine.  Is there any other
> reason that the JVM/Tomcat would just exit like this?  Could
> System.exit() be called somewhere?  Isn't there a way to prevent
> System.exit() from being called?  I know I'm grasping at straws, but
> what else is there to do in this situation?
> 
> Greg
> On Dec 20, 2004, at 1:57 PM, Eric Rotick wrote:
> 
> > I had a similar problem with an almost identical setup to yours which
> > turned out to be bad memory. An extra 1GB stick was added which had a
> > bad section in the top of the memory map. This memory only got used
> > when things got busy so everyone suspected some threading issue. We
> > got lucky and spotted something totally absurd in the logs which
> > prompted a memtest86 run and hey presto we got our answer.
> >
> >
> > On Mon, 20 Dec 2004 13:28:56 -0500, Wade Chandler
> > <[EMAIL PROTECTED]> wrote:
> >> Greg Lappen wrote:
> >>> Hello-
> >>>
> >>> Has anyone had a problem with Tomcat 5.0.28 crashing on Linux with no
> >>> error messages?
> >>>
> >>> My production server running with JDK 1.4.2_06, RedHat EL 3.0 just
> >>> crashes, no core dump, no errors in catalina.out, no clues.
> >>> Sometimes
> >>> it goes for days, sometimes it happens several times in one day.  I
> >>> am
> >>> running the tomcat process behind Apache 2 with mod_proxy.  Setting
> >>> "ulimit -c unlimited" in the catalina.sh startup file still did not
> >>> produce a core file.
> >>>
> >>> If nobody else has experienced this, do you have any suggestions on
> >>> how
> >>> to debug it further?
> >>>
> >>> Thanks,
> >>>
> >>> Greg
> >>>
> >>>
> >>> -
> >>> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>> For additional commands, e-mail: [EMAIL PROTECTED]
> >>>
> >>>
> >>>
> >>
> >> I'm using the same setup as you less Apache2.  I use tomcat as the web
> >> server.  Using TC5.0.28 and JDK1.4.2_06, and I have yet to have the
> >> server crash once.  Not much help, but might give you some clues where
> >> to look.
> >>
> >> Connector log (mod_proxyassuming you mean you're using the new
> >> connector code)is there anything in the Apache2 log?  I assume
> >> from
> >> your post you mean that the java process just completely goes away.
> >> You
> >> might find (depending on the running directory of the java process
> >> running tomcat) a pid dump log file or something...not sure if the vm
> >> produces one of these or not.  You also might check in
> >> /var/log/messages
> >> file to see if for some reason the kernel or some lib got some error
> >> it
> >> logged.
> >>
> >> Wade
> >>
> >>
> >> -
> >> 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: FORM based authentication config

2004-12-21 Thread Goel, Manish Kumar
Hi,
see this this might help you
http://www.webservertalk.com/message633890.html


cheers
Manish


-Original Message-
From: Chris Chappell [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 21, 2004 7:45 PM
To: Tomcat Users List
Subject: FORM based authentication config


Hi I'm having trouble getting form based authentication to work. Any help much 
appreciated.
I'm missing something simple I'm sure. (TC 5.0.19, W2K, Mysql4)

I am using a JDBC Realm which works fine with BASIC auth.

After changing to FORM and try 
http://127.0.0.1:8080/MyApp/security/protected/login.jsp I get:
The requested resource (/MyApp/security/protected/login.jsp) is not available.

To set this up I copied the files from the JSP examples - login.jsp, error.jsp 
in folders \security\protected to \MyApp\security\protected\
I copied web.xml parts:

  

org.apache.jsp.security.protected_.error_jsp

org.apache.jsp.security.protected_.error_jsp




org.apache.jsp.security.protected_.index_jsp

org.apache.jsp.security.protected_.index_jsp




org.apache.jsp.security.protected_.login_jsp

org.apache.jsp.security.protected_.login_jsp


  and mappings



org.apache.jsp.security.protected_.error_jsp
/security/protected/error.jsp




org.apache.jsp.security.protected_.index_jsp
/security/protected/index.jsp




org.apache.jsp.security.protected_.login_jsp
/security/protected/login.jsp


with



  Calendar
  /Calendar
  




  user
  admin
  sysadmin

  

and configured


FORM
MyApp
/security/protected/login.jsp
/security/protected/error.jsp
  



Chris
***
Information contained in this email message is intended only for use of the
individual or entity named above. If the reader of this message is not the
intended recipient, or the employee or agent responsible to deliver it to
the intended recipient, you are hereby notified that any dissemination,
distribution or copying of this communication is strictly prohibited. If you
have received this communication in error, please immediately notify the
[EMAIL PROTECTED] and destroy the original message.
**

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



Re: filterStart error on Tomcat but not on Sun 8

2004-12-21 Thread Nat Gross
QM wrote:
As no one else has jumped on this yet, I'll take a stab at it:
 

Thank you.
1/ any reason you're running 5.0.30?  Unless I've missed a list post (a
possibility) that's still in beta.
 

Because I had the same error under 5.0.19 and figured I get the latest.
2/ could you crank up the log verbosity to see what else is going on as
the filter's being loaded?  What if the filter's init() method is
throwing an exception/error/etc?
 

How do I crank up the verbosity level.
3/ identical environments, other than the OS difference? i.e. same
classpath and JAR versions all around, same JDK version, same Tomcat,
same webapp version, etc?
 

No. Not an os difference at all. Oh, I see people might have assumed Sun 
8 as Solaris 8. Sheesh.
I should have specified the Sun Application Server version 8 (8.01). 
Both, the Sun Appserver (which uses embedded Tomcat!) and Tomcat are 
running on WinXP SP1. ALL the settings are the same, launched from the 
same IDE.

-QM
 

Thanks again.
-nat
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Tomcat/JVM crashes on Linux

2004-12-21 Thread Greg Lappen
That's a good idea, I'm going to try that.  Its a cheap way to confirm  
or deny my suspicions.

Thanks!
On Dec 21, 2004, at 9:20 AM, Eric Rotick wrote:
I've not tried this myself but you could add a Runtime.addShutdownHook
and get it to print out anything which will give you a clue.
On Tue, 21 Dec 2004 08:47:49 -0500, Greg Lappen <[EMAIL PROTECTED]>  
wrote:
Well, turns out the RAM is fine in the server.  Our hosting provider
tested it last night and said it checked out fine.  Is there any other
reason that the JVM/Tomcat would just exit like this?  Could
System.exit() be called somewhere?  Isn't there a way to prevent
System.exit() from being called?  I know I'm grasping at straws, but
what else is there to do in this situation?
Greg
On Dec 20, 2004, at 1:57 PM, Eric Rotick wrote:
I had a similar problem with an almost identical setup to yours which
turned out to be bad memory. An extra 1GB stick was added which had a
bad section in the top of the memory map. This memory only got used
when things got busy so everyone suspected some threading issue. We
got lucky and spotted something totally absurd in the logs which
prompted a memtest86 run and hey presto we got our answer.
On Mon, 20 Dec 2004 13:28:56 -0500, Wade Chandler
<[EMAIL PROTECTED]> wrote:
Greg Lappen wrote:
Hello-
Has anyone had a problem with Tomcat 5.0.28 crashing on Linux with  
no
error messages?

My production server running with JDK 1.4.2_06, RedHat EL 3.0 just
crashes, no core dump, no errors in catalina.out, no clues.
Sometimes
it goes for days, sometimes it happens several times in one day.  I
am
running the tomcat process behind Apache 2 with mod_proxy.  Setting
"ulimit -c unlimited" in the catalina.sh startup file still did not
produce a core file.
If nobody else has experienced this, do you have any suggestions on
how
to debug it further?
Thanks,
Greg
--- 
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:  
[EMAIL PROTECTED]


I'm using the same setup as you less Apache2.  I use tomcat as the  
web
server.  Using TC5.0.28 and JDK1.4.2_06, and I have yet to have the
server crash once.  Not much help, but might give you some clues  
where
to look.

Connector log (mod_proxyassuming you mean you're using the new
connector code)is there anything in the Apache2 log?  I assume
from
your post you mean that the java process just completely goes away.
You
might find (depending on the running directory of the java process
running tomcat) a pid dump log file or something...not sure if the  
vm
produces one of these or not.  You also might check in
/var/log/messages
file to see if for some reason the kernel or some lib got some error
it
logged.

Wade
 
-
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: [OT] Java developer friendly Linux distro

2004-12-21 Thread Nat Gross
Antony Paul wrote:
Hi all,
  Which distro (free) is most friendly for Java development. I need
J2SE 1.4.2 to work on it plus Eclipse 3.x(Linux dont have a good text
editor in which I can run Ant builds). 

I use JEDIT for quick simple editing of files, and Eclipse for the real 
stuff. A great combination. I would not advise using JEDIT instead of 
Eclipse but I don't want to start a war now.
Although I am currently using Fedora Core 2, I am looking to upgrade, 
and the folks in various Linux/Unix newsgroups are pushing me towards 
the new Solaris 10, free from Sun. (My main Eclipse work though, for 
now, is still on a WinXP machine.)
fwiw,
-nat

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


Re: Tomcat/JVM crashes on Linux

2004-12-21 Thread Eric Rotick
I'd be interested to know the outcome of this one when you crack it.


On Tue, 21 Dec 2004 09:32:42 -0500, Greg Lappen <[EMAIL PROTECTED]> wrote:
> That's a good idea, I'm going to try that.  Its a cheap way to confirm
> or deny my suspicions.
> 
> Thanks!
> On Dec 21, 2004, at 9:20 AM, Eric Rotick wrote:
> 
> > I've not tried this myself but you could add a Runtime.addShutdownHook
> > and get it to print out anything which will give you a clue.
> >
> >
> > On Tue, 21 Dec 2004 08:47:49 -0500, Greg Lappen <[EMAIL PROTECTED]>
> > wrote:
> >> Well, turns out the RAM is fine in the server.  Our hosting provider
> >> tested it last night and said it checked out fine.  Is there any other
> >> reason that the JVM/Tomcat would just exit like this?  Could
> >> System.exit() be called somewhere?  Isn't there a way to prevent
> >> System.exit() from being called?  I know I'm grasping at straws, but
> >> what else is there to do in this situation?
> >>
> >> Greg
> >> On Dec 20, 2004, at 1:57 PM, Eric Rotick wrote:
> >>
> >>> I had a similar problem with an almost identical setup to yours which
> >>> turned out to be bad memory. An extra 1GB stick was added which had a
> >>> bad section in the top of the memory map. This memory only got used
> >>> when things got busy so everyone suspected some threading issue. We
> >>> got lucky and spotted something totally absurd in the logs which
> >>> prompted a memtest86 run and hey presto we got our answer.
> >>>
> >>>
> >>> On Mon, 20 Dec 2004 13:28:56 -0500, Wade Chandler
> >>> <[EMAIL PROTECTED]> wrote:
>  Greg Lappen wrote:
> > Hello-
> >
> > Has anyone had a problem with Tomcat 5.0.28 crashing on Linux with
> > no
> > error messages?
> >
> > My production server running with JDK 1.4.2_06, RedHat EL 3.0 just
> > crashes, no core dump, no errors in catalina.out, no clues.
> > Sometimes
> > it goes for days, sometimes it happens several times in one day.  I
> > am
> > running the tomcat process behind Apache 2 with mod_proxy.  Setting
> > "ulimit -c unlimited" in the catalina.sh startup file still did not
> > produce a core file.
> >
> > If nobody else has experienced this, do you have any suggestions on
> > how
> > to debug it further?
> >
> > Thanks,
> >
> > Greg
> >
> >
> > ---
> > --
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> >
> >
> >
> 
>  I'm using the same setup as you less Apache2.  I use tomcat as the
>  web
>  server.  Using TC5.0.28 and JDK1.4.2_06, and I have yet to have the
>  server crash once.  Not much help, but might give you some clues
>  where
>  to look.
> 
>  Connector log (mod_proxyassuming you mean you're using the new
>  connector code)is there anything in the Apache2 log?  I assume
>  from
>  your post you mean that the java process just completely goes away.
>  You
>  might find (depending on the running directory of the java process
>  running tomcat) a pid dump log file or something...not sure if the
>  vm
>  produces one of these or not.  You also might check in
>  /var/log/messages
>  file to see if for some reason the kernel or some lib got some error
>  it
>  logged.
> 
>  Wade
> 
> 
>  
>  -
>  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]



Why is tomcat (java) so memory intensive?

2004-12-21 Thread Philippe Deslauriers

I am using Tomcat 5.0.19 on Windows XP SP2, J2SDK 1.4.2_03.

I have a serious memory problem with Tomcat, it just EAT memory without
explanation, until OOM error occurs.

The Java.exe process in the windows task manager reports using between 95Mb
and 105Mb after the startup of the webapp. I do not use Xms Xmx options in
dev mode. It just grows until it runs out of memory. There is not much
memory available (around 150Mb), yet it should be enough for a few classes,
JSP and almost not data in the database.

Like a big boy, I decided to use Jprofiler demo to figure out where the
memory leak was, to see that there is only 20 Mb allocated by the VM!!! So
where does the rest of the memory goes? I do not use any non-java library
(dll), I don't think I'm doing anything special.

The app use a the Versant JDO implementation (instead of direct JDBC) using
MS SQL server. But hey, the app is still in dev mode, with only the
developpers using it, the DB is (almost) empty, so the amount data is not in
cause. Anyways using 20Mb of heap is very reasonable (there will be at least
1gb available in production), but why is the java.exe process eating memory
like a pig an the profiler is not showing where the mem goes? (by the way, I
did deleted ALL the filters from Jprofiler). If the app would take 2Gb in
memory I would not care, as long as I know what is using the memory.

I did profile an app running on 5.0.18, and the same magic happens, the
memory used by the java.exe is far from close to what the total heap size of
the VM reports to be.

Am I going crazy?

Any ideas?

Thanks

Filip:)


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



RE: Why is tomcat (java) so memory intensive?

2004-12-21 Thread Filip Hanik \(lists\)
you will need to dig deeper into jprobe or whatever profiler you are using.
after that you will see where the memory goes. also, try the latest version
of tomcat 5.0
Filip

-Original Message-
From: Philippe Deslauriers [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 21, 2004 8:53 AM
To: [EMAIL PROTECTED]
Subject: Why is tomcat (java) so memory intensive?



I am using Tomcat 5.0.19 on Windows XP SP2, J2SDK 1.4.2_03.

I have a serious memory problem with Tomcat, it just EAT memory without
explanation, until OOM error occurs.

The Java.exe process in the windows task manager reports using between 95Mb
and 105Mb after the startup of the webapp. I do not use Xms Xmx options in
dev mode. It just grows until it runs out of memory. There is not much
memory available (around 150Mb), yet it should be enough for a few classes,
JSP and almost not data in the database.

Like a big boy, I decided to use Jprofiler demo to figure out where the
memory leak was, to see that there is only 20 Mb allocated by the VM!!! So
where does the rest of the memory goes? I do not use any non-java library
(dll), I don't think I'm doing anything special.

The app use a the Versant JDO implementation (instead of direct JDBC) using
MS SQL server. But hey, the app is still in dev mode, with only the
developpers using it, the DB is (almost) empty, so the amount data is not in
cause. Anyways using 20Mb of heap is very reasonable (there will be at least
1gb available in production), but why is the java.exe process eating memory
like a pig an the profiler is not showing where the mem goes? (by the way, I
did deleted ALL the filters from Jprofiler). If the app would take 2Gb in
memory I would not care, as long as I know what is using the memory.

I did profile an app running on 5.0.18, and the same magic happens, the
memory used by the java.exe is far from close to what the total heap size of
the VM reports to be.

Am I going crazy?

Any ideas?

Thanks

Filip:)


-
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: Why is tomcat (java) so memory intensive?

2004-12-21 Thread Andreas Vombach
I would also be interested in some memory/performance tuning 
possibilities. Ok, if you do not run it standalone but with Apache the 
web response times should be faster, my profiling gives me the following:

CPU SAMPLES BEGIN (total = 8628) Tue Dec 21 16:10:18 2004
rank   self  accum   count trace method
  1 33.68% 33.68%2906 300647 java.net.SocketInputStream.socketRead0
  2 20.70% 54.38%1786 300557 java.net.PlainSocketImpl.socketAccept
  3 20.17% 74.55%1740 300542 java.net.PlainSocketImpl.socketAccept
  4 20.12% 94.67%1736 300551 java.net.PlainSocketImpl.socketAccept
  5  1.36% 96.02% 117 300669 java.net.SocketInputStream.socketRead0
I think everybody can reproduce profiling with e.g.
set JAVA_OPTS=-server -Xms500M -Xmx1000M 
-Xrunhprof:cpu=samples,interval=20,dept=5

in startup.bat /sh
I run tapestry and castor with my web-apps and would assume that they 
eat most cpu, not the http transfer. You see I give enough memory to 
avoid Out of memory Exceptions ...

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


Re: Why is tomcat (java) so memory intensive?

2004-12-21 Thread Christoph Kutzinski
Philippe Deslauriers wrote:
I am using Tomcat 5.0.19 on Windows XP SP2, J2SDK 1.4.2_03.
I have a serious memory problem with Tomcat, it just EAT memory without
explanation, until OOM error occurs.
The Java.exe process in the windows task manager reports using between 95Mb
and 105Mb after the startup of the webapp. I do not use Xms Xmx options in
dev mode. 
You do know that the VM will only allocate 64 mb for heap if you don't 
use the Xmx option, do you?
After the 64 mb are used up the vm will throw an oom error.
How much memory does the taskmanager report before the oom error happens?

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


RE: Why is tomcat (java) so memory intensive?

2004-12-21 Thread Dale, Matt
and get jvmstat from sun, it will allow you to see which area in the heap runs 
out of space.

Ta
Matt

-Original Message-
From: Filip Hanik (lists) [mailto:[EMAIL PROTECTED]
Sent: 21 December 2004 15:12
To: Tomcat Users List
Subject: RE: Why is tomcat (java) so memory intensive?


you will need to dig deeper into jprobe or whatever profiler you are using.
after that you will see where the memory goes. also, try the latest version
of tomcat 5.0
Filip

-Original Message-
From: Philippe Deslauriers [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 21, 2004 8:53 AM
To: [EMAIL PROTECTED]
Subject: Why is tomcat (java) so memory intensive?



I am using Tomcat 5.0.19 on Windows XP SP2, J2SDK 1.4.2_03.

I have a serious memory problem with Tomcat, it just EAT memory without
explanation, until OOM error occurs.

The Java.exe process in the windows task manager reports using between 95Mb
and 105Mb after the startup of the webapp. I do not use Xms Xmx options in
dev mode. It just grows until it runs out of memory. There is not much
memory available (around 150Mb), yet it should be enough for a few classes,
JSP and almost not data in the database.

Like a big boy, I decided to use Jprofiler demo to figure out where the
memory leak was, to see that there is only 20 Mb allocated by the VM!!! So
where does the rest of the memory goes? I do not use any non-java library
(dll), I don't think I'm doing anything special.

The app use a the Versant JDO implementation (instead of direct JDBC) using
MS SQL server. But hey, the app is still in dev mode, with only the
developpers using it, the DB is (almost) empty, so the amount data is not in
cause. Anyways using 20Mb of heap is very reasonable (there will be at least
1gb available in production), but why is the java.exe process eating memory
like a pig an the profiler is not showing where the mem goes? (by the way, I
did deleted ALL the filters from Jprofiler). If the app would take 2Gb in
memory I would not care, as long as I know what is using the memory.

I did profile an app running on 5.0.18, and the same magic happens, the
memory used by the java.exe is far from close to what the total heap size of
the VM reports to be.

Am I going crazy?

Any ideas?

Thanks

Filip:)


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

Any opinions expressed in this E-mail may be those of the individual and not 
necessarily the company. This E-mail and any files transmitted with it are 
confidential and solely for the use of the intended recipient. If you are not 
the intended recipient or the person responsible for delivering to the intended 
recipient, be advised that you have received this E-mail in error and that any 
use or copying is strictly prohibited. If you have received this E-mail in 
error please notify the beCogent postmaster at [EMAIL PROTECTED]
Unless expressly stated, opinions in this email are those of the individual 
sender and not beCogent Ltd. You must take full responsibility for virus 
checking this email and any attachments.
Please note that the content of this email or any of its attachments may 
contain data that falls within the scope of the Data Protection Acts and that 
you must ensure that any handling or processing of such data by you is fully 
compliant with the terms and provisions of the Data Protection Act 1984 and 
1998.


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

Re: Tomcat/JVM crashes on Linux

2004-12-21 Thread Wade Chandler
Greg Lappen wrote:
That's a good idea, I'm going to try that.  Its a cheap way to confirm  
or deny my suspicions.

Thanks!
On Dec 21, 2004, at 9:20 AM, Eric Rotick wrote:
I've not tried this myself but you could add a Runtime.addShutdownHook
and get it to print out anything which will give you a clue.
On Tue, 21 Dec 2004 08:47:49 -0500, Greg Lappen <[EMAIL PROTECTED]>  
wrote:

Well, turns out the RAM is fine in the server.  Our hosting provider
tested it last night and said it checked out fine.  Is there any other
reason that the JVM/Tomcat would just exit like this?  Could
System.exit() be called somewhere?  Isn't there a way to prevent
System.exit() from being called?  I know I'm grasping at straws, but
what else is there to do in this situation?
Greg
On Dec 20, 2004, at 1:57 PM, Eric Rotick wrote:
I had a similar problem with an almost identical setup to yours which
turned out to be bad memory. An extra 1GB stick was added which had a
bad section in the top of the memory map. This memory only got used
when things got busy so everyone suspected some threading issue. We
got lucky and spotted something totally absurd in the logs which
prompted a memtest86 run and hey presto we got our answer.
On Mon, 20 Dec 2004 13:28:56 -0500, Wade Chandler
<[EMAIL PROTECTED]> wrote:
Greg Lappen wrote:
Hello-
Has anyone had a problem with Tomcat 5.0.28 crashing on Linux 
with  no
error messages?

My production server running with JDK 1.4.2_06, RedHat EL 3.0 just
crashes, no core dump, no errors in catalina.out, no clues.
Sometimes
it goes for days, sometimes it happens several times in one day.  I
am
running the tomcat process behind Apache 2 with mod_proxy.  Setting
"ulimit -c unlimited" in the catalina.sh startup file still did not
produce a core file.
If nobody else has experienced this, do you have any suggestions on
how
to debug it further?
Thanks,
Greg
--- 
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:  [EMAIL PROTECTED]


I'm using the same setup as you less Apache2.  I use tomcat as the  
web
server.  Using TC5.0.28 and JDK1.4.2_06, and I have yet to have the
server crash once.  Not much help, but might give you some clues  
where
to look.

Connector log (mod_proxyassuming you mean you're using the new
connector code)is there anything in the Apache2 log?  I assume
from
your post you mean that the java process just completely goes away.
You
might find (depending on the running directory of the java process
running tomcat) a pid dump log file or something...not sure if the  vm
produces one of these or not.  You also might check in
/var/log/messages
file to see if for some reason the kernel or some lib got some error
it
logged.
Wade
 -
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]

Yoav would be able to answer this much better than I, but you should be 
able to modify the security settings of Tomcat to not allow that call 
from any of the web apps.  I think tomcat has it's own policy file, and 
you can also add your own policies to only allow the call from certain 
code bases.  In the java docs for the jdk 1.4.x look up "Policy file" 
and from there you'll find all kinds of information on permissions and 
code security.  You can limit only certain jar files specifically to be 
able to call this method.  Which Tomcat 5.0.x might already do thisI 
haven't actually tried to tell you the truth.

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


RE: Why is tomcat (java) so memory intensive?

2004-12-21 Thread Allistair Crossley
if you are using the windows service, the default is Xms 128 Xmx 256.

> -Original Message-
> From: Christoph Kutzinski [mailto:[EMAIL PROTECTED]
> Sent: 21 December 2004 15:22
> To: Tomcat Users List
> Subject: Re: Why is tomcat (java) so memory intensive?
> 
> 
> Philippe Deslauriers wrote:
> > I am using Tomcat 5.0.19 on Windows XP SP2, J2SDK 1.4.2_03.
> > 
> > I have a serious memory problem with Tomcat, it just EAT 
> memory without
> > explanation, until OOM error occurs.
> > 
> > The Java.exe process in the windows task manager reports 
> using between 95Mb
> > and 105Mb after the startup of the webapp. I do not use Xms 
> Xmx options in
> > dev mode. 
> 
> You do know that the VM will only allocate 64 mb for heap if 
> you don't 
> use the Xmx option, do you?
> After the 64 mb are used up the vm will throw an oom error.
> How much memory does the taskmanager report before the oom 
> error happens?
> 
> 
> Christoph
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


 
---
QAS Ltd.
Developers of QuickAddress Software
http://www.qas.com";>www.qas.com
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---



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



Re: [OT] Java developer friendly Linux distro

2004-12-21 Thread Wade Chandler
Nat Gross wrote:
Antony Paul wrote:
Hi all,
  Which distro (free) is most friendly for Java development. I need
J2SE 1.4.2 to work on it plus Eclipse 3.x(Linux dont have a good text
editor in which I can run Ant builds).
I use JEDIT for quick simple editing of files, and Eclipse for the real 
stuff. A great combination. I would not advise using JEDIT instead of 
Eclipse but I don't want to start a war now.
Although I am currently using Fedora Core 2, I am looking to upgrade, 
and the folks in various Linux/Unix newsgroups are pushing me towards 
the new Solaris 10, free from Sun. (My main Eclipse work though, for 
now, is still on a WinXP machine.)
fwiw,
-nat

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

I have tried Solaris on intel over the past recent years, and I love 
Sun, but my gripe with Solaris on intel is lack of drivers.  Look at 
CentOS or White Box Linux (www.centos.org and www.whiteboxlinux.org 
respectfully) if you like Red Hat as they are free and use the Red Hat 
source SRPMs with only stripping out the RH branding, so they are 
Advanced and Enterprise RH for free using the same source code.  SuSE is 
also very good.  I am using 9.1 at the moment.  You can purchase SuSE9.2 
Professional for 90.00US and get like 7-8 cd's and a DVD with all kinds 
of nice applications.  I've been happy with all the ones I've mentioned. 
 I run Tomcat on all of them, I use Netbeans 4.0 without issue on all 
of them, and have been developing java on all of them for years.  SuSE 
has been using the 2.6 kernel since their 9.1 release.  I've been 
pleased with it.  I've got some friends who like the Debian based 
distros.  To install a VM on them download the non RPM version of the 
install.  That's about it really.

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


Re: extra directory in WebDAV servlet listing

2004-12-21 Thread Garret Wilson
Mark,
Mark Thomas wrote:
I'll look at the arbitrary file system root next.
Thanks! I'll get to it as soon as I get more pressing things out of the 
way, but that may be a week or two.

I currently do a file store in another part of the project and make the 
results available via URIs. I have two variables:

baseDirectory
baseURI
In essence, when a request for a URI comes in, I simply relativize the 
URI to baseURI, and then resolve it to baseDirectory. Getting the URI of 
a file in the filesystem requires the reverse process.

For the WebDAV servlet, base URI is "configured" by the servlet mapping: 
"webdav/*" would essentially set the base URI to 
"http://example.com/webapp/webdav/";. As we've discussed, the base 
directory would need to be set in a configuration somewhere.

Personally, I'd put the configuration in a context parameter, such as:

I would *not* put it in the web.xml file, because I want to take the 
.war and simply drop it on my server. The WebDAV parameter is a 
system-specific variable, and if I develop on Windows but deploy on 
Linux, the WebDAV base directory is going to be different on each system.

Let me know if I can provide more help or input.
Garret
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Why is tomcat (java) so memory intensive?

2004-12-21 Thread Philippe Deslauriers

Actually no, I tough it was 256Mb. Thanks.
It will go out of memory around 125Mb 140Mb in the task manager. It depends.

But your point just prove my problem to be even stanger: if 64 Mb shoulb be
the limit
where did the other 60Mb+ go? (the JVM itself never takes that much memory,
not from my experience).

What I did not mention in the orgininal post is that I have the same problem
with an app running on 5.0.18 sam jdk, using -Xms256m -Xmx1024m, it will
also run OOM, and again profiling the app did not show any leak, and a large
gap between the total heap and whatever the task manger reports.

My main issue here is where does the gap come from?


-Original Message-
From: Christoph Kutzinski [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 21, 2004 10:22 AM
To: Tomcat Users List
Subject: Re: Why is tomcat (java) so memory intensive?


Philippe Deslauriers wrote:
> I am using Tomcat 5.0.19 on Windows XP SP2, J2SDK 1.4.2_03.
>
> I have a serious memory problem with Tomcat, it just EAT memory without
> explanation, until OOM error occurs.
>
> The Java.exe process in the windows task manager reports using between
95Mb
> and 105Mb after the startup of the webapp. I do not use Xms Xmx options in
> dev mode.

You do know that the VM will only allocate 64 mb for heap if you don't
use the Xmx option, do you?
After the 64 mb are used up the vm will throw an oom error.
How much memory does the taskmanager report before the oom error happens?


Christoph

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



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



Re: FORM based authentication config

2004-12-21 Thread Chris Chappell
Thanks for that - but what it describes is what I have done, I think.

The problem is:

If you have the servlet definitions and mappings, the page isn't found -
Since they are JSPs above web-inf in the context folder I think they don't
need them.
If you don't have the mappings then you get:

"HTTP Status 400 - Invalid direct reference to form login page" - with a
correct pw/un
org.apache.catalina.authenticator.FormAuthenticator authenticate

WARNING: Unexpected error forwarding to error page

java.lang.NullPointerException

with incorrect un/pw

i.e. FormAuthenticator cannot forward to say the error page

Chris

- Original Message -
From: "Goel, Manish Kumar" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Tuesday, December 21, 2004 2:26 PM
Subject: RE: FORM based authentication config


Hi,
see this this might help you
http://www.webservertalk.com/message633890.html


cheers
Manish


-Original Message-
From: Chris Chappell [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 21, 2004 7:45 PM
To: Tomcat Users List
Subject: FORM based authentication config


Hi I'm having trouble getting form based authentication to work. Any help
much appreciated.
I'm missing something simple I'm sure. (TC 5.0.19, W2K, Mysql4)

I am using a JDBC Realm which works fine with BASIC auth.

After changing to FORM and try
http://127.0.0.1:8080/MyApp/security/protected/login.jsp I get:
The requested resource (/MyApp/security/protected/login.jsp) is not
available.

To set this up I copied the files from the JSP examples - login.jsp,
error.jsp in folders \security\protected to \MyApp\security\protected\
I copied web.xml parts:

  

org.apache.jsp.security.protected_.error_jsp

org.apache.jsp.security.protected_.error_jsp



org.apache.jsp.security.protected_.index_jsp

org.apache.jsp.security.protected_.index_jsp




org.apache.jsp.security.protected_.login_jsp

org.apache.jsp.security.protected_.login_jsp


  and mappings



org.apache.jsp.security.protected_.error_jsp
/security/protected/error.jsp




org.apache.jsp.security.protected_.index_jsp
/security/protected/index.jsp




org.apache.jsp.security.protected_.login_jsp
/security/protected/login.jsp


with



  Calendar
  /Calendar
  




  user
  admin
  sysadmin

  

and configured


FORM
MyApp
/security/protected/login.jsp
/security/protected/error.jsp
  



Chris

***
Information contained in this email message is intended only for use of the
individual or entity named above. If the reader of this message is not the
intended recipient, or the employee or agent responsible to deliver it to
the intended recipient, you are hereby notified that any dissemination,
distribution or copying of this communication is strictly prohibited. If you
have received this communication in error, please immediately notify the
[EMAIL PROTECTED] and destroy the original message.

**

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



How to run servlet for every 30 minutes in Tomcat 4.1.30

2004-12-21 Thread Shilpa Nalgonda
Hi,
I am using Tomcat4.1.30 version.
I have to develop a client application which looks in the database every 30
minutes,
to retrieve the status of an order and send the status to the remote client.
Again waits for the
The client's response and insert the repsonse back to the database.

I wanted to do this in a servlet, so is there any way that i could run this
servlet automatically inside the
Tomcat container, or is it configurable in servlet mapping? if so can
someone please suggest me with examples...


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



Re: [OT] Java developer friendly Linux distro

2004-12-21 Thread Justin Crabtree
Wade Chandler wrote:
Nat Gross wrote:
Antony Paul wrote:
Hi all,
  Which distro (free) is most friendly for Java development. I need
J2SE 1.4.2 to work on it plus Eclipse 3.x(Linux dont have a good text
editor in which I can run Ant builds).

I use JEDIT for quick simple editing of files, and Eclipse for the 
real stuff. A great combination. I would not advise using JEDIT 
instead of Eclipse but I don't want to start a war now.
Although I am currently using Fedora Core 2, I am looking to upgrade, 
and the folks in various Linux/Unix newsgroups are pushing me towards 
the new Solaris 10, free from Sun. (My main Eclipse work though, for 
now, is still on a WinXP machine.)
fwiw,
-nat

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

I have tried Solaris on intel over the past recent years, and I love 
Sun, but my gripe with Solaris on intel is lack of drivers.  Look at 
CentOS or White Box Linux (www.centos.org and www.whiteboxlinux.org 
respectfully) if you like Red Hat as they are free and use the Red Hat 
source SRPMs with only stripping out the RH branding, so they are 
Advanced and Enterprise RH for free using the same source code.  SuSE is 
also very good.  I am using 9.1 at the moment.  You can purchase SuSE9.2 
Professional for 90.00US and get like 7-8 cd's and a DVD with all kinds 
of nice applications.  I've been happy with all the ones I've mentioned. 
 I run Tomcat on all of them, I use Netbeans 4.0 without issue on all of 
them, and have been developing java on all of them for years.  SuSE has 
been using the 2.6 kernel since their 9.1 release.  I've been pleased 
with it.  I've got some friends who like the Debian based distros.  To 
install a VM on them download the non RPM version of the install.  
That's about it really.

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

I would say that the most friendly distro will be the one that you are 
comfortable with.  If you are using mainstream tools such as Eclipse, 
the support on most distros will at least be adequate if not friendly. 
The best advice is to try a couple and see what works.

--
Justin Crabtree
Java Programmer
Ozarks Technical Community College
447-7533

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


RE: Why is tomcat (java) so memory intensive?

2004-12-21 Thread Allistair Crossley
you are right, tomcat 5.0.19 did have a memory leak. some dispute it, but it is 
there, i had it also and used a profiler to show it. you should upgrade to 
5.0.28.

Allistair.

> -Original Message-
> From: Philippe Deslauriers [mailto:[EMAIL PROTECTED]
> Sent: 21 December 2004 15:47
> To: Tomcat Users List; [EMAIL PROTECTED]
> Subject: RE: Why is tomcat (java) so memory intensive?
> 
> 
> 
> Actually no, I tough it was 256Mb. Thanks.
> It will go out of memory around 125Mb 140Mb in the task 
> manager. It depends.
> 
> But your point just prove my problem to be even stanger: if 
> 64 Mb shoulb be
> the limit
> where did the other 60Mb+ go? (the JVM itself never takes 
> that much memory,
> not from my experience).
> 
> What I did not mention in the orgininal post is that I have 
> the same problem
> with an app running on 5.0.18 sam jdk, using -Xms256m 
> -Xmx1024m, it will
> also run OOM, and again profiling the app did not show any 
> leak, and a large
> gap between the total heap and whatever the task manger reports.
> 
> My main issue here is where does the gap come from?
> 
> 
> -Original Message-
> From: Christoph Kutzinski [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, December 21, 2004 10:22 AM
> To: Tomcat Users List
> Subject: Re: Why is tomcat (java) so memory intensive?
> 
> 
> Philippe Deslauriers wrote:
> > I am using Tomcat 5.0.19 on Windows XP SP2, J2SDK 1.4.2_03.
> >
> > I have a serious memory problem with Tomcat, it just EAT 
> memory without
> > explanation, until OOM error occurs.
> >
> > The Java.exe process in the windows task manager reports 
> using between
> 95Mb
> > and 105Mb after the startup of the webapp. I do not use Xms 
> Xmx options in
> > dev mode.
> 
> You do know that the VM will only allocate 64 mb for heap if you don't
> use the Xmx option, do you?
> After the 64 mb are used up the vm will throw an oom error.
> How much memory does the taskmanager report before the oom 
> error happens?
> 
> 
> Christoph
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


 
---
QAS Ltd.
Developers of QuickAddress Software
http://www.qas.com";>www.qas.com
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---



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



Re: How to run servlet for every 30 minutes in Tomcat 4.1.30

2004-12-21 Thread Wade Chandler
Shilpa Nalgonda wrote:
Hi,
I am using Tomcat4.1.30 version.
I have to develop a client application which looks in the database every 30
minutes,
to retrieve the status of an order and send the status to the remote client.
Again waits for the
The client's response and insert the repsonse back to the database.
I wanted to do this in a servlet, so is there any way that i could run this
servlet automatically inside the
Tomcat container, or is it configurable in servlet mapping? if so can
someone please suggest me with examples...
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Wellit's kind of not extremely clear what you are asking, but why 
does the servlet need to do anything except listen for a client which is 
threaded to do this every 30 minutes, in other words...why not have the 
servlet do what it naturally does...sit there and get hit by client 
requestsget the infoand send it back?  I mean...the servlet 
can't push to the client unless you want to use something besides http, 
or unless you are using servlets on both ends and http servers on both 
ends.  You could use keep alives I guess.I wouldn't thoughonly 
so many tcp/ip connections.

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


AW: How to run servlet for every 30 minutes in Tomcat 4.1.30

2004-12-21 Thread Bernhard Slominski
Hi,

you can use something like HTTPUnit which just calls the web page with your
servlet.
Can can easiliy schedule the HTTPUnit Job, so it runs every 30mins.

Cheers

Bernhard

-Ursprüngliche Nachricht-
Von: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Gesendet: Dienstag, 21. Dezember 2004 16:44
An: Tomcat Users List
Betreff: How to run servlet for every 30 minutes in Tomcat 4.1.30


Hi,
I am using Tomcat4.1.30 version.
I have to develop a client application which looks in the database every 30
minutes,
to retrieve the status of an order and send the status to the remote client.
Again waits for the
The client's response and insert the repsonse back to the database.

I wanted to do this in a servlet, so is there any way that i could run this
servlet automatically inside the
Tomcat container, or is it configurable in servlet mapping? if so can
someone please suggest me with examples...


-
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: Why is tomcat (java) so memory intensive?

2004-12-21 Thread Allistair Crossley
i think (from memory) it had to do with registering requests with jk. anyway, 
like i say, upgrade and you'll see that leak go away i am pretty sure.

> -Original Message-
> From: Allistair Crossley 
> Sent: 21 December 2004 16:00
> To: Tomcat Users List; [EMAIL PROTECTED]
> Subject: RE: Why is tomcat (java) so memory intensive?
> 
> 
> you are right, tomcat 5.0.19 did have a memory leak. some 
> dispute it, but it is there, i had it also and used a 
> profiler to show it. you should upgrade to 5.0.28.
> 
> Allistair.
> 
> > -Original Message-
> > From: Philippe Deslauriers [mailto:[EMAIL PROTECTED]
> > Sent: 21 December 2004 15:47
> > To: Tomcat Users List; [EMAIL PROTECTED]
> > Subject: RE: Why is tomcat (java) so memory intensive?
> > 
> > 
> > 
> > Actually no, I tough it was 256Mb. Thanks.
> > It will go out of memory around 125Mb 140Mb in the task 
> > manager. It depends.
> > 
> > But your point just prove my problem to be even stanger: if 
> > 64 Mb shoulb be
> > the limit
> > where did the other 60Mb+ go? (the JVM itself never takes 
> > that much memory,
> > not from my experience).
> > 
> > What I did not mention in the orgininal post is that I have 
> > the same problem
> > with an app running on 5.0.18 sam jdk, using -Xms256m 
> > -Xmx1024m, it will
> > also run OOM, and again profiling the app did not show any 
> > leak, and a large
> > gap between the total heap and whatever the task manger reports.
> > 
> > My main issue here is where does the gap come from?
> > 
> > 
> > -Original Message-
> > From: Christoph Kutzinski [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, December 21, 2004 10:22 AM
> > To: Tomcat Users List
> > Subject: Re: Why is tomcat (java) so memory intensive?
> > 
> > 
> > Philippe Deslauriers wrote:
> > > I am using Tomcat 5.0.19 on Windows XP SP2, J2SDK 1.4.2_03.
> > >
> > > I have a serious memory problem with Tomcat, it just EAT 
> > memory without
> > > explanation, until OOM error occurs.
> > >
> > > The Java.exe process in the windows task manager reports 
> > using between
> > 95Mb
> > > and 105Mb after the startup of the webapp. I do not use Xms 
> > Xmx options in
> > > dev mode.
> > 
> > You do know that the VM will only allocate 64 mb for heap 
> if you don't
> > use the Xmx option, do you?
> > After the 64 mb are used up the vm will throw an oom error.
> > How much memory does the taskmanager report before the oom 
> > error happens?
> > 
> > 
> > Christoph
> > 
> > 
> -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> > 
> > 
> > 
> -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> > 
> 
> 
>  
> ---
> QAS Ltd.
> Developers of QuickAddress Software
> http://www.qas.com";>www.qas.com
> Registered in England: No 2582055
> Registered in Australia: No 082 851 474
> ---
> 
> 
> 
> -
> 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]



New user Virtual host problem

2004-12-21 Thread Rick Gocher
Hi all,
I have previously setup tomcat 5.x running on apache 1.3.x.  Everything 
works fine and I'm learning lots as I go, although I have run into a 
problem with adding new domains to my apache.  I have setup another site in 
the webapps directory however apache will only serve it using my primary 
machine ip, e.g. http://192.168.0.5/newsite which then gets redirected to 
my newsite on port 8080.

I want to be able to have http://192.168.0.6 just go to that new site, 
however when I place that in my httpd.conf it does not work.  Is there some 
docs which explain adding VirtualHosts to apache which point to the tomcat 
webapps directory?

Thank you for any help,
Rick

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


Tomcat 5, jk2, Apache 2 and mixed name/IP virtual hosts

2004-12-21 Thread Troy Davis
Hello,
I've got a Tomcat 5 / Apache 2 / jk2 server which has been serving 
several different virtual hosts which share a common IP address. I now 
need to implement my first SSL-protected website on this machine, and I 
am working under the assumption that this site must have a dedicated IP 
address in order for SSL to work. First of all, is this assumption 
correct?

But I haven't gotten to the part of setting up the SSL connector yet, 
I'm struggling with the IP address routing at the moment. Assuming that 
I do indeed need to have this site on a separate IP, how do I configure 
Apache, jk2 and Tomcat to work with the additional IP address without 
interrupting the existing name-based virtual hosts? Relevant sections 
of my configuration are below. name-based-client1.com and 
name-based-client2.com are working as desired already, but 
IP-ssl-client.com is not responding to requests.

One thing that confuses me: I found instructions on how to setup Tomcat 
to work with another IP by creating another Connector in server.xml, 
but if I setup a new Connector, how can jk2 route the requests from 
Apache, rather than Tomcat handling it entirely? Do I need to modify 
workers2.properties instead and leave server.xml as is? It seems like 
this approach would lead to a standalone Tomcat intercepting requests 
to that IP, but I definitely need Apache to handle the requests before 
redirecting JSP requests to Tomcat.

TIA,
Troy
server.xml:
...

	www.name-based-client1.com
	
	


	www.name-based-client2.com
	
	


	www.IP-ssl-client.com
	
	

...

httpd.conf:
...

DocumentRoot /usr/local/tomcat/webapps/name-based-client1.com
ServerName name-based-client1.com
ServerAlias www.name-based-client1.com
DirectoryIndex index.jsp index.html index.cgi index.php
CustomLog logs/name-based-client1.com_access_log combined
ErrorLog logs/name-based-client1.com_error_log

JkUriSet worker ajp13:localhost:8009

ScriptAlias /cgi-bin/ 
/usr/local/tomcat/webapps/name-based-client1.com/cgi-bin/

AllowOverride None
Options None
Order allow,deny
Allow from all


AllowOverride AuthConfig




DocumentRoot /usr/local/tomcat/webapps/name-based-client2.com
ServerName name-based-client2.com
ServerAlias www.name-based-client2.com
DirectoryIndex index.jsp index.html index.cgi index.php
CustomLog logs/name-based-client2.com_access_log combined
ErrorLog logs/name-based-client2.com_error_log

JkUriSet worker ajp13:localhost:8009

ScriptAlias /cgi-bin/ 
/usr/local/tomcat/webapps/name-based-client2.com/web/cgi-bin/

AllowOverride None
Options None
Order allow,deny
Allow from all


AllowOverride AuthConfig



Listen 192.168.1.2:80

DocumentRoot /usr/local/tomcat/webapps/IP-ssl-client.com
ServerName IP-ssl-client.com
DirectoryIndex index.jsp index.html index.cgi index.php
CustomLog logs/IP-ssl-client.com_access_log combined
ErrorLog logs/IP-ssl-client.com_error_log

JkUriSet worker ajp13:localhost:8009

ScriptAlias /cgi-bin/ 
/usr/local/tomcat/webapps/IP-ssl-client.com/cgi-bin/

AllowOverride None
Options None
Order allow,deny
Allow from all


AllowOverride AuthConfig


...

workers2.properties:
[shm]
info=Scoreboard. Requried for reconfiguration and status with 
multiprocess servers.
file=anon

# Defines a load balancer named lb. Use even if you only have one 
machine.
[lb:lb]

# Example socket channel, override port and host.
[channel.socket:localhost:8009]
port=8009
host=127.0.0.1
# define the worker
[ajp13:localhost:8009]
channel=channel.socket:localhost:8009
group=lb
# Map the Tomcat examples webapp to the Web server uri space
[uri:/examples/*]
group=lb
[status:]
info=Status worker, displays runtime information
[uri:/jkstatus/*]
info=The Tomcat /jkstatus handler
group=status:

__
Troy Davis
Technology Director
Metaphor Studio
538 Reading Road
Loft 200
Cincinnati, Ohio 45202
Tel: 513-723-0290
Fax: 513-723-0670
http://metaphorstudio.com
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [OT] Java developer friendly Linux distro

2004-12-21 Thread Andreas Vombach
... has somebody experience with gcj? On RHEL eclipse (but only 2.1.2) 
works with it and it looks faster than with Sun jdk. gcj could be also 
an option for tomcat, I'll try as soon I have time for it ...

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


RE: How to run servlet for every 30 minutes in Tomcat 4.1.30

2004-12-21 Thread Allistair Crossley
+1. you aren't being clear  the only reason I can think you have an 
application wishing to talk to a servlet is that you are then going on to 
request info from the servlet from a remote machine across the net?? .. in that 
case and most others you should have your application polling the servlet 
itself in a thread. you'll need to explain your scenario if this is inaccurate, 
i.e if the Java App is in fact also a web app.

JAVA APPLICATION || TOMCAT + SERVLET || INTERNET || REMOTE MACHINE

 - POLL 30s ->
  REQUEST INFO >
  <--- RESPONSE 
 <-- RESPONSE 


> -Original Message-
> From: Wade Chandler [mailto:[EMAIL PROTECTED]
> Sent: 21 December 2004 16:03
> To: Tomcat Users List
> Subject: Re: How to run servlet for every 30 minutes in Tomcat 4.1.30
> 
> 
> Shilpa Nalgonda wrote:
> > Hi,
> > I am using Tomcat4.1.30 version.
> > I have to develop a client application which looks in the 
> database every 30
> > minutes,
> > to retrieve the status of an order and send the status to 
> the remote client.
> > Again waits for the
> > The client's response and insert the repsonse back to the database.
> > 
> > I wanted to do this in a servlet, so is there any way that 
> i could run this
> > servlet automatically inside the
> > Tomcat container, or is it configurable in servlet mapping? 
> if so can
> > someone please suggest me with examples...
> > 
> > 
> > 
> -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> > 
> > 
> 
> Wellit's kind of not extremely clear what you are asking, but why 
> does the servlet need to do anything except listen for a 
> client which is 
> threaded to do this every 30 minutes, in other words...why 
> not have the 
> servlet do what it naturally does...sit there and get hit by client 
> requestsget the infoand send it back?  I mean...the servlet 
> can't push to the client unless you want to use something 
> besides http, 
> or unless you are using servlets on both ends and http 
> servers on both 
> ends.  You could use keep alives I guess.I wouldn't 
> thoughonly 
> so many tcp/ip connections.
> 
> Wade
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


 
---
QAS Ltd.
Developers of QuickAddress Software
http://www.qas.com";>www.qas.com
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---



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



Re: How to run servlet for every 30 minutes in Tomcat 4.1.30

2004-12-21 Thread Dakota Jack
Hello, Shilpa,

With Wade, I wonder what you want.  Apparently you have a client
making and order and being informed about the status of the order. 
You say you have to develop a "client application" which looks to the
database.  Since this is a Tomcat list, that would seem to be a
"server application"?Maybe by "client application" you mean a
"server application" to help clients?

If you are using a web, browser, based application, then you have to
wait for the client to check with you rather than "send the status to
the remote client".  Blah, blah, blah.

The point, I guess, is that you really need to say in more detail what
you are doing.  What does your client look like?  Can you create a
rich client?  Etc.

Jack


-- 
"You can lead a horse to water but you cannot make it float on its back."

~Dakota Jack~

"You can't wake a person who is pretending to be asleep."

~Native Proverb~

"Each man is good in His sight. It is not necessary for eagles to be crows."

~Hunkesni (Sitting Bull), Hunkpapa Sioux~

---

"This message may contain confidential and/or privileged information.
If you are not the addressee or authorized to receive this for the
addressee, you must not use, copy, disclose, or take any action based
on this message or any information herein. If you have received this
message in error, please advise the sender immediately by reply e-mail
and delete this message. Thank you for your cooperation."

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



RE: How to run servlet for every 30 minutes in Tomcat 4.1.30

2004-12-21 Thread Shilpa Nalgonda
Thanks for the reply...

The application which i am trying to write is a standalone utility.. Client
does not hit this servlet.

Instead my application which is a servlet, will make some database calls--
and if the required data is present in the database, then that data is sent
to the client via xmlrpc call and the response from the xmlrpc call is
updated back into the dataabse.

So we want this utility preferably servlet in our Tomcat container to be run
every 30 minutes like a cron job, to do the database updates..

There are so many other classes deployed on Tomcat and i want to use those
classes to write this servlet utility.
This is the reason why chose to use servlet, but is there any configurable
parameter to run servlet for every 30 minutes...

-Original Message-
From: Wade Chandler [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 21, 2004 11:03 AM
To: Tomcat Users List
Subject: Re: How to run servlet for every 30 minutes in Tomcat 4.1.30


Shilpa Nalgonda wrote:
> Hi,
> I am using Tomcat4.1.30 version.
> I have to develop a client application which looks in the database every
30
> minutes,
> to retrieve the status of an order and send the status to the remote
client.
> Again waits for the
> The client's response and insert the repsonse back to the database.
>
> I wanted to do this in a servlet, so is there any way that i could run
this
> servlet automatically inside the
> Tomcat container, or is it configurable in servlet mapping? if so can
> someone please suggest me with examples...
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>

Wellit's kind of not extremely clear what you are asking, but why
does the servlet need to do anything except listen for a client which is
threaded to do this every 30 minutes, in other words...why not have the
servlet do what it naturally does...sit there and get hit by client
requestsget the infoand send it back?  I mean...the servlet
can't push to the client unless you want to use something besides http,
or unless you are using servlets on both ends and http servers on both
ends.  You could use keep alives I guess.I wouldn't thoughonly
so many tcp/ip connections.

Wade


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



AW: performance issue with JK und IIS6

2004-12-21 Thread Michael Südkamp
Do you have some smart keywords for searching this issue?

Michael

> -Ursprüngliche Nachricht-
> Von: Parsons Technical Services
> [mailto:[EMAIL PROTECTED]
> Gesendet: Dienstag, 21. Dezember 2004 13:21
> An: Tomcat Users List
> Betreff: Re: performance issue with JK und IIS6
>
>
> Check the archives. There was a similar issue less than a
> couple of month
> ago.
>
> I think it involved a problem with ack.
>
> Doug


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



RE: How to run servlet for every 30 minutes in Tomcat 4.1.30

2004-12-21 Thread Allistair Crossley
no, and I believe doing so it bad practice. use some OS controlled timer like 
cron to issue a HTTP call to your servlet. I once wrote a shell script that 
calls a http address on the local machine but cannot remember how ;) if you are 
using oracle then you can setup this timer thread inside the database itself. 
don't add a thread into your web application.

> -Original Message-
> From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
> Sent: 21 December 2004 16:14
> To: Tomcat Users List
> Subject: RE: How to run servlet for every 30 minutes in Tomcat 4.1.30
> 
> 
> Thanks for the reply...
> 
> The application which i am trying to write is a standalone 
> utility.. Client
> does not hit this servlet.
> 
> Instead my application which is a servlet, will make some 
> database calls--
> and if the required data is present in the database, then 
> that data is sent
> to the client via xmlrpc call and the response from the xmlrpc call is
> updated back into the dataabse.
> 
> So we want this utility preferably servlet in our Tomcat 
> container to be run
> every 30 minutes like a cron job, to do the database updates..
> 
> There are so many other classes deployed on Tomcat and i want 
> to use those
> classes to write this servlet utility.
> This is the reason why chose to use servlet, but is there any 
> configurable
> parameter to run servlet for every 30 minutes...
> 
> -Original Message-
> From: Wade Chandler [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, December 21, 2004 11:03 AM
> To: Tomcat Users List
> Subject: Re: How to run servlet for every 30 minutes in Tomcat 4.1.30
> 
> 
> Shilpa Nalgonda wrote:
> > Hi,
> > I am using Tomcat4.1.30 version.
> > I have to develop a client application which looks in the 
> database every
> 30
> > minutes,
> > to retrieve the status of an order and send the status to the remote
> client.
> > Again waits for the
> > The client's response and insert the repsonse back to the database.
> >
> > I wanted to do this in a servlet, so is there any way that 
> i could run
> this
> > servlet automatically inside the
> > Tomcat container, or is it configurable in servlet mapping? 
> if so can
> > someone please suggest me with examples...
> >
> >
> > 
> -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> 
> Wellit's kind of not extremely clear what you are asking, but why
> does the servlet need to do anything except listen for a 
> client which is
> threaded to do this every 30 minutes, in other words...why 
> not have the
> servlet do what it naturally does...sit there and get hit by client
> requestsget the infoand send it back?  I mean...the servlet
> can't push to the client unless you want to use something 
> besides http,
> or unless you are using servlets on both ends and http servers on both
> ends.  You could use keep alives I guess.I wouldn't thoughonly
> so many tcp/ip connections.
> 
> Wade
> 
> 
> -
> 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]
> 
> 


 
---
QAS Ltd.
Developers of QuickAddress Software
http://www.qas.com";>www.qas.com
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---



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



Re: Why is tomcat (java) so memory intensive?

2004-12-21 Thread Dakota Jack
Why, then, does the Tomcat 5.0 say in the RELEASE-NOTES "JAVAC leaking
memory" is an issue?


On Tue, 21 Dec 2004 16:06:13 -, Allistair Crossley
<[EMAIL PROTECTED]> wrote:
> i think (from memory) it had to do with registering requests with jk. anyway, 
> like i say, upgrade and you'll see that leak go away i am pretty sure.
> 
> > -Original Message-
> > From: Allistair Crossley
> > Sent: 21 December 2004 16:00
> > To: Tomcat Users List; [EMAIL PROTECTED]
> > Subject: RE: Why is tomcat (java) so memory intensive?
> >
> >
> > you are right, tomcat 5.0.19 did have a memory leak. some
> > dispute it, but it is there, i had it also and used a
> > profiler to show it. you should upgrade to 5.0.28.
> >



Thanks,

Jack

-- 
"You can lead a horse to water but you cannot make it float on its back."

~Dakota Jack~

"You can't wake a person who is pretending to be asleep."

~Native Proverb~

"Each man is good in His sight. It is not necessary for eagles to be crows."

~Hunkesni (Sitting Bull), Hunkpapa Sioux~

---

"This message may contain confidential and/or privileged information.
If you are not the addressee or authorized to receive this for the
addressee, you must not use, copy, disclose, or take any action based
on this message or any information herein. If you have received this
message in error, please advise the sender immediately by reply e-mail
and delete this message. Thank you for your cooperation."

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



Re: How to run servlet for every 30 minutes in Tomcat 4.1.30

2004-12-21 Thread Billy Talton
Why are you writing a servlet for this?  If the application does not
use any of the services confined to the Servlet API and Tomcat, just
write a stand-alone application and setup up a cron job to run it. 
Seems like overkill to me.


On Tue, 21 Dec 2004 16:28:49 -, Allistair Crossley
<[EMAIL PROTECTED]> wrote:
> no, and I believe doing so it bad practice. use some OS controlled timer like 
> cron to issue a HTTP call to your servlet. I once wrote a shell script that 
> calls a http address on the local machine but cannot remember how ;) if you 
> are using oracle then you can setup this timer thread inside the database 
> itself. don't add a thread into your web application.
> 
> > -Original Message-
> > From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
> > Sent: 21 December 2004 16:14
> > To: Tomcat Users List
> > Subject: RE: How to run servlet for every 30 minutes in Tomcat 4.1.30
> >
> >
> > Thanks for the reply...
> >
> > The application which i am trying to write is a standalone
> > utility.. Client
> > does not hit this servlet.
> >
> > Instead my application which is a servlet, will make some
> > database calls--
> > and if the required data is present in the database, then
> > that data is sent
> > to the client via xmlrpc call and the response from the xmlrpc call is
> > updated back into the dataabse.
> >
> > So we want this utility preferably servlet in our Tomcat
> > container to be run
> > every 30 minutes like a cron job, to do the database updates..
> >
> > There are so many other classes deployed on Tomcat and i want
> > to use those
> > classes to write this servlet utility.
> > This is the reason why chose to use servlet, but is there any
> > configurable
> > parameter to run servlet for every 30 minutes...
> >
> > -Original Message-
> > From: Wade Chandler [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, December 21, 2004 11:03 AM
> > To: Tomcat Users List
> > Subject: Re: How to run servlet for every 30 minutes in Tomcat 4.1.30
> >
> >
> > Shilpa Nalgonda wrote:
> > > Hi,
> > > I am using Tomcat4.1.30 version.
> > > I have to develop a client application which looks in the
> > database every
> > 30
> > > minutes,
> > > to retrieve the status of an order and send the status to the remote
> > client.
> > > Again waits for the
> > > The client's response and insert the repsonse back to the database.
> > >
> > > I wanted to do this in a servlet, so is there any way that
> > i could run
> > this
> > > servlet automatically inside the
> > > Tomcat container, or is it configurable in servlet mapping?
> > if so can
> > > someone please suggest me with examples...
> > >
> > >
> > >
> > -
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> > >
> >
> > Wellit's kind of not extremely clear what you are asking, but why
> > does the servlet need to do anything except listen for a
> > client which is
> > threaded to do this every 30 minutes, in other words...why
> > not have the
> > servlet do what it naturally does...sit there and get hit by client
> > requestsget the infoand send it back?  I mean...the servlet
> > can't push to the client unless you want to use something
> > besides http,
> > or unless you are using servlets on both ends and http servers on both
> > ends.  You could use keep alives I guess.I wouldn't thoughonly
> > so many tcp/ip connections.
> >
> > Wade
> >
> >
> > -
> > 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]
> >
> >
> 
> 
> ---
> QAS Ltd.
> Developers of QuickAddress Software
> http://www.qas.com";>www.qas.com
> Registered in England: No 2582055
> Registered in Australia: No 082 851 474
> ---
> 
> 
> -
> 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: Why is tomcat (java) so memory intensive?

2004-12-21 Thread Dakota Jack
Sorry, misread what you said.

Jack


On Tue, 21 Dec 2004 08:40:01 -0800, Dakota Jack <[EMAIL PROTECTED]> wrote:
> Why, then, does the Tomcat 5.0 say in the RELEASE-NOTES "JAVAC leaking
> memory" is an issue?
> 
> 
> On Tue, 21 Dec 2004 16:06:13 -, Allistair Crossley
> <[EMAIL PROTECTED]> wrote:
> > i think (from memory) it had to do with registering requests with jk. 
> > anyway, like i say, upgrade and you'll see that leak go away i am pretty 
> > sure.
> >
> > > -Original Message-
> > > From: Allistair Crossley
> > > Sent: 21 December 2004 16:00
> > > To: Tomcat Users List; [EMAIL PROTECTED]
> > > Subject: RE: Why is tomcat (java) so memory intensive?
> > >
> > >
> > > you are right, tomcat 5.0.19 did have a memory leak. some
> > > dispute it, but it is there, i had it also and used a
> > > profiler to show it. you should upgrade to 5.0.28.
> > >
> 
> 
> Thanks,
> 
> Jack
> 
> --
> "You can lead a horse to water but you cannot make it float on its back."
> 
> ~Dakota Jack~
> 
> "You can't wake a person who is pretending to be asleep."
> 
> ~Native Proverb~
> 
> "Each man is good in His sight. It is not necessary for eagles to be crows."
> 
> ~Hunkesni (Sitting Bull), Hunkpapa Sioux~
> 
> ---
> 
> "This message may contain confidential and/or privileged information.
> If you are not the addressee or authorized to receive this for the
> addressee, you must not use, copy, disclose, or take any action based
> on this message or any information herein. If you have received this
> message in error, please advise the sender immediately by reply e-mail
> and delete this message. Thank you for your cooperation."
> 


-- 
"You can lead a horse to water but you cannot make it float on its back."

~Dakota Jack~

"You can't wake a person who is pretending to be asleep."

~Native Proverb~

"Each man is good in His sight. It is not necessary for eagles to be crows."

~Hunkesni (Sitting Bull), Hunkpapa Sioux~

---

"This message may contain confidential and/or privileged information.
If you are not the addressee or authorized to receive this for the
addressee, you must not use, copy, disclose, or take any action based
on this message or any information herein. If you have received this
message in error, please advise the sender immediately by reply e-mail
and delete this message. Thank you for your cooperation."

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



RE: How to run servlet for every 30 minutes in Tomcat 4.1.30

2004-12-21 Thread Ben Souther
On Tue, 2004-12-21 at 11:28, Allistair Crossley wrote:
> no, and I believe doing so it bad practice. use some OS controlled timer like 
> cron to issue a HTTP call to your servlet. I once wrote a shell script that 
> calls a http address on the local machine but cannot remember how ;) if you 
> are using oracle then you can setup this timer thread inside the database 
> itself. don't add a thread into your web application.
> 

I concur. It's certainly possible to write a treaded java object that
fires a command every so often but there would be no point in making
that object a servlet (servlets exist to answer client requests). 
It's also, IMHO, more aggravation than it's worth to manage your own
daemon threads in a webapp.

It would take all of 2 minutes to write a timer with crontab and wget
that could call your servlet whenever you want.


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



RE: How to run servlet for every 30 minutes in Tomcat 4.1.30

2004-12-21 Thread pandu yelamanchili
I agree. Also You could write a standalone java class which does nothing but 
makes a http call to your Servlet. This class can be scheduled to run as a 
task every 30 minutes or so.
pandu

From: "Allistair Crossley" <[EMAIL PROTECTED]>
Reply-To: "Tomcat Users List" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Subject: RE: How to run servlet for every 30 minutes in Tomcat 4.1.30
Date: Tue, 21 Dec 2004 16:28:49 -
no, and I believe doing so it bad practice. use some OS controlled timer 
like cron to issue a HTTP call to your servlet. I once wrote a shell script 
that calls a http address on the local machine but cannot remember how ;) 
if you are using oracle then you can setup this timer thread inside the 
database itself. don't add a thread into your web application.

> -Original Message-
> From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
> Sent: 21 December 2004 16:14
> To: Tomcat Users List
> Subject: RE: How to run servlet for every 30 minutes in Tomcat 4.1.30
>
>
> Thanks for the reply...
>
> The application which i am trying to write is a standalone
> utility.. Client
> does not hit this servlet.
>
> Instead my application which is a servlet, will make some
> database calls--
> and if the required data is present in the database, then
> that data is sent
> to the client via xmlrpc call and the response from the xmlrpc call is
> updated back into the dataabse.
>
> So we want this utility preferably servlet in our Tomcat
> container to be run
> every 30 minutes like a cron job, to do the database updates..
>
> There are so many other classes deployed on Tomcat and i want
> to use those
> classes to write this servlet utility.
> This is the reason why chose to use servlet, but is there any
> configurable
> parameter to run servlet for every 30 minutes...
>
> -Original Message-
> From: Wade Chandler [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, December 21, 2004 11:03 AM
> To: Tomcat Users List
> Subject: Re: How to run servlet for every 30 minutes in Tomcat 4.1.30
>
>
> Shilpa Nalgonda wrote:
> > Hi,
> > I am using Tomcat4.1.30 version.
> > I have to develop a client application which looks in the
> database every
> 30
> > minutes,
> > to retrieve the status of an order and send the status to the remote
> client.
> > Again waits for the
> > The client's response and insert the repsonse back to the database.
> >
> > I wanted to do this in a servlet, so is there any way that
> i could run
> this
> > servlet automatically inside the
> > Tomcat container, or is it configurable in servlet mapping?
> if so can
> > someone please suggest me with examples...
> >
> >
> >
> -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
>
> Wellit's kind of not extremely clear what you are asking, but why
> does the servlet need to do anything except listen for a
> client which is
> threaded to do this every 30 minutes, in other words...why
> not have the
> servlet do what it naturally does...sit there and get hit by client
> requestsget the infoand send it back?  I mean...the servlet
> can't push to the client unless you want to use something
> besides http,
> or unless you are using servlets on both ends and http servers on both
> ends.  You could use keep alives I guess.I wouldn't thoughonly
> so many tcp/ip connections.
>
> Wade
>
>
> -
> 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]
>
>

---
QAS Ltd.
Developers of QuickAddress Software
http://www.qas.com";>www.qas.com
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---

-
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: Why is tomcat (java) so memory intensive?

2004-12-21 Thread Dakota Jack
Is there any reason not to upgrade to 5.5?  Is that ready for prime
time?  Thanks.

Jack


On Tue, 21 Dec 2004 16:06:13 -, Allistair Crossley
<[EMAIL PROTECTED]> wrote:
> i think (from memory) it had to do with registering requests with jk. anyway, 
> like i say, upgrade and you'll see that leak go away i am pretty sure.
> 
> > -Original Message-
> > From: Allistair Crossley
> > Sent: 21 December 2004 16:00
> > To: Tomcat Users List; [EMAIL PROTECTED]
> > Subject: RE: Why is tomcat (java) so memory intensive?
> >
> >
> > you are right, tomcat 5.0.19 did have a memory leak. some
> > dispute it, but it is there, i had it also and used a
> > profiler to show it. you should upgrade to 5.0.28.
> >
> > Allistair.
> >
> > > -Original Message-
> > > From: Philippe Deslauriers [mailto:[EMAIL PROTECTED]
> > > Sent: 21 December 2004 15:47
> > > To: Tomcat Users List; [EMAIL PROTECTED]
> > > Subject: RE: Why is tomcat (java) so memory intensive?
> > >
> > >
> > >
> > > Actually no, I tough it was 256Mb. Thanks.
> > > It will go out of memory around 125Mb 140Mb in the task
> > > manager. It depends.
> > >
> > > But your point just prove my problem to be even stanger: if
> > > 64 Mb shoulb be
> > > the limit
> > > where did the other 60Mb+ go? (the JVM itself never takes
> > > that much memory,
> > > not from my experience).
> > >
> > > What I did not mention in the orgininal post is that I have
> > > the same problem
> > > with an app running on 5.0.18 sam jdk, using -Xms256m
> > > -Xmx1024m, it will
> > > also run OOM, and again profiling the app did not show any
> > > leak, and a large
> > > gap between the total heap and whatever the task manger reports.
> > >
> > > My main issue here is where does the gap come from?
> > >
> > >
> > > -Original Message-
> > > From: Christoph Kutzinski [mailto:[EMAIL PROTECTED]
> > > Sent: Tuesday, December 21, 2004 10:22 AM
> > > To: Tomcat Users List
> > > Subject: Re: Why is tomcat (java) so memory intensive?
> > >
> > >
> > > Philippe Deslauriers wrote:
> > > > I am using Tomcat 5.0.19 on Windows XP SP2, J2SDK 1.4.2_03.
> > > >
> > > > I have a serious memory problem with Tomcat, it just EAT
> > > memory without
> > > > explanation, until OOM error occurs.
> > > >
> > > > The Java.exe process in the windows task manager reports
> > > using between
> > > 95Mb
> > > > and 105Mb after the startup of the webapp. I do not use Xms
> > > Xmx options in
> > > > dev mode.
> > >
> > > You do know that the VM will only allocate 64 mb for heap
> > if you don't
> > > use the Xmx option, do you?
> > > After the 64 mb are used up the vm will throw an oom error.
> > > How much memory does the taskmanager report before the oom
> > > error happens?
> > >
> > >
> > > Christoph
> > >
> > >
> > -
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> > >
> > >
> > -
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> >
> >
> > 
> > ---
> > QAS Ltd.
> > Developers of QuickAddress Software
> > http://www.qas.com";>www.qas.com
> > Registered in England: No 2582055
> > Registered in Australia: No 082 851 474
> > ---
> > 
> >
> >
> > -
> > 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]
> 
> 


-- 
"You can lead a horse to water but you cannot make it float on its back."

~Dakota Jack~

"You can't wake a person who is pretending to be asleep."

~Native Proverb~

"Each man is good in His sight. It is not necessary for eagles to be crows."

~Hunkesni (Sitting Bull), Hunkpapa Sioux~

---

"This message may contain confidential and/or privileged information.
If you are not the addressee or authorized to receive this for the
addressee, you must not use, copy, disclose, or take any action based
on this message or any information herein. If you have received this
message in error, please advise the sender immediately by reply e-mail
and delete this message. Thank you for your cooperation."

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



RE: Why is tomcat (java) so memory intensive?

2004-12-21 Thread Dale, Matt
Sounds like you are running out of space in the permanent generation. Add 
-XX:MaxPermSize=128M to your JAVA_OPTS

-Original Message-
From: Philippe Deslauriers [mailto:[EMAIL PROTECTED]
Sent: 21 December 2004 15:47
To: Tomcat Users List; [EMAIL PROTECTED]
Subject: RE: Why is tomcat (java) so memory intensive?



Actually no, I tough it was 256Mb. Thanks.
It will go out of memory around 125Mb 140Mb in the task manager. It depends.

But your point just prove my problem to be even stanger: if 64 Mb shoulb be
the limit
where did the other 60Mb+ go? (the JVM itself never takes that much memory,
not from my experience).

What I did not mention in the orgininal post is that I have the same problem
with an app running on 5.0.18 sam jdk, using -Xms256m -Xmx1024m, it will
also run OOM, and again profiling the app did not show any leak, and a large
gap between the total heap and whatever the task manger reports.

My main issue here is where does the gap come from?


-Original Message-
From: Christoph Kutzinski [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 21, 2004 10:22 AM
To: Tomcat Users List
Subject: Re: Why is tomcat (java) so memory intensive?


Philippe Deslauriers wrote:
> I am using Tomcat 5.0.19 on Windows XP SP2, J2SDK 1.4.2_03.
>
> I have a serious memory problem with Tomcat, it just EAT memory without
> explanation, until OOM error occurs.
>
> The Java.exe process in the windows task manager reports using between
95Mb
> and 105Mb after the startup of the webapp. I do not use Xms Xmx options in
> dev mode.

You do know that the VM will only allocate 64 mb for heap if you don't
use the Xmx option, do you?
After the 64 mb are used up the vm will throw an oom error.
How much memory does the taskmanager report before the oom error happens?


Christoph

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



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

Any opinions expressed in this E-mail may be those of the individual and not 
necessarily the company. This E-mail and any files transmitted with it are 
confidential and solely for the use of the intended recipient. If you are not 
the intended recipient or the person responsible for delivering to the intended 
recipient, be advised that you have received this E-mail in error and that any 
use or copying is strictly prohibited. If you have received this E-mail in 
error please notify the beCogent postmaster at [EMAIL PROTECTED]
Unless expressly stated, opinions in this email are those of the individual 
sender and not beCogent Ltd. You must take full responsibility for virus 
checking this email and any attachments.
Please note that the content of this email or any of its attachments may 
contain data that falls within the scope of the Data Protection Acts and that 
you must ensure that any handling or processing of such data by you is fully 
compliant with the terms and provisions of the Data Protection Act 1984 and 
1998.


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

Re: Tomcat 5, jk2, Apache 2 and mixed name/IP virtual hosts

2004-12-21 Thread g . lams
Troy Davis <[EMAIL PROTECTED]> wrote on 21/12/2004 17.07.40:

> Hello,
> 
> I've got a Tomcat 5 / Apache 2 / jk2 server which has been serving 
> several different virtual hosts which share a common IP address. I now 
> need to implement my first SSL-protected website on this machine, and I 
> am working under the assumption that this site must have a dedicated IP 
> address in order for SSL to work. First of all, is this assumption 
> correct?
Yes, should be
see http://httpd.apache.org/docs-2.0/vhosts/name-based.html
"Name-based virtual hosting cannot be used with SSL secure servers because 
of the nature of the SSL protocol. "

Gaël

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



Re: How to run servlet for every 30 minutes in Tomcat 4.1.30

2004-12-21 Thread karjera

Laba diena.



Dėkojame, kad mums parašėte.

Jūsų atsiųsta žinutė išsaugota mūsų duomenų bazėje.

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



RE: How to run servlet for every 30 minutes in Tomcat 4.1.30

2004-12-21 Thread Shilpa Nalgonda
My application has to use the connection pooling of Tomcat to talk to the
database...
and all my Database access classes are deployed om Tomcat...so if i just
write a java standalone command line program,
can i access those connection pooling classes...

-Original Message-
From: Billy Talton [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 21, 2004 11:41 AM
To: Tomcat Users List
Subject: Re: How to run servlet for every 30 minutes in Tomcat 4.1.30


Why are you writing a servlet for this?  If the application does not
use any of the services confined to the Servlet API and Tomcat, just
write a stand-alone application and setup up a cron job to run it.
Seems like overkill to me.


On Tue, 21 Dec 2004 16:28:49 -, Allistair Crossley
<[EMAIL PROTECTED]> wrote:
> no, and I believe doing so it bad practice. use some OS controlled timer
like cron to issue a HTTP call to your servlet. I once wrote a shell script
that calls a http address on the local machine but cannot remember how ;) if
you are using oracle then you can setup this timer thread inside the
database itself. don't add a thread into your web application.
>
> > -Original Message-
> > From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
> > Sent: 21 December 2004 16:14
> > To: Tomcat Users List
> > Subject: RE: How to run servlet for every 30 minutes in Tomcat 4.1.30
> >
> >
> > Thanks for the reply...
> >
> > The application which i am trying to write is a standalone
> > utility.. Client
> > does not hit this servlet.
> >
> > Instead my application which is a servlet, will make some
> > database calls--
> > and if the required data is present in the database, then
> > that data is sent
> > to the client via xmlrpc call and the response from the xmlrpc call is
> > updated back into the dataabse.
> >
> > So we want this utility preferably servlet in our Tomcat
> > container to be run
> > every 30 minutes like a cron job, to do the database updates..
> >
> > There are so many other classes deployed on Tomcat and i want
> > to use those
> > classes to write this servlet utility.
> > This is the reason why chose to use servlet, but is there any
> > configurable
> > parameter to run servlet for every 30 minutes...
> >
> > -Original Message-
> > From: Wade Chandler [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, December 21, 2004 11:03 AM
> > To: Tomcat Users List
> > Subject: Re: How to run servlet for every 30 minutes in Tomcat 4.1.30
> >
> >
> > Shilpa Nalgonda wrote:
> > > Hi,
> > > I am using Tomcat4.1.30 version.
> > > I have to develop a client application which looks in the
> > database every
> > 30
> > > minutes,
> > > to retrieve the status of an order and send the status to the remote
> > client.
> > > Again waits for the
> > > The client's response and insert the repsonse back to the database.
> > >
> > > I wanted to do this in a servlet, so is there any way that
> > i could run
> > this
> > > servlet automatically inside the
> > > Tomcat container, or is it configurable in servlet mapping?
> > if so can
> > > someone please suggest me with examples...
> > >
> > >
> > >
> > -
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> > >
> >
> > Wellit's kind of not extremely clear what you are asking, but why
> > does the servlet need to do anything except listen for a
> > client which is
> > threaded to do this every 30 minutes, in other words...why
> > not have the
> > servlet do what it naturally does...sit there and get hit by client
> > requestsget the infoand send it back?  I mean...the servlet
> > can't push to the client unless you want to use something
> > besides http,
> > or unless you are using servlets on both ends and http servers on both
> > ends.  You could use keep alives I guess.I wouldn't thoughonly
> > so many tcp/ip connections.
> >
> > Wade
> >
> >
> > -
> > 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]
> >
> >
>
> 
> ---
> QAS Ltd.
> Developers of QuickAddress Software
> http://www.qas.com";>www.qas.com
> Registered in England: No 2582055
> Registered in Australia: No 082 851 474
> ---
> 
>
> -
> 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: Why is tomcat (java) so memory intensive?

2004-12-21 Thread Allistair Crossley
our production server has been on 5.5.4 for a few weeks and performing very 
nicely. 5.5.4 is the latest stable build for 5.5 series. give it a shot on your 
development server if you have one.

> -Original Message-
> From: Dakota Jack [mailto:[EMAIL PROTECTED]
> Sent: 21 December 2004 16:45
> To: Tomcat Users List
> Subject: Re: Why is tomcat (java) so memory intensive?
> 
> 
> Is there any reason not to upgrade to 5.5?  Is that ready for prime
> time?  Thanks.
> 
> Jack
> 
> 
> On Tue, 21 Dec 2004 16:06:13 -, Allistair Crossley
> <[EMAIL PROTECTED]> wrote:
> > i think (from memory) it had to do with registering 
> requests with jk. anyway, like i say, upgrade and you'll see 
> that leak go away i am pretty sure.
> > 
> > > -Original Message-
> > > From: Allistair Crossley
> > > Sent: 21 December 2004 16:00
> > > To: Tomcat Users List; [EMAIL PROTECTED]
> > > Subject: RE: Why is tomcat (java) so memory intensive?
> > >
> > >
> > > you are right, tomcat 5.0.19 did have a memory leak. some
> > > dispute it, but it is there, i had it also and used a
> > > profiler to show it. you should upgrade to 5.0.28.
> > >
> > > Allistair.
> > >
> > > > -Original Message-
> > > > From: Philippe Deslauriers [mailto:[EMAIL PROTECTED]
> > > > Sent: 21 December 2004 15:47
> > > > To: Tomcat Users List; [EMAIL PROTECTED]
> > > > Subject: RE: Why is tomcat (java) so memory intensive?
> > > >
> > > >
> > > >
> > > > Actually no, I tough it was 256Mb. Thanks.
> > > > It will go out of memory around 125Mb 140Mb in the task
> > > > manager. It depends.
> > > >
> > > > But your point just prove my problem to be even stanger: if
> > > > 64 Mb shoulb be
> > > > the limit
> > > > where did the other 60Mb+ go? (the JVM itself never takes
> > > > that much memory,
> > > > not from my experience).
> > > >
> > > > What I did not mention in the orgininal post is that I have
> > > > the same problem
> > > > with an app running on 5.0.18 sam jdk, using -Xms256m
> > > > -Xmx1024m, it will
> > > > also run OOM, and again profiling the app did not show any
> > > > leak, and a large
> > > > gap between the total heap and whatever the task manger reports.
> > > >
> > > > My main issue here is where does the gap come from?
> > > >
> > > >
> > > > -Original Message-
> > > > From: Christoph Kutzinski [mailto:[EMAIL PROTECTED]
> > > > Sent: Tuesday, December 21, 2004 10:22 AM
> > > > To: Tomcat Users List
> > > > Subject: Re: Why is tomcat (java) so memory intensive?
> > > >
> > > >
> > > > Philippe Deslauriers wrote:
> > > > > I am using Tomcat 5.0.19 on Windows XP SP2, J2SDK 1.4.2_03.
> > > > >
> > > > > I have a serious memory problem with Tomcat, it just EAT
> > > > memory without
> > > > > explanation, until OOM error occurs.
> > > > >
> > > > > The Java.exe process in the windows task manager reports
> > > > using between
> > > > 95Mb
> > > > > and 105Mb after the startup of the webapp. I do not use Xms
> > > > Xmx options in
> > > > > dev mode.
> > > >
> > > > You do know that the VM will only allocate 64 mb for heap
> > > if you don't
> > > > use the Xmx option, do you?
> > > > After the 64 mb are used up the vm will throw an oom error.
> > > > How much memory does the taskmanager report before the oom
> > > > error happens?
> > > >
> > > >
> > > > Christoph
> > > >
> > > >
> > > 
> -
> > > > To unsubscribe, e-mail: 
> [EMAIL PROTECTED]
> > > > For additional commands, e-mail: 
> [EMAIL PROTECTED]
> > > >
> > > >
> > > >
> > > >
> > > 
> -
> > > > To unsubscribe, e-mail: 
> [EMAIL PROTECTED]
> > > > For additional commands, e-mail: 
> [EMAIL PROTECTED]
> > > >
> > > >
> > >
> > >
> > > 
> > > ---
> > > QAS Ltd.
> > > Developers of QuickAddress Software
> > > http://www.qas.com";>www.qas.com
> > > Registered in England: No 2582055
> > > Registered in Australia: No 082 851 474
> > > ---
> > > 
> > >
> > >
> > > 
> -
> > > 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]
> > 
> > 
> 
> 
> -- 
> "You can lead a horse to water but you cannot make it float 
> on its back."
> 
> ~Dakota Jack~
> 
> "You can't wake a person who is pretending to be asleep."
> 
> ~Native Proverb~
> 
> "Each man is good in His sight. It is not necessary for 
> eagles to be crows."
> 
> ~Hunkesni (Sitting Bull), Hunkpapa Sioux~
> 
> ---
> 
> "This message may contain confidential and/or privileged information.
> If you are not the addressee or aut

Tomcat 5, jk2, Apache 2 and mixed name/IP virtual hosts

2004-12-21 Thread Troy Davis
I just found the problem, my apologies, it turns out to be a firewall 
port block upstream from me.

Thank You,
Troy

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


Tomcat 4.1 DBCP DB2 Problem

2004-12-21 Thread Friedrich Gonzalez
Hi;
this is my first post, and i apprecciate a lot your help.
We have a Tomcat Application Server 4.1.30, Sun JVM 1.4.2_05
in W2K server (512 ram) connected to a DB2 6.X resident in a IBM/390.
The web application performs several access to the DB2 for each user. We 
have normally
200 connections to the database. The application acesses lots of BLOB 
registries in those connections.
We use a connection pool of 400 connections at maximum.
It performs well most of the time. But sometimes when the load is heavy 
(it is happening more or less each week),
like 20 users at a time, Tomcat does not show any error but leaves a 
lock in the BLOB table without commit for
hours, we realize there is a problem when we see time out errors in the 
logs of tomcat.
What happens next is that there is no way to release that lock on the 
BLOB table, even
if we shutdown the w2k server the lock remains in the DB2.

The only way is to kill the DB2 thread in the DB2 server in the IBM/390 
or bring down DDF. After that, the web application
can access the blob registry that was unaccessible without restarting 
tomcat.

We have been unable to repeat the problem in the development site. Even 
on the same machine.
The server is not full in cpu processor, nor the database has any 
problem (apparently). Some
other applications use the database without problem.

I would greatly appreciatte somebody here can give me a hint about any 
of this. This is a critical application for us.
My manager is even thinking of replacing Tomcat with WAS 5.0 from IBM.
But i dont think that would solve the problem.

this is my server.xml: (PSDRS7B is production, DB2TEST is development)
thank you for reading, i know is too long.
-


 
 
 
   
   
   
   
 
   factory
   org.apache.catalina.users.MemoryUserDatabaseFactory
 
 
   pathname
   conf/tomcat-users.xml
 
   
   
 
   factory
   org.apache.commons.dbcp.BasicDataSourceFactory
 
 
   url
   jdbc:odbc:PSDRS7B
 
 
   validationQuery
   SELECT CODIGOSOLUCION FROM PSDRS7B.RESPUEST
 
 
   maxIdle
   200
 
 
   maxActive
   500
 
 
   driverClassName
   sun.jdbc.odbc.JdbcOdbcDriver
 
 
   maxWait
   -1
 
 
   removeAbandoned
   true
 
 
   username
   VM6GSR2
 
 
   logAbandoned
   true
 
 
   removeAbandonedTimeout
   10
 
 
   password
   WEBF1RE
 
   
   
 
   factory
   org.apache.commons.dbcp.BasicDataSourceFactory
 
 
   validationQuery
   SELECT CODIGOSOLUCION FROM TSDRS7B.RESPUEST
 
 
   maxWait
   -1
 
 
   maxActive
   500
 
 
   password
   ESTH3R
 
 
   url
   jdbc:odbc:DB2TEST
 
 
   driverClassName
   sun.jdbc.odbc.JdbcOdbcDriver
 
 
   maxIdle
   200
 
 
   username
   VM6GLC1
 
 
   removeAbandoned
   true
 
 
   logAbandoned
   true
 
 
   removeAbandonedTimeout
   10
 
   
 
 
   
 
   
   
 
   
directory="logs"  prefix="localhost_access_log." 
suffix=".txt"
pattern="common"/>
   
 
   
   
 
 
   
   
 
 
   
   
 
   
   
 
 
 
   
 

-

this is my web.xml:
-

http://java.sun.com/dtd/web-app_2_3.dtd";>

 
   ConsultaS7B
   ConsultaS7B
   ConsultaS7B
   rservlets.ConsultaS7B
 
 
   (like 100 servlets)
 
 
   ConsultaS7B
   /servlet/rservlets.ConsultaS7B
 
 
   (the same 100 servlets ...)
 
 
   
   3600
   
 
 
   snp
   www/unknown
 
 
   
   login.html
   
 

-
this the java file that access the database:
-
package rhost;
/**
* Clase que contiene la lógica para la conexión y solicitud de información
* al IBM/390 y JDBC
*/
import javax.naming.*;
import javax.sql.*;
import java.io.*;
import java.util.*;
import java.sql.*;
public class ConectaBD{
   //Conexión a la Base de Datos
   private String fieldContextDB = null;
   private Connection fieldConexionDB = null;
   private String fieldDriverDB = null;
   private String fieldUrlDB = null;
   private String fieldUsuarioDB = null;
   private String fieldClaveDB = null;
   p

RE: Why is tomcat (java) so memory intensive?

2004-12-21 Thread Dale, Matt
I think that's only with JDK 1.3 though

-Original Message-
From: Dakota Jack [mailto:[EMAIL PROTECTED]
Sent: 21 December 2004 16:40
To: Tomcat Users List
Subject: Re: Why is tomcat (java) so memory intensive?


Why, then, does the Tomcat 5.0 say in the RELEASE-NOTES "JAVAC leaking
memory" is an issue?


On Tue, 21 Dec 2004 16:06:13 -, Allistair Crossley
<[EMAIL PROTECTED]> wrote:
> i think (from memory) it had to do with registering requests with jk. anyway, 
> like i say, upgrade and you'll see that leak go away i am pretty sure.
> 
> > -Original Message-
> > From: Allistair Crossley
> > Sent: 21 December 2004 16:00
> > To: Tomcat Users List; [EMAIL PROTECTED]
> > Subject: RE: Why is tomcat (java) so memory intensive?
> >
> >
> > you are right, tomcat 5.0.19 did have a memory leak. some
> > dispute it, but it is there, i had it also and used a
> > profiler to show it. you should upgrade to 5.0.28.
> >



Thanks,

Jack

-- 
"You can lead a horse to water but you cannot make it float on its back."

~Dakota Jack~

"You can't wake a person who is pretending to be asleep."

~Native Proverb~

"Each man is good in His sight. It is not necessary for eagles to be crows."

~Hunkesni (Sitting Bull), Hunkpapa Sioux~

---

"This message may contain confidential and/or privileged information.
If you are not the addressee or authorized to receive this for the
addressee, you must not use, copy, disclose, or take any action based
on this message or any information herein. If you have received this
message in error, please advise the sender immediately by reply e-mail
and delete this message. Thank you for your cooperation."

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

Any opinions expressed in this E-mail may be those of the individual and not 
necessarily the company. This E-mail and any files transmitted with it are 
confidential and solely for the use of the intended recipient. If you are not 
the intended recipient or the person responsible for delivering to the intended 
recipient, be advised that you have received this E-mail in error and that any 
use or copying is strictly prohibited. If you have received this E-mail in 
error please notify the beCogent postmaster at [EMAIL PROTECTED]
Unless expressly stated, opinions in this email are those of the individual 
sender and not beCogent Ltd. You must take full responsibility for virus 
checking this email and any attachments.
Please note that the content of this email or any of its attachments may 
contain data that falls within the scope of the Data Protection Acts and that 
you must ensure that any handling or processing of such data by you is fully 
compliant with the terms and provisions of the Data Protection Act 1984 and 
1998.


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

RE: How to run servlet for every 30 minutes in Tomcat 4.1.30

2004-12-21 Thread Allistair Crossley
of course you can ... look up http://jakarta.apache.org/commons/dbcp/ and 
commons-pool or your database's driver may even have an implementation that 
supports pooling that you can instantiate directly with the javax.sql or 
java.sql api.

cron(30s) --> 
  socket call --> 
your app (ServerSocket) --> 
  spawn some new handler thread
call database (dbcp e.g) -->
get reply
call client via xmlrpc 
get reply
call database
  delete handler thread or put back into a pool
  ServerSocket wait

> -Original Message-
> From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
> Sent: 21 December 2004 16:41
> To: Tomcat Users List; Billy Talton
> Subject: RE: How to run servlet for every 30 minutes in Tomcat 4.1.30
> 
> 
> My application has to use the connection pooling of Tomcat to 
> talk to the
> database...
> and all my Database access classes are deployed om 
> Tomcat...so if i just
> write a java standalone command line program,
> can i access those connection pooling classes...
> 
> -Original Message-
> From: Billy Talton [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, December 21, 2004 11:41 AM
> To: Tomcat Users List
> Subject: Re: How to run servlet for every 30 minutes in Tomcat 4.1.30
> 
> 
> Why are you writing a servlet for this?  If the application does not
> use any of the services confined to the Servlet API and Tomcat, just
> write a stand-alone application and setup up a cron job to run it.
> Seems like overkill to me.
> 
> 
> On Tue, 21 Dec 2004 16:28:49 -, Allistair Crossley
> <[EMAIL PROTECTED]> wrote:
> > no, and I believe doing so it bad practice. use some OS 
> controlled timer
> like cron to issue a HTTP call to your servlet. I once wrote 
> a shell script
> that calls a http address on the local machine but cannot 
> remember how ;) if
> you are using oracle then you can setup this timer thread inside the
> database itself. don't add a thread into your web application.
> >
> > > -Original Message-
> > > From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
> > > Sent: 21 December 2004 16:14
> > > To: Tomcat Users List
> > > Subject: RE: How to run servlet for every 30 minutes in 
> Tomcat 4.1.30
> > >
> > >
> > > Thanks for the reply...
> > >
> > > The application which i am trying to write is a standalone
> > > utility.. Client
> > > does not hit this servlet.
> > >
> > > Instead my application which is a servlet, will make some
> > > database calls--
> > > and if the required data is present in the database, then
> > > that data is sent
> > > to the client via xmlrpc call and the response from the 
> xmlrpc call is
> > > updated back into the dataabse.
> > >
> > > So we want this utility preferably servlet in our Tomcat
> > > container to be run
> > > every 30 minutes like a cron job, to do the database updates..
> > >
> > > There are so many other classes deployed on Tomcat and i want
> > > to use those
> > > classes to write this servlet utility.
> > > This is the reason why chose to use servlet, but is there any
> > > configurable
> > > parameter to run servlet for every 30 minutes...
> > >
> > > -Original Message-
> > > From: Wade Chandler [mailto:[EMAIL PROTECTED]
> > > Sent: Tuesday, December 21, 2004 11:03 AM
> > > To: Tomcat Users List
> > > Subject: Re: How to run servlet for every 30 minutes in 
> Tomcat 4.1.30
> > >
> > >
> > > Shilpa Nalgonda wrote:
> > > > Hi,
> > > > I am using Tomcat4.1.30 version.
> > > > I have to develop a client application which looks in the
> > > database every
> > > 30
> > > > minutes,
> > > > to retrieve the status of an order and send the status 
> to the remote
> > > client.
> > > > Again waits for the
> > > > The client's response and insert the repsonse back to 
> the database.
> > > >
> > > > I wanted to do this in a servlet, so is there any way that
> > > i could run
> > > this
> > > > servlet automatically inside the
> > > > Tomcat container, or is it configurable in servlet mapping?
> > > if so can
> > > > someone please suggest me with examples...
> > > >
> > > >
> > > >
> > > 
> -
> > > > To unsubscribe, e-mail: 
> [EMAIL PROTECTED]
> > > > For additional commands, e-mail: 
> [EMAIL PROTECTED]
> > > >
> > > >
> > > >
> > >
> > > Wellit's kind of not extremely clear what you are 
> asking, but why
> > > does the servlet need to do anything except listen for a
> > > client which is
> > > threaded to do this every 30 minutes, in other words...why
> > > not have the
> > > servlet do what it naturally does...sit there and get hit 
> by client
> > > requestsget the infoand send it back?  I 
> mean...the servlet
> > > can't push to the client unless you want to use something
> > > besides http,
> > > or unless you are using servlets on both ends and http 
> servers on both
> > > ends.  You could use keep alives I guess.I wouldn't 
> thoughonly
> > > so many tcp/ip connections.
> > >
> > > 

HTTP Status 404 - /admin && HTTP Status 404 - /manager/html

2004-12-21 Thread Dwayne Ghant
Configured tomcat.5.0.27/apache2.x/mod_jk2.so
After configuration my "admin" and "manager" application
stoped working.
--
Dwayne A. Ghant
Application Developer
Temple University
215.204.
[EMAIL PROTECTED]

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


Re: How to run servlet for every 30 minutes in Tomcat 4.1.30

2004-12-21 Thread Jorge Sopena
Hi,
I'm having a similar problem in my application.
I've got several servlets called by the users. Every requets save some 
information in DB, that has to be sent to another server later and in a 
compress format.
So I need sth similar toShilpa is asking, a process which runs every  X 
minutes to recover the information and send it to the Server.

My solution to this problem was to implement a "ServletContextListener" 
inside Tomcat.
When Tomcat starts my application the "contextInitialized" method is 
called, and then a thread is started to do the task explained above.
I use "Thread.sleep(step)" to wait for the next execution.

I didn't find anyway to set a timer for a servlet, and I didn't like the 
option of creating an external script .

Any other  suggestions to solver this problem?
Thanks
Jorge
Ben Souther wrote:
On Tue, 2004-12-21 at 11:28, Allistair Crossley wrote:
 

no, and I believe doing so it bad practice. use some OS controlled timer like 
cron to issue a HTTP call to your servlet. I once wrote a shell script that 
calls a http address on the local machine but cannot remember how ;) if you are 
using oracle then you can setup this timer thread inside the database itself. 
don't add a thread into your web application.
   

I concur. It's certainly possible to write a treaded java object that
fires a command every so often but there would be no point in making
that object a servlet (servlets exist to answer client requests). 
It's also, IMHO, more aggravation than it's worth to manage your own
daemon threads in a webapp.

It would take all of 2 minutes to write a timer with crontab and wget
that could call your servlet whenever you want.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




AW: performance issue with JK und IIS6

2004-12-21 Thread Michael Südkamp

> You just must love Microsoft engineers just for that statement.
> One has to make something like that, and then dare to say it's
> a better product then before :).

I neither love nor hate MS or any other company or product. I was just
looking for a solution to my issue.

> You a using IIS5 compatibility mode correct?

Does compatibility mode mean checking the option "Execute WWW service in
IIS5 isolation mode" in the IIS console?
I tried this option but that changed anything.

Michael


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



Tomcat 4 + JK

2004-12-21 Thread Pieter Vandepitte
Hi, 
i have a (perhaps stupid) question. In my server.xml i defined for the 
Coyote/JK2 AJP 1.3 Connector  
 minProcessors="100" 
 maxProcessors="200" 
Simple question: I don't understand the meaning for these parameters: 
they do not what i expect. I thought these were the minimum and 
maximum number of processors/processes used by the jk-connector 
But when i execute ps -auwx | grep 'tomcat' 
i see 260 processes (all pretty identical) 
What is going on, what are these parameters actually doing? 
kind regards 
 
 
--  
Pieter Vandepitte  
Toledo  
KULeuven / LUDIT  
De Croylaan 52 A  
3001 Heverlee  
   
016 32 22 51  
[EMAIL PROTECTED]  
 
 
 
 

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



Re: [OT] Java developer friendly Linux distro

2004-12-21 Thread David Goodenough
On Tuesday 21 December 2004 16:13, Andreas Vombach wrote:
> .. has somebody experience with gcj? On RHEL eclipse (but only 2.1.2)
> works with it and it looks faster than with Sun jdk. gcj could be also
> an option for tomcat, I'll try as soon I have time for it ...
There was a note that the most recent version of SableVM runs Eclipse
and Tomcat.  Given that most of the problems were not in the JVM but
in the class library, that bodes well for gcj running both shortly.

David

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



RE: How to run servlet for every 30 minutes in Tomcat 4.1.30

2004-12-21 Thread Allistair Crossley
myself and ben have suggested the most appropriate methods for doing this. Ben 
mentions WGET http://www.gnu.org/software/wget/wget.html which can be added to 
a *basic* script hooked up to a cron with an interval of whatever you like.

you really ought to get rid of threads and thread sleeps inside web application 
code.

Allistair.

> -Original Message-
> From: Jorge Sopena [mailto:[EMAIL PROTECTED]
> Sent: 21 December 2004 17:15
> To: Tomcat Users List
> Subject: Re: How to run servlet for every 30 minutes in Tomcat 4.1.30
> 
> 
> Hi,
> I'm having a similar problem in my application.
> I've got several servlets called by the users. Every requets 
> save some 
> information in DB, that has to be sent to another server 
> later and in a 
> compress format.
> So I need sth similar toShilpa is asking, a process which 
> runs every  X 
> minutes to recover the information and send it to the Server.
> 
> My solution to this problem was to implement a 
> "ServletContextListener" 
> inside Tomcat.
> When Tomcat starts my application the "contextInitialized" method is 
> called, and then a thread is started to do the task explained above.
> I use "Thread.sleep(step)" to wait for the next execution.
> 
> I didn't find anyway to set a timer for a servlet, and I 
> didn't like the 
> option of creating an external script .
> 
> Any other  suggestions to solver this problem?
> 
> Thanks
> 
> Jorge
> 
> 
> Ben Souther wrote:
> 
> >On Tue, 2004-12-21 at 11:28, Allistair Crossley wrote:
> >  
> >
> >>no, and I believe doing so it bad practice. use some OS 
> controlled timer like cron to issue a HTTP call to your 
> servlet. I once wrote a shell script that calls a http 
> address on the local machine but cannot remember how ;) if 
> you are using oracle then you can setup this timer thread 
> inside the database itself. don't add a thread into your web 
> application.
> >>
> >>
> >>
> >
> >I concur. It's certainly possible to write a treaded java object that
> >fires a command every so often but there would be no point in making
> >that object a servlet (servlets exist to answer client requests). 
> >It's also, IMHO, more aggravation than it's worth to manage your own
> >daemon threads in a webapp.
> >
> >It would take all of 2 minutes to write a timer with crontab and wget
> >that could call your servlet whenever you want.
> >
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >  
> >
> 
> 


 
---
QAS Ltd.
Developers of QuickAddress Software
http://www.qas.com";>www.qas.com
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---



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



Re: Difficulty connecting to DB2 for iSeries from Tomcat 5.0.28

2004-12-21 Thread David Uctaa
No matter what i do, the JNDI lookup is returning null.  What causes a
JNDI lookup to return null when the resource is defined in the
 section of server.xml?  Should I put the
resources into  in my context.xml?


On Mon, 20 Dec 2004 13:52:29 -0500, David Uctaa <[EMAIL PROTECTED]> wrote:
> I am running Tomcat 5.0.28 on Win XP SP1.  We have DB2 running on 2
> iSeries servers.  When I attempt to look up a DataSource from JNDI to
> get a connection from it, the JNDI lookup is returning null.
> 
> I am using IBM's JTOpen library for the JDBC drivers, and I am
> attempting to use Tomcat to manage the connection pooling.  I am
> following the instructions I saw listed here:
> http://www.itjungle.com/fhg/fhg060204-story01.html .   I am trying the
> first option, using the Commons DBCP connection pool.
> 
> I have attached copies of my server.xml and the context configuration
> file webappname.xml.  The code I am using to access the data source is
> pretty generic:
> 
> Context initCtx = new InitialContext();
> Context ctx = (Context) initCtx.lookup("java:comp/env");
> DataSource ds = (DataSource) ctx.lookup("jdbc/myFirstDataSource");
> Connection conn = ds.getConnection();
> 
> It turns out the that ctx.lookup call is returning null, as if it
> can't find the JNDI resource, and I can't figure out what I have
> misconfigured.
> 
> Any and all help will be greatly appreciated.
> 
> 
>

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



Re: AW: performance issue with JK und IIS6

2004-12-21 Thread Mladen Turk
Michael Südkamp wrote:
You just must love Microsoft engineers just for that statement.
One has to make something like that, and then dare to say it's
a better product then before :).

I neither love nor hate MS or any other company or product. I was just
looking for a solution to my issue.
Me neither. But they could at least drop a note from that KB into MSDN.

You a using IIS5 compatibility mode correct?

Does compatibility mode mean checking the option "Execute WWW service in
IIS5 isolation mode" in the IIS console?
I tried this option but that changed anything.
Yes. Seems that you'll have to tweak the Registry then.
Let me know if you found a solution, and I'll put it inside the docs.
BTW, I hope we'll have a native IIS6 connector around February
next year.
Mladen.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: How to run servlet for every 30 minutes in Tomcat 4.1.30

2004-12-21 Thread Dennis Payne
Use cron in Unix/Linux or task scheduler in Windows.

>>> [EMAIL PROTECTED] 12-21-2004 08:44 >>>
Hi,
I am using Tomcat4.1.30 version.
I have to develop a client application which looks in the database
every 30
minutes,
to retrieve the status of an order and send the status to the remote
client.
Again waits for the
The client's response and insert the repsonse back to the database.

I wanted to do this in a servlet, so is there any way that i could run
this
servlet automatically inside the
Tomcat container, or is it configurable in servlet mapping? if so can
someone please suggest me with examples...


-
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 to run servlet for every 30 minutes in Tomcat 4.1.30

2004-12-21 Thread Dennis Payne
External scripts really are the best answer for this.  It is not
possible to 'PUSH' information like this without a dedicated client!

>>> [EMAIL PROTECTED] 12-21-2004 10:14 >>>
Hi,
I'm having a similar problem in my application.
I've got several servlets called by the users. Every requets save some

information in DB, that has to be sent to another server later and in a

compress format.
So I need sth similar toShilpa is asking, a process which runs every  X

minutes to recover the information and send it to the Server.

My solution to this problem was to implement a "ServletContextListener"

inside Tomcat.
When Tomcat starts my application the "contextInitialized" method is 
called, and then a thread is started to do the task explained above.
I use "Thread.sleep(step)" to wait for the next execution.

I didn't find anyway to set a timer for a servlet, and I didn't like
the 
option of creating an external script .

Any other  suggestions to solver this problem?

Thanks

Jorge


Ben Souther wrote:

>On Tue, 2004-12-21 at 11:28, Allistair Crossley wrote:
>  
>
>>no, and I believe doing so it bad practice. use some OS controlled
timer like cron to issue a HTTP call to your servlet. I once wrote a
shell script that calls a http address on the local machine but cannot
remember how ;) if you are using oracle then you can setup this timer
thread inside the database itself. don't add a thread into your web
application.
>>
>>
>>
>
>I concur. It's certainly possible to write a treaded java object that
>fires a command every so often but there would be no point in making
>that object a servlet (servlets exist to answer client requests). 
>It's also, IMHO, more aggravation than it's worth to manage your own
>daemon threads in a webapp.
>
>It would take all of 2 minutes to write a timer with crontab and wget
>that could call your servlet whenever you want.
>
>
>-
>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 to run servlet for every 30 minutes in Tomcat 4.1.30

2004-12-21 Thread Jorge Sopena
Why is bad using own threads inside web application?
Aren't all the servlet request actually a thread in Tomcat?
I can't find a reason why it's so bad solution.
In that way, you manage to have a single and independent application.
Maybe I don't know some thread behaviour in Tomcat...
Jorge.
Allistair Crossley wrote:
myself and ben have suggested the most appropriate methods for doing this. Ben 
mentions WGET http://www.gnu.org/software/wget/wget.html which can be added to 
a *basic* script hooked up to a cron with an interval of whatever you like.
you really ought to get rid of threads and thread sleeps inside web application 
code.
Allistair.
 

-Original Message-
From: Jorge Sopena [mailto:[EMAIL PROTECTED]
Sent: 21 December 2004 17:15
To: Tomcat Users List
Subject: Re: How to run servlet for every 30 minutes in Tomcat 4.1.30
Hi,
I'm having a similar problem in my application.
I've got several servlets called by the users. Every requets 
save some 
information in DB, that has to be sent to another server 
later and in a 
compress format.
So I need sth similar toShilpa is asking, a process which 
runs every  X 
minutes to recover the information and send it to the Server.

My solution to this problem was to implement a 
"ServletContextListener" 
inside Tomcat.
When Tomcat starts my application the "contextInitialized" method is 
called, and then a thread is started to do the task explained above.
I use "Thread.sleep(step)" to wait for the next execution.

I didn't find anyway to set a timer for a servlet, and I 
didn't like the 
option of creating an external script .

Any other  suggestions to solver this problem?
Thanks
Jorge
Ben Souther wrote:
   

On Tue, 2004-12-21 at 11:28, Allistair Crossley wrote:
 

no, and I believe doing so it bad practice. use some OS 
   

controlled timer like cron to issue a HTTP call to your 
servlet. I once wrote a shell script that calls a http 
address on the local machine but cannot remember how ;) if 
you are using oracle then you can setup this timer thread 
inside the database itself. don't add a thread into your web 
application.
   

  

   

I concur. It's certainly possible to write a treaded java object that
fires a command every so often but there would be no point in making
that object a servlet (servlets exist to answer client requests). 
It's also, IMHO, more aggravation than it's worth to manage your own
daemon threads in a webapp.

It would take all of 2 minutes to write a timer with crontab and wget
that could call your servlet whenever you want.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

 

   


 
---
QAS Ltd.
Developers of QuickAddress Software
http://www.qas.com";>www.qas.com
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---


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

--
==
Jorge Sopena Torres
SIDSA
(Semiconductores Investigación y Diseño, S.A.)
Parque Tecnológico de Madrid
c/ Torres Quevedo, nº 1
28760 TRES CANTOS (Madrid) (SPAIN)
Phone : +34 91 803 5052
Fax:+34 91 803 9557
e-mail: [EMAIL PROTECTED]
URL: http://www.sidsa.com
== 



Re: How to run servlet for every 30 minutes in Tomcat 4.1.30

2004-12-21 Thread pandu yelamanchili
I would say it should be avoided at all if possible using threads. Since as 
we know in case of threads, there is not much management you can do. Also in 
my experience i have seen it is very easy for them to get out of control . 
So if there are any other alternatives, They should be explored first before 
threads.

I am not sure if Tomcat supports MBeans, But I remeber in JBOss, you could 
create MBeans and schedule them in the container.

Pandu
From: Jorge Sopena <[EMAIL PROTECTED]>
Reply-To: "Tomcat Users List" <[EMAIL PROTECTED]>
To: Tomcat Users List <[EMAIL PROTECTED]>
Subject: Re: How to run servlet for every 30 minutes in Tomcat 4.1.30
Date: Tue, 21 Dec 2004 18:58:23 +0100
Why is bad using own threads inside web application?
Aren't all the servlet request actually a thread in Tomcat?
I can't find a reason why it's so bad solution.
In that way, you manage to have a single and independent application.
Maybe I don't know some thread behaviour in Tomcat...
Jorge.
Allistair Crossley wrote:
myself and ben have suggested the most appropriate methods for doing this. 
Ben mentions WGET http://www.gnu.org/software/wget/wget.html which can be 
added to a *basic* script hooked up to a cron with an interval of whatever 
you like.

you really ought to get rid of threads and thread sleeps inside web 
application code.

Allistair.

-Original Message-
From: Jorge Sopena [mailto:[EMAIL PROTECTED]
Sent: 21 December 2004 17:15
To: Tomcat Users List
Subject: Re: How to run servlet for every 30 minutes in Tomcat 4.1.30
Hi,
I'm having a similar problem in my application.
I've got several servlets called by the users. Every requets save some 
information in DB, that has to be sent to another server later and in a 
compress format.
So I need sth similar toShilpa is asking, a process which runs every  X 
minutes to recover the information and send it to the Server.

My solution to this problem was to implement a "ServletContextListener" 
inside Tomcat.
When Tomcat starts my application the "contextInitialized" method is 
called, and then a thread is started to do the task explained above.
I use "Thread.sleep(step)" to wait for the next execution.

I didn't find anyway to set a timer for a servlet, and I didn't like the 
option of creating an external script .

Any other  suggestions to solver this problem?
Thanks
Jorge
Ben Souther wrote:

On Tue, 2004-12-21 at 11:28, Allistair Crossley wrote:


no, and I believe doing so it bad practice. use some OS
controlled timer like cron to issue a HTTP call to your servlet. I once 
wrote a shell script that calls a http address on the local machine but 
cannot remember how ;) if you are using oracle then you can setup this 
timer thread inside the database itself. don't add a thread into your web 
application.




I concur. It's certainly possible to write a treaded java object that
fires a command every so often but there would be no point in making
that object a servlet (servlets exist to answer client requests). It's 
also, IMHO, more aggravation than it's worth to manage your own
daemon threads in a webapp.

It would take all of 2 minutes to write a timer with crontab and wget
that could call your servlet whenever you want.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





 
---
QAS Ltd.
Developers of QuickAddress Software
http://www.qas.com";>www.qas.com
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---


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


--
==
Jorge Sopena Torres
SIDSA
(Semiconductores Investigación y Diseño, S.A.)
Parque Tecnológico de Madrid
c/ Torres Quevedo, nº 1
28760 TRES CANTOS (Madrid) (SPAIN)
Phone : +34 91 803 5052
Fax:+34 91 803 9557
e-mail: [EMAIL PROTECTED]
URL: http://www.sidsa.com
==

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


RE: How to run servlet for every 30 minutes in Tomcat 4.1.30

2004-12-21 Thread Fredrik Liden
Check out QuartzScheduler from Open Symphony it's easy to configure within 
Tomcat.

Fredrik 

-Original Message-
From: pandu yelamanchili [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 21, 2004 9:58 AM
To: [EMAIL PROTECTED]
Subject: Re: How to run servlet for every 30 minutes in Tomcat 4.1.30


I would say it should be avoided at all if possible using threads. Since as 
we know in case of threads, there is not much management you can do. Also in 
my experience i have seen it is very easy for them to get out of control . 
So if there are any other alternatives, They should be explored first before 
threads.

I am not sure if Tomcat supports MBeans, But I remeber in JBOss, you could 
create MBeans and schedule them in the container.

Pandu

>From: Jorge Sopena <[EMAIL PROTECTED]>
>Reply-To: "Tomcat Users List" <[EMAIL PROTECTED]>
>To: Tomcat Users List <[EMAIL PROTECTED]>
>Subject: Re: How to run servlet for every 30 minutes in Tomcat 4.1.30
>Date: Tue, 21 Dec 2004 18:58:23 +0100
>
>Why is bad using own threads inside web application?
>Aren't all the servlet request actually a thread in Tomcat?
>I can't find a reason why it's so bad solution.
>In that way, you manage to have a single and independent application.
>
>Maybe I don't know some thread behaviour in Tomcat...
>
>Jorge.
>
>
>Allistair Crossley wrote:
>
>>myself and ben have suggested the most appropriate methods for doing 
>>this.
>>Ben mentions WGET http://www.gnu.org/software/wget/wget.html which can be 
>>added to a *basic* script hooked up to a cron with an interval of whatever 
>>you like.
>>
>>you really ought to get rid of threads and thread sleeps inside web
>>application code.
>>
>>Allistair.
>>
>>
>>
>>>-Original Message-
>>>From: Jorge Sopena [mailto:[EMAIL PROTECTED]
>>>Sent: 21 December 2004 17:15
>>>To: Tomcat Users List
>>>Subject: Re: How to run servlet for every 30 minutes in Tomcat 4.1.30
>>>
>>>
>>>Hi,
>>>I'm having a similar problem in my application.
>>>I've got several servlets called by the users. Every requets save 
>>>some
>>>information in DB, that has to be sent to another server later and in a 
>>>compress format.
>>>So I need sth similar toShilpa is asking, a process which runs every  X 
>>>minutes to recover the information and send it to the Server.
>>>
>>>My solution to this problem was to implement a 
>>>"ServletContextListener"
>>>inside Tomcat.
>>>When Tomcat starts my application the "contextInitialized" method is 
>>>called, and then a thread is started to do the task explained above.
>>>I use "Thread.sleep(step)" to wait for the next execution.
>>>
>>>I didn't find anyway to set a timer for a servlet, and I didn't like 
>>>the
>>>option of creating an external script .
>>>
>>>Any other  suggestions to solver this problem?
>>>
>>>Thanks
>>>
>>>Jorge
>>>
>>>
>>>Ben Souther wrote:
>>>
>>>
>>>
On Tue, 2004-12-21 at 11:28, Allistair Crossley wrote:




>no, and I believe doing so it bad practice. use some OS
>
>>>controlled timer like cron to issue a HTTP call to your servlet. I 
>>>once
>>>wrote a shell script that calls a http address on the local machine but 
>>>cannot remember how ;) if you are using oracle then you can setup this 
>>>timer thread inside the database itself. don't add a thread into your web 
>>>application.
>>>
>>>
>
>
>
>
I concur. It's certainly possible to write a treaded java object 
that fires a command every so often but there would be no point in 
making that object a servlet (servlets exist to answer client 
requests). It's also, IMHO, more aggravation than it's worth to 
manage your own daemon threads in a webapp.

It would take all of 2 minutes to write a timer with crontab and 
wget that could call your servlet whenever you want.



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






>>>
>>>
>>
>>
>>
>>---
>>QAS Ltd.
>>Developers of QuickAddress Software
>>http://www.qas.com";>www.qas.com
>>Registered in England: No 2582055
>>Registered in Australia: No 082 851 474
>>---
>>
>>
>>
>>-
>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>
>>
>
>-- ==
>Jorge Sopena Torres
>SIDSA
>(Semiconductores Investigación y Diseño, S.A.)
>
>Parque Tecnológico de Madrid
>c/ Torres Quevedo, nº 1
>28760 TRES CANTOS (Madrid) (SPAIN)
>
>Phone : +34 91 803 5052
>Fax:+34 91 803 9557
>
>e-mail: [EMAIL PROTECTED]
>URL: http://www.sidsa.com
>
>==
>



--

RE: How to run servlet for every 30 minutes in Tomcat 4.1.30

2004-12-21 Thread Jiang, Peiyun
You may user a scheduler to schedule your tasks to run every 30 minutes. 

http://www.theserverside.com/blogs/printfriendly.tss?id=QuartzSchedulerInJ2E
E
http://www.quartzscheduler.org/quartz/. 

Peiyun

-Original Message-
From: Wade Chandler [mailto:[EMAIL PROTECTED]
Sent: December 21, 2004 11:03 AM
To: Tomcat Users List
Subject: Re: How to run servlet for every 30 minutes in Tomcat 4.1.30


Shilpa Nalgonda wrote:
> Hi,
> I am using Tomcat4.1.30 version.
> I have to develop a client application which looks in the database every
30
> minutes,
> to retrieve the status of an order and send the status to the remote
client.
> Again waits for the
> The client's response and insert the repsonse back to the database.
> 
> I wanted to do this in a servlet, so is there any way that i could run
this
> servlet automatically inside the
> Tomcat container, or is it configurable in servlet mapping? if so can
> someone please suggest me with examples...
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

Wellit's kind of not extremely clear what you are asking, but why 
does the servlet need to do anything except listen for a client which is 
threaded to do this every 30 minutes, in other words...why not have the 
servlet do what it naturally does...sit there and get hit by client 
requestsget the infoand send it back?  I mean...the servlet 
can't push to the client unless you want to use something besides http, 
or unless you are using servlets on both ends and http servers on both 
ends.  You could use keep alives I guess.I wouldn't thoughonly 
so many tcp/ip connections.

Wade


-
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: Difficulty connecting to DB2 for iSeries from Tomcat 5.0.28

2004-12-21 Thread Phillip Qin
What is the resourcelink in your context.xml?


-Original Message-
From: David Uctaa [mailto:[EMAIL PROTECTED] 
Sent: December 21, 2004 12:27 PM
To: [EMAIL PROTECTED]
Subject: Re: Difficulty connecting to DB2 for iSeries from Tomcat 5.0.28


No matter what i do, the JNDI lookup is returning null.  What causes a JNDI
lookup to return null when the resource is defined in the
 section of server.xml?  Should I put the resources
into  in my context.xml?


On Mon, 20 Dec 2004 13:52:29 -0500, David Uctaa <[EMAIL PROTECTED]> wrote:
> I am running Tomcat 5.0.28 on Win XP SP1.  We have DB2 running on 2 
> iSeries servers.  When I attempt to look up a DataSource from JNDI to 
> get a connection from it, the JNDI lookup is returning null.
> 
> I am using IBM's JTOpen library for the JDBC drivers, and I am 
> attempting to use Tomcat to manage the connection pooling.  I am 
> following the instructions I saw listed here:
> http://www.itjungle.com/fhg/fhg060204-story01.html .   I am trying the
> first option, using the Commons DBCP connection pool.
> 
> I have attached copies of my server.xml and the context configuration 
> file webappname.xml.  The code I am using to access the data source is 
> pretty generic:
> 
> Context initCtx = new InitialContext();
> Context ctx = (Context) initCtx.lookup("java:comp/env"); DataSource ds 
> = (DataSource) ctx.lookup("jdbc/myFirstDataSource");
> Connection conn = ds.getConnection();
> 
> It turns out the that ctx.lookup call is returning null, as if it 
> can't find the JNDI resource, and I can't figure out what I have 
> misconfigured.
> 
> Any and all help will be greatly appreciated.
> 
> 
>

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


!DSPAM:41c85cd9295551913319955!


Re: Difficulty connecting to DB2 for iSeries from Tomcat 5.0.28

2004-12-21 Thread David Uctaa
If the name of the global resource in server.xml is defined as

   
   
 ...
   



then the resourcelink in context.xml is





(not sure if listing the exact datasource specification would be a
security breach, so I'm munging the actual datasource name, but
everything else is the same, including upper/lower case)


On Tue, 21 Dec 2004 13:39:07 -0500, Phillip Qin
<[EMAIL PROTECTED]> wrote:
> What is the resourcelink in your context.xml?
> 
> 
> -Original Message-
> From: David Uctaa [mailto:[EMAIL PROTECTED]
> Sent: December 21, 2004 12:27 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Difficulty connecting to DB2 for iSeries from Tomcat 5.0.28
> 
> No matter what i do, the JNDI lookup is returning null.  What causes a JNDI
> lookup to return null when the resource is defined in the
>  section of server.xml?  Should I put the resources
> into  in my context.xml?
> 
> On Mon, 20 Dec 2004 13:52:29 -0500, David Uctaa <[EMAIL PROTECTED]> wrote:
> > I am running Tomcat 5.0.28 on Win XP SP1.  We have DB2 running on 2
> > iSeries servers.  When I attempt to look up a DataSource from JNDI to
> > get a connection from it, the JNDI lookup is returning null.
> >
> > I am using IBM's JTOpen library for the JDBC drivers, and I am
> > attempting to use Tomcat to manage the connection pooling.  I am
> > following the instructions I saw listed here:
> > http://www.itjungle.com/fhg/fhg060204-story01.html .   I am trying the
> > first option, using the Commons DBCP connection pool.
> >
> > I have attached copies of my server.xml and the context configuration
> > file webappname.xml.  The code I am using to access the data source is
> > pretty generic:
> >
> > Context initCtx = new InitialContext();
> > Context ctx = (Context) initCtx.lookup("java:comp/env"); DataSource ds
> > = (DataSource) ctx.lookup("jdbc/myFirstDataSource");
> > Connection conn = ds.getConnection();
> >
> > It turns out the that ctx.lookup call is returning null, as if it
> > can't find the JNDI resource, and I can't figure out what I have
> > misconfigured.
> >
> > Any and all help will be greatly appreciated.
> >
> >
> >
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> !DSPAM:41c85cd9295551913319955!
> 
>

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



Re: HTTP Status 404 - /admin && HTTP Status 404 - /manager/html

2004-12-21 Thread Dwayne Ghant
I know that someone ran into this before.
I assume that most of this list thinks this questions is
stupid and you are probably correct; so please accept my
apologeis.
But that doesn't stop me from needing assistance.
Thank you for your time.
Dwayne Ghant wrote:
Configured tomcat.5.0.27/apache2.x/mod_jk2.so
After configuration my "admin" and "manager" application
stoped working.

--
Dwayne A. Ghant
Application Developer
Temple University
215.204.
[EMAIL PROTECTED]

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


Gurus! JCE and classloader question

2004-12-21 Thread Lionel Pasquier
Hello again!
Any guru around to solve my problem please? :-)
Lionel Pasquier wrote:
Hello,
I have a trouble with using a JCE and multiple contexts. From what I 
could have read around here this is probably linked to a classloader 
problem. Could you guys help?

Basicaly, I generate a RSA Keypair, then create a certificate and want 
to self sign it. Finally i need to store the private key to create a 
p12. Here is the code: I am using the IAIK JCE.

KeyPair keyPair;
IAIK IAIKprovider = new IAIK();
Security.insertProviderAt(IAIKprovider, 2);
KeyPairGenerator keyPairGenerator = 
KeyPairGenerator.getInstance("RSA", IAIKprovider.getName());
keyPairGenerator.initialize(keySize);
keyPair = keyPairGenerator.generateKeyPair();
X509Certificate cert;
[...]
cert.sign( AlgorithmID.sha1WithRSAEncryption ,keyPair.getPrivate(), 
IAIKprovider.getName());
if(!RSAPrivateKey.class.isAssignableFrom(keyPair.getPrivate().getClass())){ 

   error("Generated RSA private key is not of type RSA!");
}
KeyBag keybag = new KeyBag((RSAPrivateKey) keyPair.getPrivate(), 
certLabel, certLabel.getBytes());

The problem is that if I have more than one tomcat context using the 
same pice of code, the 2nd context to use it triggers the "if" (that 
is, without it I get a ClassCastException). Meaning that the generated 
private key is not compatible with RSAPrivateKey, while I asked for a 
"RSA" key.

I also have the same problem with the other way around:
CertificateFactory certFactory = 
CertificateFactory.getInstance("X.509", "IAIK");
Collection certCollection = certFactory.generateCertificates(new 
ByteArrayInputStream(  certChainBlob.getDatabinary() ));
cert = (X509Certificate)certChain.get(0); //where X509Certificate 
being iaik.x509.X509Certificate)
gets a ClassCastException if being the second context to call this code.

Oh, one more important thing: I add the security provider dynamicaly 
with a:
Security.insertProviderAt(new IAIK(), 2);

Could someone help me on this?
Thank you,
Lionel
-
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]


Memory Leak with Javac and Tomcat v. 4.0.28

2004-12-21 Thread Dakota Jack
I was going to update my Tomcat from 4.0.19 because it says there is a
javac leak in the RELEASE-NOTES.  However, I noticed that 4.0.28 says
the same thing.  Is it fixed/

Jack


-- 
"You can lead a horse to water but you cannot make it float on its back."

~Dakota Jack~

"You can't wake a person who is pretending to be asleep."

~Native Proverb~

"Each man is good in His sight. It is not necessary for eagles to be crows."

~Hunkesni (Sitting Bull), Hunkpapa Sioux~

---

"This message may contain confidential and/or privileged information.
If you are not the addressee or authorized to receive this for the
addressee, you must not use, copy, disclose, or take any action based
on this message or any information herein. If you have received this
message in error, please advise the sender immediately by reply e-mail
and delete this message. Thank you for your cooperation."

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



Re: Memory Leak with Javac and Tomcat v. 4.0.28

2004-12-21 Thread Christoph Kutzinski
Dakota Jack wrote:
I was going to update my Tomcat from 4.0.19 because it says there is a
javac leak in the RELEASE-NOTES.  However, I noticed that 4.0.28 says
the same thing.  Is it fixed/
Jack

AFAIK this is no Tomcat issue but a JDK/Javac issue which was fixed in 
Sun JDK 1.4.
See:
http://www.apache.de/dist/jakarta/tomcat-5/v5.0.29/RELEASE-NOTES

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


RE: Memory Leak with Javac and Tomcat v. 4.0.28

2004-12-21 Thread Caldarale, Charles R
> From: Dakota Jack [mailto:[EMAIL PROTECTED]
> Subject: Memory Leak with Javac and Tomcat v. 4.0.28
> 
> I was going to update my Tomcat from 4.0.19 because it says there is a
> javac leak in the RELEASE-NOTES.  However, I noticed that 4.0.28 says
> the same thing.  Is it fixed/

The memory leak is in the JDK, not Tomcat itself.  If you use 1.4.2 or above 
the javac memory leak won't be a problem.

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



Re: [OT] Request an app test (free beer!)

2004-12-21 Thread Pop Qvarnström
SuSE 8.2: Linux
Mandrake 10: Linux
Mandrake 10.1: Linux
Mandrake 8.0: Linux

>
>Sent: Monday, December 20, 2004 2:26 PM
>To: Commons User; Struts User; Tomcat User
>Subject: [OT] Request an app test (free beer!)
>
>
>I was informed last OT post I made that the subject should always 
>include the word "beer".  I added the "free" to get your attention :)
>
>I'm working on something for which I need to know what the os.name 
>property on various OS's is.  I would greatly appreciate it if some 
>folks could try the following:
>
>public class test {
>public static void main(String[] args) {
>System.out.println(System.getProperty("os.name"));
>}
>}
>
>I'm particularly interested in various *nix variants, Linux, Mac and 
>such.  Windows I already have answers for (although some verification to
>
>be sure nothing fishy is going on wouldn't hurt).
>
>If you could just post your OS and what the result was, I would greatly 
>appreciate it.  Thanks in advance!
>

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



RE: Difficulty connecting to DB2 for iSeries from Tomcat 5.0.28

2004-12-21 Thread Phillip Qin
I assume you have something like this in your server.xml

 

Is there any warning or exception in catalina.out or any other log files?

-Original Message-
From: David Uctaa [mailto:[EMAIL PROTECTED] 
Sent: December 21, 2004 1:52 PM
To: Tomcat Users List
Subject: Re: Difficulty connecting to DB2 for iSeries from Tomcat 5.0.28


If the name of the global resource in server.xml is defined as

   
   
 ...
   



then the resourcelink in context.xml is





(not sure if listing the exact datasource specification would be a security
breach, so I'm munging the actual datasource name, but everything else is
the same, including upper/lower case)


On Tue, 21 Dec 2004 13:39:07 -0500, Phillip Qin <[EMAIL PROTECTED]>
wrote:
> What is the resourcelink in your context.xml?
> 
> 
> -Original Message-
> From: David Uctaa [mailto:[EMAIL PROTECTED]
> Sent: December 21, 2004 12:27 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Difficulty connecting to DB2 for iSeries from Tomcat 
> 5.0.28
> 
> No matter what i do, the JNDI lookup is returning null.  What causes a 
> JNDI lookup to return null when the resource is defined in the 
>  section of server.xml?  Should I put the 
> resources into  in my context.xml?
> 
> On Mon, 20 Dec 2004 13:52:29 -0500, David Uctaa <[EMAIL PROTECTED]> 
> wrote:
> > I am running Tomcat 5.0.28 on Win XP SP1.  We have DB2 running on 2 
> > iSeries servers.  When I attempt to look up a DataSource from JNDI 
> > to get a connection from it, the JNDI lookup is returning null.
> >
> > I am using IBM's JTOpen library for the JDBC drivers, and I am 
> > attempting to use Tomcat to manage the connection pooling.  I am 
> > following the instructions I saw listed here:
> > http://www.itjungle.com/fhg/fhg060204-story01.html .   I am trying the
> > first option, using the Commons DBCP connection pool.
> >
> > I have attached copies of my server.xml and the context 
> > configuration file webappname.xml.  The code I am using to access 
> > the data source is pretty generic:
> >
> > Context initCtx = new InitialContext();
> > Context ctx = (Context) initCtx.lookup("java:comp/env"); DataSource 
> > ds = (DataSource) ctx.lookup("jdbc/myFirstDataSource");
> > Connection conn = ds.getConnection();
> >
> > It turns out the that ctx.lookup call is returning null, as if it 
> > can't find the JNDI resource, and I can't figure out what I have 
> > misconfigured.
> >
> > Any and all help will be greatly appreciated.
> >
> >
> >
> 
> -
> 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]


!DSPAM:41c870c3302641030564044!


RE: How to run servlet for every 30 minutes in Tomcat 4.1.30

2004-12-21 Thread Jiang, Peiyun
You may use a scheduler to schedule your tasks to run every 30 minutes. 

http://www.theserverside.com/blogs/printfriendly.tss?id=QuartzSchedulerInJ2E
E
http://www.quartzscheduler.org/quartz/. 

Peiyun

-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: December 21, 2004 11:41 AM
To: Tomcat Users List; Billy Talton
Subject: RE: How to run servlet for every 30 minutes in Tomcat 4.1.30


My application has to use the connection pooling of Tomcat to talk to the
database...
and all my Database access classes are deployed om Tomcat...so if i just
write a java standalone command line program,
can i access those connection pooling classes...

-Original Message-
From: Billy Talton [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 21, 2004 11:41 AM
To: Tomcat Users List
Subject: Re: How to run servlet for every 30 minutes in Tomcat 4.1.30


Why are you writing a servlet for this?  If the application does not
use any of the services confined to the Servlet API and Tomcat, just
write a stand-alone application and setup up a cron job to run it.
Seems like overkill to me.


On Tue, 21 Dec 2004 16:28:49 -, Allistair Crossley
<[EMAIL PROTECTED]> wrote:
> no, and I believe doing so it bad practice. use some OS controlled timer
like cron to issue a HTTP call to your servlet. I once wrote a shell script
that calls a http address on the local machine but cannot remember how ;) if
you are using oracle then you can setup this timer thread inside the
database itself. don't add a thread into your web application.
>
> > -Original Message-
> > From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
> > Sent: 21 December 2004 16:14
> > To: Tomcat Users List
> > Subject: RE: How to run servlet for every 30 minutes in Tomcat 4.1.30
> >
> >
> > Thanks for the reply...
> >
> > The application which i am trying to write is a standalone
> > utility.. Client
> > does not hit this servlet.
> >
> > Instead my application which is a servlet, will make some
> > database calls--
> > and if the required data is present in the database, then
> > that data is sent
> > to the client via xmlrpc call and the response from the xmlrpc call is
> > updated back into the dataabse.
> >
> > So we want this utility preferably servlet in our Tomcat
> > container to be run
> > every 30 minutes like a cron job, to do the database updates..
> >
> > There are so many other classes deployed on Tomcat and i want
> > to use those
> > classes to write this servlet utility.
> > This is the reason why chose to use servlet, but is there any
> > configurable
> > parameter to run servlet for every 30 minutes...
> >
> > -Original Message-
> > From: Wade Chandler [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, December 21, 2004 11:03 AM
> > To: Tomcat Users List
> > Subject: Re: How to run servlet for every 30 minutes in Tomcat 4.1.30
> >
> >
> > Shilpa Nalgonda wrote:
> > > Hi,
> > > I am using Tomcat4.1.30 version.
> > > I have to develop a client application which looks in the
> > database every
> > 30
> > > minutes,
> > > to retrieve the status of an order and send the status to the remote
> > client.
> > > Again waits for the
> > > The client's response and insert the repsonse back to the database.
> > >
> > > I wanted to do this in a servlet, so is there any way that
> > i could run
> > this
> > > servlet automatically inside the
> > > Tomcat container, or is it configurable in servlet mapping?
> > if so can
> > > someone please suggest me with examples...
> > >
> > >
> > >
> > -
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> > >
> >
> > Wellit's kind of not extremely clear what you are asking, but why
> > does the servlet need to do anything except listen for a
> > client which is
> > threaded to do this every 30 minutes, in other words...why
> > not have the
> > servlet do what it naturally does...sit there and get hit by client
> > requestsget the infoand send it back?  I mean...the servlet
> > can't push to the client unless you want to use something
> > besides http,
> > or unless you are using servlets on both ends and http servers on both
> > ends.  You could use keep alives I guess.I wouldn't thoughonly
> > so many tcp/ip connections.
> >
> > Wade
> >
> >
> > -
> > 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]
> >
> >
>
> 
> ---
> QAS Ltd.
> Developers of QuickAddress Software
> http://www.qas.com";>www.qas.com
> Registered in England: No 2582055
> Registered in Australia: No 082 851 474
> ---

Re: Difficulty connecting to DB2 for iSeries from Tomcat 5.0.28

2004-12-21 Thread David Uctaa



On Tue, 21 Dec 2004 15:02:58 -0500, Phillip Qin
<[EMAIL PROTECTED]> wrote:
> I assume you have something like this in your server.xml
> 
>  type="javax.sql.DataSource" />
> 
> Is there any warning or exception in catalina.out or any other log files?
> 
> -Original Message-
> From: David Uctaa [mailto:[EMAIL PROTECTED]
> Sent: December 21, 2004 1:52 PM
> To: Tomcat Users List
> Subject: Re: Difficulty connecting to DB2 for iSeries from Tomcat 5.0.28
> 
> If the name of the global resource in server.xml is defined as
> 
>
>
>  ...
>
> 
> 
> then the resourcelink in context.xml is
> 
> 
>  global="jdbc/MYDATASOURCE"
> name="jdbc/MYDATASOURCE"
> type="javax.sql.DataSource"/>
> 
> 
> (not sure if listing the exact datasource specification would be a security
> breach, so I'm munging the actual datasource name, but everything else is
> the same, including upper/lower case)
> 
> On Tue, 21 Dec 2004 13:39:07 -0500, Phillip Qin <[EMAIL PROTECTED]>
> wrote:
> > What is the resourcelink in your context.xml?
> >
> >
> > -Original Message-
> > From: David Uctaa [mailto:[EMAIL PROTECTED]
> > Sent: December 21, 2004 12:27 PM
> > To: [EMAIL PROTECTED]
> > Subject: Re: Difficulty connecting to DB2 for iSeries from Tomcat
> > 5.0.28
> >
> > No matter what i do, the JNDI lookup is returning null.  What causes a
> > JNDI lookup to return null when the resource is defined in the
> >  section of server.xml?  Should I put the
> > resources into  in my context.xml?
> >
> > On Mon, 20 Dec 2004 13:52:29 -0500, David Uctaa <[EMAIL PROTECTED]>
> > wrote:
> > > I am running Tomcat 5.0.28 on Win XP SP1.  We have DB2 running on 2
> > > iSeries servers.  When I attempt to look up a DataSource from JNDI
> > > to get a connection from it, the JNDI lookup is returning null.
> > >
> > > I am using IBM's JTOpen library for the JDBC drivers, and I am
> > > attempting to use Tomcat to manage the connection pooling.  I am
> > > following the instructions I saw listed here:
> > > http://www.itjungle.com/fhg/fhg060204-story01.html .   I am trying the
> > > first option, using the Commons DBCP connection pool.
> > >
> > > I have attached copies of my server.xml and the context
> > > configuration file webappname.xml.  The code I am using to access
> > > the data source is pretty generic:
> > >
> > > Context initCtx = new InitialContext();
> > > Context ctx = (Context) initCtx.lookup("java:comp/env"); DataSource
> > > ds = (DataSource) ctx.lookup("jdbc/myFirstDataSource");
> > > Connection conn = ds.getConnection();
> > >
> > > It turns out the that ctx.lookup call is returning null, as if it
> > > can't find the JNDI resource, and I can't figure out what I have
> > > misconfigured.
> > >
> > > Any and all help will be greatly appreciated.
> > >
> > >
> > >
> >
> > -
> > 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]
> 
> 
> !DSPAM:41c870c3302641030564044!
> 
>

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



Re: Why is tomcat (java) so memory intensive?

2004-12-21 Thread Wade Chandler
Dakota Jack wrote:
Why, then, does the Tomcat 5.0 say in the RELEASE-NOTES "JAVAC leaking
memory" is an issue?
On Tue, 21 Dec 2004 16:06:13 -, Allistair Crossley
<[EMAIL PROTECTED]> wrote:
i think (from memory) it had to do with registering requests with jk. anyway, 
like i say, upgrade and you'll see that leak go away i am pretty sure.

-Original Message-
From: Allistair Crossley
Sent: 21 December 2004 16:00
To: Tomcat Users List; [EMAIL PROTECTED]
Subject: RE: Why is tomcat (java) so memory intensive?
you are right, tomcat 5.0.19 did have a memory leak. some
dispute it, but it is there, i had it also and used a
profiler to show it. you should upgrade to 5.0.28.


Thanks,
Jack
That's during compilation.  I always setup tomcat to fork when compiling 
jsp.  That means it runs a seperate process to compile pages.  I do this 
in both production and testing.  I just like the feeling it gives me :-P 
...  well it's just better to not worry about it for me.  The bug is 
supposed to be gone in 1.4.2, but I still fork.

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


RE: How to run servlet for every 30 minutes in Tomcat 4.1.30

2004-12-21 Thread Jiang, Peiyun
You may use a scheduler to schedule your tasks to run every 30 minutes. 

http://www.theserverside.com/blogs/printfriendly.tss?id=QuartzSchedulerInJ2E
E
http://www.quartzscheduler.org/quartz/. 

Peiyun

-Original Message-
From: Allistair Crossley [mailto:[EMAIL PROTECTED]
Sent: December 21, 2004 12:21 PM
To: Tomcat Users List
Subject: RE: How to run servlet for every 30 minutes in Tomcat 4.1.30


myself and ben have suggested the most appropriate methods for doing this.
Ben mentions WGET http://www.gnu.org/software/wget/wget.html which can be
added to a *basic* script hooked up to a cron with an interval of whatever
you like.

you really ought to get rid of threads and thread sleeps inside web
application code.

Allistair.

> -Original Message-
> From: Jorge Sopena [mailto:[EMAIL PROTECTED]
> Sent: 21 December 2004 17:15
> To: Tomcat Users List
> Subject: Re: How to run servlet for every 30 minutes in Tomcat 4.1.30
> 
> 
> Hi,
> I'm having a similar problem in my application.
> I've got several servlets called by the users. Every requets 
> save some 
> information in DB, that has to be sent to another server 
> later and in a 
> compress format.
> So I need sth similar toShilpa is asking, a process which 
> runs every  X 
> minutes to recover the information and send it to the Server.
> 
> My solution to this problem was to implement a 
> "ServletContextListener" 
> inside Tomcat.
> When Tomcat starts my application the "contextInitialized" method is 
> called, and then a thread is started to do the task explained above.
> I use "Thread.sleep(step)" to wait for the next execution.
> 
> I didn't find anyway to set a timer for a servlet, and I 
> didn't like the 
> option of creating an external script .
> 
> Any other  suggestions to solver this problem?
> 
> Thanks
> 
> Jorge
> 
> 
> Ben Souther wrote:
> 
> >On Tue, 2004-12-21 at 11:28, Allistair Crossley wrote:
> >  
> >
> >>no, and I believe doing so it bad practice. use some OS 
> controlled timer like cron to issue a HTTP call to your 
> servlet. I once wrote a shell script that calls a http 
> address on the local machine but cannot remember how ;) if 
> you are using oracle then you can setup this timer thread 
> inside the database itself. don't add a thread into your web 
> application.
> >>
> >>
> >>
> >
> >I concur. It's certainly possible to write a treaded java object that
> >fires a command every so often but there would be no point in making
> >that object a servlet (servlets exist to answer client requests). 
> >It's also, IMHO, more aggravation than it's worth to manage your own
> >daemon threads in a webapp.
> >
> >It would take all of 2 minutes to write a timer with crontab and wget
> >that could call your servlet whenever you want.
> >
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >  
> >
> 
> 


 
---
QAS Ltd.
Developers of QuickAddress Software
http://www.qas.com";>www.qas.com
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---



-
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: Difficulty connecting to DB2 for iSeries from Tomcat 5.0.28

2004-12-21 Thread Phillip Qin
Can you try javax.sql.DataSource in ? You use javax.sql.DataSource
in resourcelink then the type in resource has to be the same.

-Original Message-
From: David Uctaa [mailto:[EMAIL PROTECTED] 
Sent: December 21, 2004 3:26 PM
To: Tomcat Users List
Subject: Re: Difficulty connecting to DB2 for iSeries from Tomcat 5.0.28





On Tue, 21 Dec 2004 15:02:58 -0500, Phillip Qin <[EMAIL PROTECTED]>
wrote:
> I assume you have something like this in your server.xml
> 
>  type="javax.sql.DataSource" />
> 
> Is there any warning or exception in catalina.out or any other log 
> files?
> 
> -Original Message-
> From: David Uctaa [mailto:[EMAIL PROTECTED]
> Sent: December 21, 2004 1:52 PM
> To: Tomcat Users List
> Subject: Re: Difficulty connecting to DB2 for iSeries from Tomcat 
> 5.0.28
> 
> If the name of the global resource in server.xml is defined as 
> 
>
>
>  ...
>
> 
> 
> then the resourcelink in context.xml is
> 
> 
>  global="jdbc/MYDATASOURCE"
> name="jdbc/MYDATASOURCE"
> type="javax.sql.DataSource"/>
> 
> 
> (not sure if listing the exact datasource specification would be a 
> security breach, so I'm munging the actual datasource name, but 
> everything else is the same, including upper/lower case)
> 
> On Tue, 21 Dec 2004 13:39:07 -0500, Phillip Qin 
> <[EMAIL PROTECTED]>
> wrote:
> > What is the resourcelink in your context.xml?
> >
> >
> > -Original Message-
> > From: David Uctaa [mailto:[EMAIL PROTECTED]
> > Sent: December 21, 2004 12:27 PM
> > To: [EMAIL PROTECTED]
> > Subject: Re: Difficulty connecting to DB2 for iSeries from Tomcat 
> > 5.0.28
> >
> > No matter what i do, the JNDI lookup is returning null.  What causes 
> > a JNDI lookup to return null when the resource is defined in the 
> >  section of server.xml?  Should I put the 
> > resources into  in my context.xml?
> >
> > On Mon, 20 Dec 2004 13:52:29 -0500, David Uctaa <[EMAIL PROTECTED]>
> > wrote:
> > > I am running Tomcat 5.0.28 on Win XP SP1.  We have DB2 running on 
> > > 2 iSeries servers.  When I attempt to look up a DataSource from 
> > > JNDI to get a connection from it, the JNDI lookup is returning 
> > > null.
> > >
> > > I am using IBM's JTOpen library for the JDBC drivers, and I am 
> > > attempting to use Tomcat to manage the connection pooling.  I am 
> > > following the instructions I saw listed here:
> > > http://www.itjungle.com/fhg/fhg060204-story01.html .   I am trying the
> > > first option, using the Commons DBCP connection pool.
> > >
> > > I have attached copies of my server.xml and the context 
> > > configuration file webappname.xml.  The code I am using to access 
> > > the data source is pretty generic:
> > >
> > > Context initCtx = new InitialContext();
> > > Context ctx = (Context) initCtx.lookup("java:comp/env"); 
> > > DataSource ds = (DataSource) ctx.lookup("jdbc/myFirstDataSource");
> > > Connection conn = ds.getConnection();
> > >
> > > It turns out the that ctx.lookup call is returning null, as if it 
> > > can't find the JNDI resource, and I can't figure out what I have 
> > > misconfigured.
> > >
> > > Any and all help will be greatly appreciated.
> > >
> > >
> > >
> >
> > 
> > -
> > 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]


!DSPAM:41c886e8314441869949623!


Definitive os.name list (was Re: [OT] Request an app test (free beer!))

2004-12-21 Thread Shankar Unni
Frank W. Zammetti wrote:
I'm working on something for which I need to know what the os.name 
property on various OS's is.  
FAQ. See http://www.tolstoy.com/samizdat/sysprops.html.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Difficulty connecting to DB2 for iSeries from Tomcat 5.0.28

2004-12-21 Thread David Uctaa
Looks like that worked! Many thanks!  :)

Now my question is, since I'm using javax.sql.DataSource as the
ResourceType, how do I know if I'm using the connection pool or
opening a new connection each time I request a connection?

The factory associated with the resource is
org.apache.commons.dbcp.BasicDataSourceFactory

Does this factory provide connection pooling?  If not, how do I change
the implementation to use pooling?  Once I'm using pooling, how do I
find out how many connections are in use?  How do I find out if a
connetion I am about to get will come from the pool or if a new
connection is being created?  Etc.  Is there a page somewhere that
references this information?

Thanks again.


On Tue, 21 Dec 2004 16:03:42 -0500, Phillip Qin
<[EMAIL PROTECTED]> wrote:
> Can you try javax.sql.DataSource in ? You use javax.sql.DataSource
> in resourcelink then the type in resource has to be the same.
> 
> -Original Message-
> From: David Uctaa [mailto:[EMAIL PROTECTED]
> Sent: December 21, 2004 3:26 PM
> To: Tomcat Users List
> Subject: Re: Difficulty connecting to DB2 for iSeries from Tomcat 5.0.28
> 
>  auth="Container" scope="Shareable" name="jdbc/MYDATASOURCE"/>
> 
> On Tue, 21 Dec 2004 15:02:58 -0500, Phillip Qin <[EMAIL PROTECTED]>
> wrote:
> > I assume you have something like this in your server.xml
> >
> >  > type="javax.sql.DataSource" />
> >
> > Is there any warning or exception in catalina.out or any other log
> > files?
> >
> > -Original Message-
> > From: David Uctaa [mailto:[EMAIL PROTECTED]
> > Sent: December 21, 2004 1:52 PM
> > To: Tomcat Users List
> > Subject: Re: Difficulty connecting to DB2 for iSeries from Tomcat
> > 5.0.28
> >
> > If the name of the global resource in server.xml is defined as
> > 
> >
> >
> >  ...
> >
> > 
> >
> > then the resourcelink in context.xml is
> >
> > 
> >  > global="jdbc/MYDATASOURCE"
> > name="jdbc/MYDATASOURCE"
> > type="javax.sql.DataSource"/>
> > 
> >
> > (not sure if listing the exact datasource specification would be a
> > security breach, so I'm munging the actual datasource name, but
> > everything else is the same, including upper/lower case)
> >
> > On Tue, 21 Dec 2004 13:39:07 -0500, Phillip Qin
> > <[EMAIL PROTECTED]>
> > wrote:
> > > What is the resourcelink in your context.xml?
> > >
> > >
> > > -Original Message-
> > > From: David Uctaa [mailto:[EMAIL PROTECTED]
> > > Sent: December 21, 2004 12:27 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: Re: Difficulty connecting to DB2 for iSeries from Tomcat
> > > 5.0.28
> > >
> > > No matter what i do, the JNDI lookup is returning null.  What causes
> > > a JNDI lookup to return null when the resource is defined in the
> > >  section of server.xml?  Should I put the
> > > resources into  in my context.xml?
> > >
> > > On Mon, 20 Dec 2004 13:52:29 -0500, David Uctaa <[EMAIL PROTECTED]>
> > > wrote:
> > > > I am running Tomcat 5.0.28 on Win XP SP1.  We have DB2 running on
> > > > 2 iSeries servers.  When I attempt to look up a DataSource from
> > > > JNDI to get a connection from it, the JNDI lookup is returning
> > > > null.
> > > >
> > > > I am using IBM's JTOpen library for the JDBC drivers, and I am
> > > > attempting to use Tomcat to manage the connection pooling.  I am
> > > > following the instructions I saw listed here:
> > > > http://www.itjungle.com/fhg/fhg060204-story01.html .   I am trying the
> > > > first option, using the Commons DBCP connection pool.
> > > >
> > > > I have attached copies of my server.xml and the context
> > > > configuration file webappname.xml.  The code I am using to access
> > > > the data source is pretty generic:
> > > >
> > > > Context initCtx = new InitialContext();
> > > > Context ctx = (Context) initCtx.lookup("java:comp/env");
> > > > DataSource ds = (DataSource) ctx.lookup("jdbc/myFirstDataSource");
> > > > Connection conn = ds.getConnection();
> > > >
> > > > It turns out the that ctx.lookup call is returning null, as if it
> > > > can't find the JNDI resource, and I can't figure out what I have
> > > > misconfigured.
> > > >
> > > > Any and all help will be greatly appreciated.
> > > >
> > > >
> > > >
> > >
> > > 
> > > -
> > > 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]
> 
> 
> !DSPAM:41c886e8314441869949623!
> 
>

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

Re: How to run servlet for every 30 minutes in Tomcat 4.1.30

2004-12-21 Thread Jukka Uusisalo
Jorge Sopena wrote:
Why is bad using own threads inside web application?
Aren't all the servlet request actually a thread in Tomcat?
I can't find a reason why it's so bad solution.
I think that comes from J2EE specs. I do not remember is threads just
forbidden but if you follow specs, you do not know and you do not have
to know how application server uses threads and controls thread 
behaviour. If portability is issue for your application, it is better to
not use threads.

>
In that way, you manage to have a single and independent application.
Maybe I don't know some thread behaviour in Tomcat...
After all, I have use threads in web application with tomcat :) and I 
haven't have any problems or strange thread behaviour. Sometimes whole 
concurrent programming and syncronizing my own threads causes troubles 
but nothing due tomcat.

Back to original question.
 [EMAIL PROTECTED] wrote:
I am using Tomcat4.1.30 version.
I have to develop a client application which looks in the database every 30
minutes,
ApplicationContextListener + Timer + TimerTask

to retrieve the status of an order and send the status to the remote client.
Again waits for the
The client's response and insert the repsonse back to the database.
What is that remote client? Is actually another server and your 
application is client. If so, just add client code for server in 
TimerTask (http-, web service- or whatever client).

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


Re: Synchronizing properties in cluster setup

2004-12-21 Thread Peter Johnson
Hi Srinivas,
What you are after is a shared / networked filesystem like NFS Coda for 
*nix.

PJ
Srinivas Rao Ch wrote:
Hi,

I successfully configured my clustering setup with mod_jk2 and it is running
fine. Now the problem is I have some properties files in my tomcat web
application which gets modified when some features are accessed. If some
changes are there in one cluster member, I have to update the same in other
members also.

And, I have a folder of icons which gets changed when client uploads new
icon in to the system. I have to synchronize this folder also across all the
cluster members. Can somebody suggest me how I can do this with the setup I
have(Apache 2.0.52 + Tomcat 5.0.16 + mod_jk2).

Is there any service already available to sync the resources like these?

Regards,
Srinivas
 

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


Re: [OT] Request an app test (free beer!)

2004-12-21 Thread erh
NetBSD(native jre): NetBSD
NetBSD(using linux binaries): Linux

> >Sent: Monday, December 20, 2004 2:26 PM
> >To: Commons User; Struts User; Tomcat User
> >Subject: [OT] Request an app test (free beer!)
> >
> >
> >I was informed last OT post I made that the subject should always 
> >include the word "beer". ?I added the "free" to get your attention :)
> >
> >I'm working on something for which I need to know what the os.name 
> >property on various OS's is. ?I would greatly appreciate it if some 
> >folks could try the following:
> >
> >public class test {
> >public static void main(String[] args) {
> >System.out.println(System.getProperty("os.name"));
> >}
> >}
> >
> >I'm particularly interested in various *nix variants, Linux, Mac and 
> >such. ?Windows I already have answers for (although some verification to
> >
> >be sure nothing fishy is going on wouldn't hurt).
> >
> >If you could just post your OS and what the result was, I would greatly 
> >appreciate it. ?Thanks in advance!

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



RE: Difficulty connecting to DB2 for iSeries from Tomcat 5.0.28

2004-12-21 Thread Phillip Qin
Your conections are pooled by Tomcat.

I don't know how you configure your Resource, mine looks like this

   
- 
- 
  driverClassName 
  oracle.jdbc.driver.OracleDriver 
  
- 
  url 
  jdbc:oracle:thin:@myhost.com:1521:mysid 
  
- 
  username 
  myuser 
  
- 
  password 
  mypass 
  
- 
  maxActive 
  25 
  
- 
  maxIdle 
  5 
  
- 
  minIdle 
  5 
  
- 
  maxWait 
  15000 
  
- 
  removeAbandoned 
  true 
  
- 
  validationQuery 
  SELECT SYSDATE FROM DUAL 
  
- 
  testOnBorrow 
  true 
  
- 
  testOnReturn 
  true 
  
- 
  minEvictableIdleTimeMillis 
  -1 
  
- 
  timeBetweenEvictionRunsMillis 
  3 
  
- 
  numTestsPerEvictionRun 
  1 
  
- 
  testWhileIdle 
  true 
  

To test if pooling works, you either observe the number of jdbc connections
in oracle or do a netstat to list of jdbc connections (not 1521). In my
case, max idle would be 5.

-Original Message-
From: David Uctaa [mailto:[EMAIL PROTECTED] 
Sent: December 21, 2004 4:30 PM
To: Tomcat Users List
Subject: Re: Difficulty connecting to DB2 for iSeries from Tomcat 5.0.28


Looks like that worked! Many thanks!  :)

Now my question is, since I'm using javax.sql.DataSource as the
ResourceType, how do I know if I'm using the connection pool or opening a
new connection each time I request a connection?

The factory associated with the resource is
org.apache.commons.dbcp.BasicDataSourceFactory

Does this factory provide connection pooling?  If not, how do I change the
implementation to use pooling?  Once I'm using pooling, how do I find out
how many connections are in use?  How do I find out if a connetion I am
about to get will come from the pool or if a new connection is being
created?  Etc.  Is there a page somewhere that references this information?

Thanks again.


On Tue, 21 Dec 2004 16:03:42 -0500, Phillip Qin <[EMAIL PROTECTED]>
wrote:
> Can you try javax.sql.DataSource in ? You use 
> javax.sql.DataSource in resourcelink then the type in resource has to 
> be the same.
> 
> -Original Message-
> From: David Uctaa [mailto:[EMAIL PROTECTED]
> Sent: December 21, 2004 3:26 PM
> To: Tomcat Users List
> Subject: Re: Difficulty connecting to DB2 for iSeries from Tomcat 
> 5.0.28
> 
>  type="com.ibm.as400.access.AS400JDBCConnectionPoolDataSource"
> auth="Container" scope="Shareable" name="jdbc/MYDATASOURCE"/>
> 
> On Tue, 21 Dec 2004 15:02:58 -0500, Phillip Qin 
> <[EMAIL PROTECTED]>
> wrote:
> > I assume you have something like this in your server.xml
> >
> >  > scope="Shareable" type="javax.sql.DataSource" />
> >
> > Is there any warning or exception in catalina.out or any other log 
> > files?
> >
> > -Original Message-
> > From: David Uctaa [mailto:[EMAIL PROTECTED]
> > Sent: December 21, 2004 1:52 PM
> > To: Tomcat Users List
> > Subject: Re: Difficulty connecting to DB2 for iSeries from Tomcat 
> > 5.0.28
> >
> > If the name of the global resource in server.xml is defined as 
> > 
> >
> >
> >  ...
> >
> > 
> >
> > then the resourcelink in context.xml is
> >
> > 
> >  > global="jdbc/MYDATASOURCE"
> > name="jdbc/MYDATASOURCE"
> > type="javax.sql.DataSource"/>
> > 
> >
> > (not sure if listing the exact datasource specification would be a 
> > security breach, so I'm munging the actual datasource name, but 
> > everything else is the same, including upper/lower case)
> >
> > On Tue, 21 Dec 2004 13:39:07 -0500, Phillip Qin 
> > <[EMAIL PROTECTED]>
> > wrote:
> > > What is the resourcelink in your context.xml?
> > >
> > >
> > > -Original Message-
> > > From: David Uctaa [mailto:[EMAIL PROTECTED]
> > > Sent: December 21, 2004 12:27 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: Re: Difficulty connecting to DB2 for iSeries from Tomcat 
> > > 5.0.28
> > >
> > > No matter what i do, the JNDI lookup is returning null.  What 
> > > causes a JNDI lookup to return null when the resource is defined 
> > > in the  section of server.xml?  Should I 
> > > put the resources into  in my context.xml?
> > >
> > > On Mon, 20 Dec 2004 13:52:29 -0500, David Uctaa <[EMAIL PROTECTED]>
> > > wrote:
> > > > I am running Tomcat 5.0.28 on Win XP SP1.  We have DB2 running 
> > > > on 2 iSeries servers.  When I attempt to look up a DataSource 
> > > > from JNDI to get a connection from it, the JNDI lookup is 
> > > > returning null.
> > > >
> > > > I am using IBM's JTOpen library for the JDBC drivers, and I am 
> > > > attempting to use Tomcat to manage the connection pooling.  I am 
> > > > following the instructions I saw listed here:
> > > > http://www.itjungle.com/fhg/fhg060204-story01.html .   I am trying
the
> > > > first option, using the Commons DBCP connection pool.
> > > >
> > > > I have attached copies of my server.xml and the context 
> > > > configuration file webappname.xml.  The code I am using to 
> > > > access the data source is pretty generic:
> > > >
> > > > Context initCtx = new InitialContext();
> > > > Context ctx = (Context) initCtx.lookup("java:comp/env"); 

Re: HTTP Status 404 - /admin && HTTP Status 404 - /manager/html

2004-12-21 Thread Viorel C.
On Tue, 2004-12-21 at 19:05, Dwayne Ghant wrote:
> Configured tomcat.5.0.27/apache2.x/mod_jk2.so
>  
> After configuration my "admin" and "manager" application
> stoped working.
In apache configuration you must have:
Alias /admin $CATALINA_HOME/server/webapps/admin
Alias /manager $CATALINA_HOME/server/webapps/manager

Replace $CATALINA_HOME with your path;

I hope that will help you.

Viorel.



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



Re: FORM based authentication config

2004-12-21 Thread Viorel C.
On Tue, 2004-12-21 at 16:15, Chris Chappell wrote:
> Hi I'm having trouble getting form based authentication to work. Any help 
> much appreciated.
> I'm missing something simple I'm sure. (TC 5.0.19, W2K, Mysql4) 
> 
> I am using a JDBC Realm which works fine with BASIC auth.
> 
> After changing to FORM and try 
> http://127.0.0.1:8080/MyApp/security/protected/login.jsp I get:
> The requested resource (/MyApp/security/protected/login.jsp) is not available.
>  
> To set this up I copied the files from the JSP examples - login.jsp, 
> error.jsp in folders \security\protected to \MyApp\security\protected\
> I copied web.xml parts:
> 
>   
> 
> org.apache.jsp.security.protected_.error_jsp
> 
> org.apache.jsp.security.protected_.error_jsp
> 
> 
> 
> 
> org.apache.jsp.security.protected_.index_jsp
> 
> org.apache.jsp.security.protected_.index_jsp
> 
> 
> 
> 
> org.apache.jsp.security.protected_.login_jsp
> 
> org.apache.jsp.security.protected_.login_jsp
> 
> 
>   and mappings
> 
> 
> 
> org.apache.jsp.security.protected_.error_jsp
> /security/protected/error.jsp
> 
> 
> 
> 
> org.apache.jsp.security.protected_.index_jsp
> /security/protected/index.jsp
> 
> 
> 
> 
> org.apache.jsp.security.protected_.login_jsp
> /security/protected/login.jsp
> 
> 
> with 
> 
> 
> 
>   Calendar
>   /Calendar
>   
> 
> 
> 
> 
>   user
>   admin
>   sysadmin
> 
>   
> 
> and configured 
> 
> 
> FORM
> MyApp
> /security/protected/login.jsp
> /security/protected/error.jsp
>   
> 
> 
> 
> Chris
Try to use static resources for the form-login-page and form-error-page.
It works for me. And skip servlet mapping

Viorel


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



Re: How to run servlet for every 30 minutes in Tomcat 4.1.30

2004-12-21 Thread Dennis Payne
It is possible to create a servlet thread in the init() method.  That
thread sould stay alive and run something every thirty minutes.  The
issue of pushing information out to the user remins the same.  The
servlet and the thread cannot do that.  On the other hand, it is
possible to setup java script on the page to detect 30 minute intervals
to pull a page from the server.

It is an awful lot of work for so little a result... It is best just to
put a java process into cron or task scheduler and have the user run the
report when they want the info.

>>> [EMAIL PROTECTED] 12-21-2004 14:44 >>>
Jorge Sopena wrote:
> Why is bad using own threads inside web application?
> Aren't all the servlet request actually a thread in Tomcat?
> I can't find a reason why it's so bad solution.

I think that comes from J2EE specs. I do not remember is threads just
forbidden but if you follow specs, you do not know and you do not have
to know how application server uses threads and controls thread 
behaviour. If portability is issue for your application, it is better
to
not use threads.

 >
> In that way, you manage to have a single and independent
application.
> 
> Maybe I don't know some thread behaviour in Tomcat...
> 

After all, I have use threads in web application with tomcat :) and I 
haven't have any problems or strange thread behaviour. Sometimes whole

concurrent programming and syncronizing my own threads causes troubles

but nothing due tomcat.

Back to original question.

>  [EMAIL PROTECTED] wrote:
> I am using Tomcat4.1.30 version.
> I have to develop a client application which looks in the database
every 30
> minutes,

ApplicationContextListener + Timer + TimerTask


> to retrieve the status of an order and send the status to the remote
client.
> Again waits for the
> The client's response and insert the repsonse back to the database.

What is that remote client? Is actually another server and your 
application is client. If so, just add client code for server in 
TimerTask (http-, web service- or whatever client).

- Jukka -

-
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 Leak with Javac and Tomcat v. 4.0.28

2004-12-21 Thread Dakota Jack
Thanks, all!

Jack

-- 
"You can lead a horse to water but you cannot make it float on its back."

~Dakota Jack~

"You can't wake a person who is pretending to be asleep."

~Native Proverb~

"Each man is good in His sight. It is not necessary for eagles to be crows."

~Hunkesni (Sitting Bull), Hunkpapa Sioux~

---

"This message may contain confidential and/or privileged information.
If you are not the addressee or authorized to receive this for the
addressee, you must not use, copy, disclose, or take any action based
on this message or any information herein. If you have received this
message in error, please advise the sender immediately by reply e-mail
and delete this message. Thank you for your cooperation."

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



RE: How to run servlet for every 30 minutes in Tomcat 4.1.30

2004-12-21 Thread Jiang, Peiyun
I think I saw something like this, but not sure if it works:


Servlet
Servlet
  cron expression?
1
 

Peiyun 

-Original Message-
From: Dennis Payne [mailto:[EMAIL PROTECTED]
Sent: December 21, 2004 5:37 PM
To: [EMAIL PROTECTED]
Subject: Re: How to run servlet for every 30 minutes in Tomcat 4.1.30


It is possible to create a servlet thread in the init() method.  That
thread sould stay alive and run something every thirty minutes.  The
issue of pushing information out to the user remins the same.  The
servlet and the thread cannot do that.  On the other hand, it is
possible to setup java script on the page to detect 30 minute intervals
to pull a page from the server.

It is an awful lot of work for so little a result... It is best just to
put a java process into cron or task scheduler and have the user run the
report when they want the info.

>>> [EMAIL PROTECTED] 12-21-2004 14:44 >>>
Jorge Sopena wrote:
> Why is bad using own threads inside web application?
> Aren't all the servlet request actually a thread in Tomcat?
> I can't find a reason why it's so bad solution.

I think that comes from J2EE specs. I do not remember is threads just
forbidden but if you follow specs, you do not know and you do not have
to know how application server uses threads and controls thread 
behaviour. If portability is issue for your application, it is better
to
not use threads.

 >
> In that way, you manage to have a single and independent
application.
> 
> Maybe I don't know some thread behaviour in Tomcat...
> 

After all, I have use threads in web application with tomcat :) and I 
haven't have any problems or strange thread behaviour. Sometimes whole

concurrent programming and syncronizing my own threads causes troubles

but nothing due tomcat.

Back to original question.

>  [EMAIL PROTECTED] wrote:
> I am using Tomcat4.1.30 version.
> I have to develop a client application which looks in the database
every 30
> minutes,

ApplicationContextListener + Timer + TimerTask


> to retrieve the status of an order and send the status to the remote
client.
> Again waits for the
> The client's response and insert the repsonse back to the database.

What is that remote client? Is actually another server and your 
application is client. If so, just add client code for server in 
TimerTask (http-, web service- or whatever client).

- Jukka -

-
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: How to run servlet for every 30 minutes in Tomcat 4.1.30

2004-12-21 Thread Glenn Parsons
At 05:37 PM 12/21/2004, you wrote:
It is possible to create a servlet thread in the init() method.  That
thread sould stay alive and run something every thirty minutes.  The
issue of pushing information out to the user remins the same.  The
servlet and the thread cannot do that.  On the other hand, it is
possible to setup java script on the page to detect 30 minute intervals
to pull a page from the server.
It is an awful lot of work for so little a result... It is best just to
put a java process into cron or task scheduler and have the user run the
report when they want the info.
>>> [EMAIL PROTECTED] 12-21-2004 14:44 >>>
Jorge Sopena wrote:
> Why is bad using own threads inside web application?
> Aren't all the servlet request actually a thread in Tomcat?
> I can't find a reason why it's so bad solution.
I think that comes from J2EE specs. I do not remember is threads just
forbidden but if you follow specs, you do not know and you do not have
to know how application server uses threads and controls thread
behaviour. If portability is issue for your application, it is better
to
not use threads.
 >
> In that way, you manage to have a single and independent
application.
>
> Maybe I don't know some thread behaviour in Tomcat...
>
After all, I have use threads in web application with tomcat :) and I
haven't have any problems or strange thread behaviour. Sometimes whole
concurrent programming and syncronizing my own threads causes troubles
but nothing due tomcat.
Back to original question.
>  [EMAIL PROTECTED] wrote:
> I am using Tomcat4.1.30 version.
> I have to develop a client application which looks in the database
every 30
> minutes,
ApplicationContextListener + Timer + TimerTask
> to retrieve the status of an order and send the status to the remote
client.
> Again waits for the
> The client's response and insert the repsonse back to the database.
What is that remote client? Is actually another server and your
application is client. If so, just add client code for server in
TimerTask (http-, web service- or whatever client).
- Jukka -
We have used a cron job using a command-line text-only web browser like 
'links' or 'Lynx' to execute scripts like this at intervals. Much easier 
solution!

Cheers. 

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
http://www.sng.ecs.soton.ac.uk/mailscanner/
Configuration by Glenn Parsons dnsadmin-at-1bigthink.com

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

Re: How to run servlet for every 30 minutes in Tomcat 4.1.30

2004-12-21 Thread Frank W. Zammetti
It's interesting, Craig and I had an exchange about threads in servlet 
containers last week... I can't find a link to the thread unfortunately.

Anyway, the basic idea behind that "don't spawn your own threads inside 
a servlet container" admonishment is based more on the fact that it's 
quite easy to screw up doing so, more than it has to do with virtually 
anything else.

You want the servlet container to manager resources for you, and you 
lose that by spawning your own threads.  The container isn't aware of 
the threads, so it can't control them for things like graceful shutdowns 
or simply trying to control resource utilization.  Many people, 
including me, tend to ignore that warning when the situation warrants 
it, but you have to be extra-careful.

For instance, you don't under any circumstances want to hold on to 
references to response, request or session objects because you don't 
manage them.  You also, unless you really have a need and know what your 
doing, want to spawn threads to handle requests at all.  Any threads you 
do spawn in a container should tend to be independent units of 
execution.  If your use case fits that description, you can get away 
with it relatively safely.

That being said, spawning things like daemon threads for low-level 
behind-the-scenes type processing is generally OK, so long as you are 
careful (i.e., be sure no runaway processing can occur, make sure it 
will shut down gracefully, etc).  You might be able to use something 
like that in this case, you'll have to decide.  If your using Struts, 
you can spawn the thread from a plug-in, as I've done in the past, but 
there are non-Struts equivalents (worse comes to worse, just do it in a 
servlet.init()).  Do yourself a favor and make the thread processing 
functional independent of your app essentially, and even make it so it's 
not aware it's running in a servlet container.  But again, caution is 
the key.  If you make it a demon thread and set it's priority as low as 
you can and be sure to not hold on to a reference to it, I've found that 
works just fine under a number of app servers on a numeber of OSs.

The bottom-line is that really that psuedo-rule is around because people 
tend to shoot themselves in the foot when using threads a bit too often, 
so better to advise against getting into a situation where you might do 
that.  But, if your confident in your ability, and believe the use case 
really warrants it, you CAN do it, and relatively safely.

--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
Dennis Payne wrote:
It is possible to create a servlet thread in the init() method.  That
thread sould stay alive and run something every thirty minutes.  The
issue of pushing information out to the user remins the same.  The
servlet and the thread cannot do that.  On the other hand, it is
possible to setup java script on the page to detect 30 minute intervals
to pull a page from the server.
It is an awful lot of work for so little a result... It is best just to
put a java process into cron or task scheduler and have the user run the
report when they want the info.

[EMAIL PROTECTED] 12-21-2004 14:44 >>>
Jorge Sopena wrote:
Why is bad using own threads inside web application?
Aren't all the servlet request actually a thread in Tomcat?
I can't find a reason why it's so bad solution.

I think that comes from J2EE specs. I do not remember is threads just
forbidden but if you follow specs, you do not know and you do not have
to know how application server uses threads and controls thread 
behaviour. If portability is issue for your application, it is better
to
not use threads.

 >
In that way, you manage to have a single and independent
application.
Maybe I don't know some thread behaviour in Tomcat...

After all, I have use threads in web application with tomcat :) and I 
haven't have any problems or strange thread behaviour. Sometimes whole

concurrent programming and syncronizing my own threads causes troubles
but nothing due tomcat.
Back to original question.

[EMAIL PROTECTED] wrote:
I am using Tomcat4.1.30 version.
I have to develop a client application which looks in the database
every 30
minutes,

ApplicationContextListener + Timer + TimerTask

to retrieve the status of an order and send the status to the remote
client.
Again waits for the
The client's response and insert the repsonse back to the database.

What is that remote client? Is actually another server and your 
application is client. If so, just add client code for server in 
TimerTask (http-, web service- or whatever client).

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