Unable to run tomcat

2006-07-17 Thread Bansal, Tarun
Hi

I tried to run tomcat 5.0 on my machine but it is giving the following
error:


Error initializing endpoint java.net.BindException: Address in use: JVM_Bind:9000


Please help


Thanks and Regards


Tarun Bansal



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Unable to run tomcat

2006-07-17 Thread Johan van den Berg
This could mean that a previous startup is still busy, or that you
actually have another tomcat running on the same machine?

I would suggest rebooting, starting tomcat, and monitoring the logs very
closely.

Regards
Johan

On Mon, 2006-07-17 at 13:51 +0530, Bansal, Tarun wrote:
> Hi
> 
> I tried to run tomcat 5.0 on my machine but it is giving the following
> error:
> 
> 
> Error initializing endpoint  JVM_Bind:9000>java.net.BindException: Address in use: JVM_Bind:9000
> 
> 
> Please help
> 
> 
> Thanks and Regards
> 
> 
> Tarun Bansal
> 
> 
> 
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Unable to run tomcat

2006-07-17 Thread Bansal, Tarun
Actually I have metaframe server running on the client machine on port
8080 but there is nothing running on port 9000

-Original Message-
From: Johan van den Berg [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 17, 2006 1:55 PM
To: Tomcat Users List
Subject: Re: Unable to run tomcat

This could mean that a previous startup is still busy, or that you
actually have another tomcat running on the same machine?

I would suggest rebooting, starting tomcat, and monitoring the logs very
closely.

Regards
Johan

On Mon, 2006-07-17 at 13:51 +0530, Bansal, Tarun wrote:
> Hi
> 
> I tried to run tomcat 5.0 on my machine but it is giving the following
> error:
> 
> 
> Error initializing endpoint  JVM_Bind:9000>java.net.BindException: Address in use: JVM_Bind:9000
> 
> 
> Please help
> 
> 
> Thanks and Regards
> 
> 
> Tarun Bansal
> 
> 
> 
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: getting "?" instead of "¢"

2006-07-17 Thread David Delbecq
http://htmlhelp.com/reference/html40/entities/latin1.html

balaraju mandala wrote:
> Hi All,
>
> I need some help from you. I need to display Cent(¢) symbol on
> browser. I am
> getting ? symbol instead, what could be the problem, please explain me.
>
> Thank you.
>
> balaraju
>


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat5 installation problem

2006-07-17 Thread Oguz Yarımtepe

Changing the port solved my problem. Thanx.

2006/7/14, David Smith <[EMAIL PROTECTED]>:

Port 8005 which tomcat uses as a shutdown port is in use by another
process. You could change that in server.xml or shutdown the service on
8005 to fix it.

--David

Oguz Yarımtepe wrote:

> Hi. I was trying to install Tomcat 5.5.17 to a windowsXP machine with
> a service pack 2. I followed the instructions and first i installed
> the J2sdk and then tomcat. But when i run the monitor program and
> started the server the localhost:8080 didnt show me a page.
>
> I read the logs. Used the google and did what ever i could do. Changed
> the port. Restarted. Reinstalled. Still i can not see the Tomcat
> running. It seems working but there is no localohost:portnumber thing.
> I triedn also 127.0.0.1 for localhost or the ip of the machine but
> none of them solved anything. Here is the log.
>
> 14-jul-2006 11:24:08 org.apache.catalina.core.AprLifecycleListener
> lifecycleEvent
> INFO: The Apache Tomcat Native library which allows optimal
> performance in production environments was not found on the
> java.library.path: C:\Archivos de programa\Apache Software
> Foundation\Tomcat
> 
5.5\bin;.;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32\WBEM;C:\Archivos
>
> de programa\Archivos comunes\Autodesk
> Shared\;C:\ARCHIV~1\CA\SHARED~1\SCANEN~1;C:\ARCHIV~1\CA\ETRUST~1;C:\Archivos
>
> de programa\MySQL\MySQL Server 5.0\bin;C:\Archivos de
> programa\Java\jdk1.5.0\bin
> 14-jul-2006 11:24:08 org.apache.coyote.http11.Http11BaseProtocol init
> INFO: Inicializando Coyote HTTP/1.1 en puerto http-8080
> 14-jul-2006 11:24:08 org.apache.catalina.startup.Catalina load
> INFO: Initialization processed in 3047 ms
> 14-jul-2006 11:24:09 org.apache.catalina.core.StandardService start
> INFO: Arrancando servicio Catalina
> 14-jul-2006 11:24:09 org.apache.catalina.core.StandardEngine start
> INFO: Starting Servlet Engine: Apache Tomcat/5.5.17
> 14-jul-2006 11:24:09 org.apache.catalina.core.StandardHost start
> INFO: Desactivada la validación XML
> 14-jul-2006 11:24:10 org.apache.coyote.http11.Http11BaseProtocol start
> INFO: Arrancando Coyote HTTP/1.1 en puerto http-8080
> 14-jul-2006 11:24:11 org.apache.jk.common.ChannelSocket init
> INFO: JK: ajp13 listening on /0.0.0.0:8009
> 14-jul-2006 11:24:11 org.apache.jk.server.JkMain start
> INFO: Jk running ID=0 time=0/46 config=null
> 14-jul-2006 11:24:11 org.apache.catalina.storeconfig.StoreLoader load
> INFO: Find registry server-registry.xml at classpath resource
> 14-jul-2006 11:24:11 org.apache.catalina.startup.Catalina start
> INFO: Server startup in 2609 ms
> 14-jul-2006 11:24:11 org.apache.catalina.core.StandardServer await
> GRAVE: StandardServer.await: create[8005]:
> java.net.BindException: Address already in use: JVM_Bind
> at java.net.PlainSocketImpl.socketBind(Native Method)
> at java.net.PlainSocketImpl.bind(Unknown Source)
> at java.net.ServerSocket.bind(Unknown Source)
> at java.net.ServerSocket.(Unknown Source)
> at org.apache.catalina.core.StandardServer.await(StandardServer.java:372)
> at org.apache.catalina.startup.Catalina.await(Catalina.java:615)
> at org.apache.catalina.startup.Catalina.start(Catalina.java:575)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
> at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
> 14-jul-2006 11:30:00 org.apache.catalina.core.AprLifecycleListener
> lifecycleEvent
> INFO: The Apache Tomcat Native library which allows optimal
> performance in production environments was not found on the
> java.library.path: C:\Archivos de programa\Apache Software
> Foundation\Tomcat
> 
5.5\bin;.;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32\WBEM;C:\Archivos
>
> de programa\Archivos comunes\Autodesk
> Shared\;C:\ARCHIV~1\CA\SHARED~1\SCANEN~1;C:\ARCHIV~1\CA\ETRUST~1;C:\Archivos
>
> de programa\MySQL\MySQL Server 5.0\bin;C:\Archivos de
> programa\Java\jdk1.5.0\bin
> 14-jul-2006 11:30:00 org.apache.coyote.http11.Http11BaseProtocol init
> INFO: Inicializando Coyote HTTP/1.1 en puerto http-8085
> 14-jul-2006 11:30:00 org.apache.catalina.startup.Catalina load
> INFO: Initialization processed in 1219 ms
> 14-jul-2006 11:30:00 org.apache.catalina.core.StandardService start
> INFO: Arrancando servicio Catalina
> 14-jul-2006 11:30:00 org.apache.catalina.core.StandardEngine start
> INFO: Starting Servlet Engine: Apache Tomcat/5.5.17
> 14-jul-2006 11:30:00 org.apache.catalina.core.StandardHost start
> INFO: Desactivada la validación XML
> 14-jul-2006 11:30:02 org.apache.coyote.http11.Http11BaseProtocol start
> INFO: Arrancando Coyote HTTP/1.1 en puerto http-8085
> 14-jul-2006 11:30:02 org.apache.jk.common.ChannelSocket init
> INF

RE: multiple t hreads

2006-07-17 Thread Peter Crowther
> From: Pratap Parne [mailto:[EMAIL PROTECTED] 
> how to start multiple threads of a single instance of
> a tomcat where each thread runs a different
> application.is it possible with tomcat if so how

Tomcat is (very!) multi-threaded anyway.  If you want to run multiple
web applications (.war files), simply put all the .war files into
Tomcat's 'webapps' directory.  Tomcat will start and run all of them,
and will allocate its threads to whichever web applications need them at
the time.

Does this help?

- Peter

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Unable to run tomcat

2006-07-17 Thread Markus Schönhaber
Bansal, Tarun wrote:
> Actually I have metaframe server running on the client machine on port
> 8080 but there is nothing running on port 9000

And
netstat -ano -p TCP
(assuming the machine is running WinXP or newer) verifies this?

Regards
  mks

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Patch to override request.getRemoteAddr if behind a reverse proxy

2006-07-17 Thread Ronald Klop

On Sat Jul 15 13:38:47 CEST 2006 Tomcat Users List  
wrote:

Hi

We needed to patch Tomcat for our site that has a Tomcat
behind Apache (mod_jk), that sits behind a reverse proxy load balancer.
The idea is basically to not use the TCP endpoint of Apache (which will
always point to the reverse proxy) to give the caller of
request.getRemoteAddr a valid IP, but rather retrieve it from a
configurable request header. In our case, we have hacked the Pound
loadbalancer to forward a request header called X-Pounded-For with each
request, and the value of this header is then used (if available) to
return the *real client IP to the caller of request.getRemoteAddr or
request.getRemoteHost.

Extract from server.xml:





Let me know if it is of any use to anyone else!

Regards

--
Johan van den Berg
Technical Webmaster
University of South Africa

Cel: +27 73 201 3520
Tel: +27 12 429 2371

Registered Linux user number 390606
http://counter.li.org/
-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED],


In stead of patching Tomcat, you can also make a util class/method like this.

public final class ServletUtils {
   private static final String MY_TRUSTED_PROXY = "127.0.0.1";
   public static String getRemoteAddr(ServletRequest req) {
  String remoteIp = req.getRemoteAddr();
  if (remoteIp.equals(MY_TRUSTED_PROXY)) {
  String proxyIp = req.getHeader("X-Pounded-For");
  if (proxyip != null) {
 remoteIp = proxyip;
  }
  }
  return remoteIp;
   }
}


This makes your application know about your setup in stead of Tomcat. Much more 
flexible and much less problems when upgrading Tomcat.
You can also put this in a Filter which wraps the ServletRequest with your own 
version. This keeps your application clean and it just uses the standard 
Servlet extendabilties.

Ronald.



Re: Patch to override request.getRemoteAddr if behind a reverse proxy

2006-07-17 Thread Johan van den Berg
Except that I have 5 servers, each having 20 different apps, some of
which are 3'rd party, so I *really* don't want to modify the app (closed
source).

This is a server infrastructure and configuration issue, none of which
any developer should ever be worried about...

Regards
Johan

On Mon, 2006-07-17 at 11:48 +0200, Ronald Klop wrote:
> On Sat Jul 15 13:38:47 CEST 2006 Tomcat Users List  
> wrote:
> > Hi
> > 
> > We needed to patch Tomcat for our site that has a Tomcat
> > behind Apache (mod_jk), that sits behind a reverse proxy load balancer.
> > The idea is basically to not use the TCP endpoint of Apache (which will
> > always point to the reverse proxy) to give the caller of
> > request.getRemoteAddr a valid IP, but rather retrieve it from a
> > configurable request header. In our case, we have hacked the Pound
> > loadbalancer to forward a request header called X-Pounded-For with each
> > request, and the value of this header is then used (if available) to
> > return the *real client IP to the caller of request.getRemoteAddr or
> > request.getRemoteHost.
> > 
> > Extract from server.xml:
> > 
> > 
> >  > enableLookups="false" redirectPort="8443" protocol="AJP/1.3" />
> > 
> > 
> > Let me know if it is of any use to anyone else!
> > 
> > Regards
> > 
> > -- 
> > Johan van den Berg
> > Technical Webmaster
> > University of South Africa
> > 
> > Cel: +27 73 201 3520
> > Tel: +27 12 429 2371
> > 
> > Registered Linux user number 390606
> > http://counter.li.org/
> > -
> > To start a new topic, e-mail: users@tomcat.apache.org
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED],
> 
> In stead of patching Tomcat, you can also make a util class/method like this.
> 
> public final class ServletUtils {
> private static final String MY_TRUSTED_PROXY = "127.0.0.1";
> public static String getRemoteAddr(ServletRequest req) {
>String remoteIp = req.getRemoteAddr();
>if (remoteIp.equals(MY_TRUSTED_PROXY)) {
>String proxyIp = req.getHeader("X-Pounded-For");
>if (proxyip != null) {
>   remoteIp = proxyip;
>}
>}
>return remoteIp;
> }
> }
> 
> 
> This makes your application know about your setup in stead of Tomcat. Much 
> more flexible and much less problems when upgrading Tomcat.
> You can also put this in a Filter which wraps the ServletRequest with your 
> own version. This keeps your application clean and it just uses the standard 
> Servlet extendabilties.
> 
> Ronald.
> 


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: getting "?" instead of "¢"

2006-07-17 Thread Ronald Klop

On Mon Jul 17 08:55:56 CEST 2006 Tomcat Users List  
wrote:

Hi All,

I need some help from you. I need to display Cent(¢) symbol on browser. I am
getting ? symbol instead, what could be the problem, please explain me.

Thank you.

balaraju

Hello,

Use the method ServletResponse.setCharacterEncoding("UTF-8") in a Servlet or 
contentType="text/html; charset=UTF-8" in a jsp page.
http://java.sun.com/products/jsp/syntax/1.2/syntaxref1210.html#15653

But charset issues are tricky because all you files need to use a known 
charset. And if you use a database it needs to have a supported charset also.
If your editor saves files in iso-8859-1 the problem is already there and the 
browser wil never see the right character. So you need to debug where the 
character is correct for the last time.

Ronald.



Re: Patch to override request.getRemoteAddr if behind a reverse proxy

2006-07-17 Thread Ronald Klop

On Mon Jul 17 11:52:20 CEST 2006 Tomcat Users List  
wrote:

Except that I have 5 servers, each having 20 different apps, some of
which are 3'rd party, so I *really* don't want to modify the app (closed
source).

This is a server infrastructure and configuration issue, none of which
any developer should ever be worried about...

Regards
Johan


A Filter is really good to use in that case and if I remember correctly you can 
add it to conf/web.xml. Or you can create a Valve for Tomcat and put the code 
in there. Tomcat is already extendable without using patches.

Ronald.


 On Mon, 2006-07-17 at 11:48 +0200, Ronald Klop wrote:
> On Sat Jul 15 13:38:47 CEST 2006 Tomcat Users List  
wrote:
> > Hi
> > 
> > We needed to patch Tomcat for our site that has a Tomcat

> > behind Apache (mod_jk), that sits behind a reverse proxy load balancer.
> > The idea is basically to not use the TCP endpoint of Apache (which will
> > always point to the reverse proxy) to give the caller of
> > request.getRemoteAddr a valid IP, but rather retrieve it from a
> > configurable request header. In our case, we have hacked the Pound
> > loadbalancer to forward a request header called X-Pounded-For with each
> > request, and the value of this header is then used (if available) to
> > return the *real client IP to the caller of request.getRemoteAddr or
> > request.getRemoteHost.
> > 
> > Extract from server.xml:
> > 
> > 

> >  > enableLookups="false" redirectPort="8443" protocol="AJP/1.3" />
> > 
> > 
> > Let me know if it is of any use to anyone else!
> > 
> > Regards
> > 
> > -- 
> > Johan van den Berg

> > Technical Webmaster
> > University of South Africa
> > 
> > Cel: +27 73 201 3520

> > Tel: +27 12 429 2371
> > 
> > Registered Linux user number 390606

> > http://counter.li.org/
> > -
> > To start a new topic, e-mail: users@tomcat.apache.org
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED],
> 
> In stead of patching Tomcat, you can also make a util class/method like this.
> 
> public final class ServletUtils {

> private static final String MY_TRUSTED_PROXY = "127.0.0.1";
> public static String getRemoteAddr(ServletRequest req) {
> String remoteIp = req.getRemoteAddr();
> if (remoteIp.equals(MY_TRUSTED_PROXY)) {
> String proxyIp = req.getHeader("X-Pounded-For");
> if (proxyip != null) {
> remoteIp = proxyip;
> }
> }
> return remoteIp;
> }
> }
> 
> 
> This makes your application know about your setup in stead of Tomcat. Much more flexible and much less problems when upgrading Tomcat.

> You can also put this in a Filter which wraps the ServletRequest with your 
own version. This keeps your application clean and it just uses the standard 
Servlet extendabilties.
> 
> Ronald.
> 



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





Re: getting "?" instead of "¢"

2006-07-17 Thread David Delbecq
This is not a matter of saving the jsp/html file on server with the good 
charset, this is a matter of using the correct entity reference (¢) 
which is supposed to be displayable by any html 2.0 compliant browser.

Ronald Klop wrote:
On Mon Jul 17 08:55:56 CEST 2006 Tomcat Users List 
 wrote:

Hi All,

I need some help from you. I need to display Cent(¢) symbol on 
browser. I am

getting ? symbol instead, what could be the problem, please explain me.

Thank you.

balaraju

Hello,

Use the method ServletResponse.setCharacterEncoding("UTF-8") in a 
Servlet or contentType="text/html; charset=UTF-8" in a jsp page.

http://java.sun.com/products/jsp/syntax/1.2/syntaxref1210.html#15653

But charset issues are tricky because all you files need to use a 
known charset. And if you use a database it needs to have a supported 
charset also.
If your editor saves files in iso-8859-1 the problem is already there 
and the browser wil never see the right character. So you need to 
debug where the character is correct for the last time.


Ronald.





-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: getting "?" instead of "¢"

2006-07-17 Thread David Delbecq

This is not a matter of saving the jsp/html file on server with the good
charset, this is a matter of using the correct entity reference (¢)
which is supposed to be displayable by any html 2.0 compliant browser.
Ronald Klop wrote:
On Mon Jul 17 08:55:56 CEST 2006 Tomcat Users List 
 wrote:

Hi All,

I need some help from you. I need to display Cent(¢) symbol on 
browser. I am

getting ? symbol instead, what could be the problem, please explain me.

Thank you.

balaraju

Hello,

Use the method ServletResponse.setCharacterEncoding("UTF-8") in a 
Servlet or contentType="text/html; charset=UTF-8" in a jsp page.

http://java.sun.com/products/jsp/syntax/1.2/syntaxref1210.html#15653

But charset issues are tricky because all you files need to use a 
known charset. And if you use a database it needs to have a supported 
charset also.
If your editor saves files in iso-8859-1 the problem is already there 
and the browser wil never see the right character. So you need to 
debug where the character is correct for the last time.


Ronald.






-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: getting "?" instead of "¢"

2006-07-17 Thread David Delbecq

(Sorry for the double post, alias issue)
David Delbecq wrote:

This is not a matter of saving the jsp/html file on server with the good
charset, this is a matter of using the correct entity reference (¢)
which is supposed to be displayable by any html 2.0 compliant browser.
Ronald Klop wrote:
On Mon Jul 17 08:55:56 CEST 2006 Tomcat Users List 
 wrote:

Hi All,

I need some help from you. I need to display Cent(¢) symbol on 
browser. I am

getting ? symbol instead, what could be the problem, please explain me.

Thank you.

balaraju

Hello,

Use the method ServletResponse.setCharacterEncoding("UTF-8") in a 
Servlet or contentType="text/html; charset=UTF-8" in a jsp page.

http://java.sun.com/products/jsp/syntax/1.2/syntaxref1210.html#15653

But charset issues are tricky because all you files need to use a 
known charset. And if you use a database it needs to have a supported 
charset also.
If your editor saves files in iso-8859-1 the problem is already there 
and the browser wil never see the right character. So you need to 
debug where the character is correct for the last time.


Ronald.






-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Patch to override request.getRemoteAddr if behind a reverse proxy

2006-07-17 Thread Johan van den Berg
I'll accept as much, but understand that I just followed the same
approach that was taken with the proxyName and proxyPort parameters that
already solve a similar problem in Tomcat when sitting behind a reverse
proxy.

If that problem was solved with a Filter / Valve, I would have done the
same with my approach...

Regards
Johan

On Mon, 2006-07-17 at 12:08 +0200, Ronald Klop wrote:
> On Mon Jul 17 11:52:20 CEST 2006 Tomcat Users List
>  wrote:
> 
> Except that I have 5 servers, each having 20 different apps,
> some of
> which are 3'rd party, so I *really* don't want to modify the
> app (closed
> source).
> 
> This is a server infrastructure and configuration issue, none
> of which
> any developer should ever be worried about...
> 
> Regards
> Johan
> 
> A Filter is really good to use in that case and if I remember
> correctly you can add it to conf/web.xml. Or you can create a Valve
> for Tomcat and put the code in there. Tomcat is already extendable
> without using patches.
> 
> Ronald.
> 
> On Mon, 2006-07-17 at 11:48 +0200, Ronald Klop wrote:
> > On Sat Jul 15 13:38:47 CEST 2006 Tomcat Users List
>  wrote:
> > > Hi
> > > 
> > > We needed to patch Tomcat for our site that has a Tomcat
> > > behind Apache (mod_jk), that sits behind a reverse proxy
> load balancer.
> > > The idea is basically to not use the TCP endpoint of
> Apache (which will
> > > always point to the reverse proxy) to give the caller of
> > > request.getRemoteAddr a valid IP, but rather retrieve it
> from a
> > > configurable request header. In our case, we have hacked
> the Pound
> > > loadbalancer to forward a request header called
> X-Pounded-For with each
> > > request, and the value of this header is then used (if
> available) to
> > > return the *real client IP to the caller of
> request.getRemoteAddr or
> > > request.getRemoteHost.
> > > 
> > > Extract from server.xml:
> > > 
> > > 
> > >  proxyRemoteAddrHeader="X-Pounded-For"
> > > enableLookups="false" redirectPort="8443"
> protocol="AJP/1.3" />
> > > 
> > > 
> > > Let me know if it is of any use to anyone else!
> > > 
> > > Regards
> > > 
> > > -- 
> > > Johan van den Berg
> > > Technical Webmaster
> > > University of South Africa
> > > 
> > > Cel: +27 73 201 3520
> > > Tel: +27 12 429 2371
> > > 
> > > Registered Linux user number 390606
> > > http://counter.li.org/
> > >
> -
> > > To start a new topic, e-mail: users@tomcat.apache.org
> > > To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> > > For additional commands, e-mail:
> [EMAIL PROTECTED],
> > 
> > In stead of patching Tomcat, you can also make a util
> class/method like this.
> > 
> > public final class ServletUtils {
> > private static final String MY_TRUSTED_PROXY = "127.0.0.1";
> > public static String getRemoteAddr(ServletRequest req) {
> > String remoteIp = req.getRemoteAddr();
> > if (remoteIp.equals(MY_TRUSTED_PROXY)) {
> > String proxyIp = req.getHeader("X-Pounded-For");
> > if (proxyip != null) {
> > remoteIp = proxyip;
> > }
> > }
> > return remoteIp;
> > }
> > }
> > 
> > 
> > This makes your application know about your setup in stead
> of Tomcat. Much more flexible and much less problems when
> upgrading Tomcat.
> > You can also put this in a Filter which wraps the
> ServletRequest with your own version. This keeps your
> application clean and it just uses the standard Servlet
> extendabilties.
> > 
> > Ronald.
> > 
> 
> 
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: getting "?" instead of "¢"

2006-07-17 Thread Ronald Klop

On Mon Jul 17 12:16:00 CEST 2006 Tomcat Users List  
wrote:
This is not a matter of saving the jsp/html file on server with the good 
charset, this is a matter of using the correct entity reference (¢) 
which is supposed to be displayable by any html 2.0 compliant browser.

There are more possibilities for the same thing. In the original question there is 
no mention about where the character is coming from. If it is something an user 
submits in a form and is stored in the database and then displayed in another 
webpage you can not asume the user to type ¢.

Ronald.

 Ronald Klop wrote:
> On Mon Jul 17 08:55:56 CEST 2006 Tomcat Users List 
>  wrote:

>> Hi All,
>>
>> I need some help from you. I need to display Cent(¢) symbol on 
>> browser. I am

>> getting ? symbol instead, what could be the problem, please explain me.
>>
>> Thank you.
>>
>> balaraju
> Hello,
>
> Use the method ServletResponse.setCharacterEncoding("UTF-8") in a 
> Servlet or contentType="text/html; charset=UTF-8" in a jsp page.

> http://java.sun.com/products/jsp/syntax/1.2/syntaxref1210.html#15653
>
> But charset issues are tricky because all you files need to use a 
> known charset. And if you use a database it needs to have a supported 
> charset also.
> If your editor saves files in iso-8859-1 the problem is already there 
> and the browser wil never see the right character. So you need to 
> debug where the character is correct for the last time.

>
> Ronald.
>
>


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: getting "?" instead of "¢"

2006-07-17 Thread Martin Gainty
Assuming you have this Character Set declaration in your html head



use 
U+00A2
http://www.alanwood.net/unicode/latin_1_supplement.html

HTH
Martin--
*
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.



- Original Message - 
From: "Ronald Klop" <[EMAIL PROTECTED]>
To: "Tomcat Users List" 
Cc: "balaraju mandala" <[EMAIL PROTECTED]>
Sent: Monday, July 17, 2006 5:57 AM
Subject: Re: getting "?" instead of "¢"


On Mon Jul 17 08:55:56 CEST 2006 Tomcat Users List  
wrote:
> Hi All,
> 
> I need some help from you. I need to display Cent(¢) symbol on browser. I am
> getting ? symbol instead, what could be the problem, please explain me.
> 
> Thank you.
> 
> balaraju
Hello,

Use the method ServletResponse.setCharacterEncoding("UTF-8") in a Servlet or 
contentType="text/html; charset=UTF-8" in a jsp page.
http://java.sun.com/products/jsp/syntax/1.2/syntaxref1210.html#15653

But charset issues are tricky because all you files need to use a known 
charset. And if you use a database it needs to have a supported charset also.
If your editor saves files in iso-8859-1 the problem is already there and the 
browser wil never see the right character. So you need to debug where the 
character is correct for the last time.

Ronald.



Re: getting "?" instead of "¢"

2006-07-17 Thread Markus Schönhaber
David Delbecq wrote:
> This is not a matter of saving the jsp/html file on server with the good
> charset, 

It is.

> this is a matter of using the correct entity reference (¢) 
> which is supposed to be displayable by any html 2.0 compliant browser.

Using an entity reference is just one way to get "special" characters 
transmitted to the client. But this will only work if this entity reference 
is defined/recocgnized/interpreted in the output format used - for example in 
HTML. For other output formats - for example plain text - this will obviously 
be useless.
Since - in my experience - modern clients on modern OSes can handle correctly 
encoded input just fine (if they are told how it's encoded), I see no general 
need to cope with entity references. It all boils down to the fact that the 
encoding declared in the HTTP header and the encoding actually used have to 
match.

So I'd also stick with Ronald's proposal and create correctly encoded output.

The following - if saved as UTF-8 - should work as expected:

<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>




Display a cent


These are two cents: ¢ ¢



BTW: it isn't strictly neccessary to use UTF-8. Using a charset that contains 
all symbols used is enough. This mail for example should use ISO-8859-1 as 
charset and still contain the literal cent sign above correctly encoded.
Nevertheless I'd prefer UTF-8 on the web as a more universal approach.

Regards
  mks

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: getting "?" instead of "¢"

2006-07-17 Thread Markus Schönhaber
Markus Schönhaber wrote:
> contains all symbols used is enough. This mail for example should use
> ISO-8859-1 as charset and still contain the literal cent sign above
> correctly encoded.

Wrong. My mail client chose to encode it in UTF-8. But that doesn't change the 
fact that ISO-8859-1 contains the ¢ sign at position 162.

Regards
  mks

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat Not An App Server

2006-07-17 Thread Mike Wannamaker
I would love to just use JBoss, but there is a lot of political red-tape and
we even have our own App Server, which too is not J2EE compliant.  It was
probably developed before JBoss and the like.  We even had our own Web
Container, but I've recently replaced it with Tomcat.

What I've done is ripped out our core services from our internal app server
and provided an app server connector layer.  The idea is that we'll be able
to plug into any app server like container.  Our own internal, JBoss,
WebSphere, Tomcat???

That is the idea.  So we have customers that may have tomcat installed and
perhaps they would like to utilize that instead of installing another app
server.  So I would like to be able to somehow have Tomcat start our core
services, much the way that JBoss would, before loading any web apps.

Does anyone have any ideas on how that could be accomplished. 

Mike Wannamaker

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: July 13, 2006 4:55 PM
To: Tomcat Users List
Subject: RE: Tomcat Not An App Server

How do your webapps communicate with the core services?

cheers,

David


  |
|
  |   To:   "'Tomcat Users List'" 
|
  |   cc:
|
  |   Subject:  RE: Tomcat Not An App Server
|



Sorry guys I didn't mean to offend anyone.  I know that Tomcat offers a lot
but what I meant is as you said, it's not a full J2EE App Server, like
JBoss, WebSphere ...

What I have is a large enterprise application that does have a web
application.  In fact it has many.  These web apps rely on our core
services
to be running.  Within JBoss etc I can install this as an EAR or SAR and
JBoss will start it.

I was wondering if there is anything in Tomcat like that, were my Core
Services could get loaded/started before the tomcat web container loads the
web apps.  Thus I wouldn't have to code anything into the web apps
themselves to try and start it.

TIA

Mike Wannamaker

-Original Message-
From: David Smith [mailto:[EMAIL PROTECTED]
Sent: July 13, 2006 4:05 PM
To: Tomcat Users List
Subject: Re: Tomcat Not An App Server

Tomcat's not really an app server?  Geee really, I feel so inadequate
now. :-(

Seriously, I think I've seen this religious war around here somewhere
and it really depends on definition.  No, it's not a full J2EE
container, but it's definitely an app server in my opinion.

Have you read the servlet spec and thought about the
ServletContextListener for handling the start/shutdown of a component
within your app?

--David

Mike Wannamaker wrote:

>I know that Tomcat is not really an App Server like JBoss etc... However,
if
>I had a component that was not a web application and I wanted to start it
>inside tomcat how could I do that ?
>
>Is there some configuration file I would need to add something to in order
>to have a component started and would I need to implement some Tomcat
>interface to do it?
>
>TIA
>Mike Wannamaker
>
>
>-
>To start a new topic, e-mail: users@tomcat.apache.org
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat Not An App Server

2006-07-17 Thread Timothy Collett

On Jul 17, 2006, at 8:17 AM, Mike Wannamaker wrote:
So I would like to be able to somehow have Tomcat start our core  
services, much the way that JBoss would, before loading any web apps.


Does anyone have any ideas on how that could be accomplished.


My guess (which should be taken with a grain of salt, as I'm  
relatively new at this myself) is you want to subclass StandardHost  
or StandardEngine, and have the start() method initialize your core  
services, and the stop() method shut them down.


If subclassing those is as easy as subclassing StandardContext was  
for me, it should be as simple as calling super.start() and super.stop 
() then calling whatever initialization methods you need to run.


Timothy Collett

--

No man is justified in doing evil on the ground of expediency.
 - Theodore Roosevelt



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat Not An App Server

2006-07-17 Thread Mike Wannamaker

Thanks Timothy,

I'm actually looking more for a way to do it with Tomcat out of the box.
Like if a customer has Tomcat installed, I would just want to put my jars
into some lib directory and then add this ??? entry into this ??? xml file
and it will call start() on your class?  

Would it be possible for me to have a Valve to do this?  Forgive me for my
ignorance, but I don't know the tomcat architecture that well yet, just what
little I've read.  As long as it starts before the web apps that is all I
need.

Mike Wannamaker

-Original Message-
From: Timothy Collett [mailto:[EMAIL PROTECTED] 
Sent: July 17, 2006 8:26 AM
To: Tomcat Users List
Subject: Re: Tomcat Not An App Server

On Jul 17, 2006, at 8:17 AM, Mike Wannamaker wrote:
> So I would like to be able to somehow have Tomcat start our core  
> services, much the way that JBoss would, before loading any web apps.
>
> Does anyone have any ideas on how that could be accomplished.

My guess (which should be taken with a grain of salt, as I'm  
relatively new at this myself) is you want to subclass StandardHost  
or StandardEngine, and have the start() method initialize your core  
services, and the stop() method shut them down.

If subclassing those is as easy as subclassing StandardContext was  
for me, it should be as simple as calling super.start() and super.stop 
() then calling whatever initialization methods you need to run.

Timothy Collett

--

No man is justified in doing evil on the ground of expediency.
  - Theodore Roosevelt



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



How to redirect URLs

2006-07-17 Thread Nilesh Shastrakar
Dear All,

 

I have setup the Tomcat sever and Application, its working fine..

but I got the long URL now I want to make it short

Ex : 

 

http://www.abc.om/test/JSP/ondemand/rdtest/login.jsp

 

I want www.abc.com/forward  if  someone  types this URL in browser the site
should 

Redirect to above URL.

 

Could anyone please help me how to do it in Tomcat?

 

Regards

Nilesh.

 

 



Re: How to redirect URLs

2006-07-17 Thread Barrie Selack
I've been using this Url Rewrite Filter for several years now.. and it's
actively developed with new features.



Regards,
Barrie


>Dear All,
>
> 
>
>I have setup the Tomcat sever and Application, its working fine..
>
>but I got the long URL now I want to make it short
>
>Ex : 
>
> 
>
>http://www.abc.om/test/JSP/ondemand/rdtest/login.jsp
>
> 
>
>I want www.abc.com/forward  if  someone  types this URL in browser the site
>should 
>
>Redirect to above URL.
>
> 
>
>Could anyone please help me how to do it in Tomcat?
>
> 
>
>Regards
>
>Nilesh.
>
> 
>
> 
>



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat on a server

2006-07-17 Thread Alan Meyer

> is it possible to have one tomcat running on a server and allow
> multiple clients to execute their programs on the tomcat
> running on the server without affecting other clients
> execution.How can we configure tomcat for this purpose?

If I understand everything correctly, when Tomcat receives a
request it creates a new thread and runs the servlet in that
thread that matches the servlet or JSP requested.

Multiple requests can be processed concurrently, whether they are
requests for the same servlet or for different servlets.

Each thread will normally get its own stack for automatically
allocated variables and objects.  Depending upon how your program
is written however, it is possible for the threads to interfere
with each other if they use any static variables - so you must
use synchronization if it is required.

Alan

Alan Meyer
[EMAIL PROTECTED]

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to redirect URLs

2006-07-17 Thread Martin Gainty
I would suggest in the forward webapp web.xml that you update the 
welcome-file-list to point to your jsp
e.g.
web.xml contents of www.abc.com (forward webapp)


  /test/JSP/ondemand/rdtest/login.jsp


M-
*
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.



- Original Message - 
From: "Nilesh Shastrakar" <[EMAIL PROTECTED]>
To: 
Sent: Monday, July 17, 2006 8:59 AM
Subject: How to redirect URLs 


> Dear All,
> 
> 
> 
> I have setup the Tomcat sever and Application, its working fine..
> 
> but I got the long URL now I want to make it short
> 
> Ex : 
> 
> 
> 
> http://www.abc.om/test/JSP/ondemand/rdtest/login.jsp
> 
> 
> 
> I want www.abc.com/forward  if  someone  types this URL in browser the site
> should 
> 
> Redirect to above URL.
> 
> 
> 
> Could anyone please help me how to do it in Tomcat?
> 
> 
> 
> Regards
> 
> Nilesh.
> 
> 
> 
> 
> 
>

jsp compilation error in tomcat

2006-07-17 Thread Suba Suresh
If this is the wrong group to post this question let me know. I am new 
to jsp.


I am using Tomcat 5.5.17. I am using the jsp pages that came with 
lucene. When I am trying to access the results.jsp file on Tomcat I am 
getting the following error. I looked at the jsp code I am not able to 
find anything wrong. The code snippet is below the exception.


org.apache.jasper.JasperException: Unable to compile class for JSP

An error occurred at line: 120 in the jsp file: /results.jsp
Generated servlet error:
String literal is not properly closed by a double-quote



Document
Summary


<%
if ((startindex + maxpage) > hits.length()) {
thispage = hits.length() - startindex;  		 
  //set the max index to maxpage or last	  //actual 
search result whichever is less	

}
%>   

Any help or suggestion is appreciated.

thanks,
suba suresh.	 



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: multiple t hreads

2006-07-17 Thread Alan Meyer

> how to start multiple threads of a single instance of a tomcat
> where each thread runs a different application.is it possible
> with tomcat if so how

This can be done in the normal way.  Your servlet can start
separate threads, each of which runs somewhat independently.

However, there is a problem with this if you are intending to run
a thread in the background while returning information to the
client in the primary thread.

When I tried to do that on older versions of Tomcat (4.x), all
output to the user was suspended until _all_ of the threads
completed.  So you can't use this technique to run a batch job on
behalf of the user.  In fact, running a long batch job will time
out the webserver and abort the job.

What I did to overcome that was to spawn a new Java virtual
machine that ran apart from Tomcat.  To do this, I used an open
source routine by Marty Hall.  You can exec "java classname" or
exec a shell script or batch file that starts the JVM.

See: http://www.apl.jhu.edu/~hall/java/Exec.html

Alan


Alan Meyer
[EMAIL PROTECTED]

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat Not An App Server

2006-07-17 Thread Martin Gainty
Good Morning Mike-

I found this tutorial very instructive
http://www.hibernate.org/114.html
Nota Bene: do'nt copy (your webapp) jars to $TOMCAT_HOME/server/lib 
$TOMCAT_HOME/shared/lib or $TOMCAT_HOME/common/lib..

Anyone else??
M-
*
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.



- Original Message - 
From: "Mike Wannamaker" <[EMAIL PROTECTED]>
To: "'Tomcat Users List'" 
Sent: Monday, July 17, 2006 8:17 AM
Subject: RE: Tomcat Not An App Server


>I would love to just use JBoss, but there is a lot of political red-tape and
> we even have our own App Server, which too is not J2EE compliant.  It was
> probably developed before JBoss and the like.  We even had our own Web
> Container, but I've recently replaced it with Tomcat.
> 
> What I've done is ripped out our core services from our internal app server
> and provided an app server connector layer.  The idea is that we'll be able
> to plug into any app server like container.  Our own internal, JBoss,
> WebSphere, Tomcat???
> 
> That is the idea.  So we have customers that may have tomcat installed and
> perhaps they would like to utilize that instead of installing another app
> server.  So I would like to be able to somehow have Tomcat start our core
> services, much the way that JBoss would, before loading any web apps.
> 
> Does anyone have any ideas on how that could be accomplished. 
> 
> Mike Wannamaker
> 
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
> Sent: July 13, 2006 4:55 PM
> To: Tomcat Users List
> Subject: RE: Tomcat Not An App Server
> 
> How do your webapps communicate with the core services?
> 
> cheers,
> 
> David
> 
> 
>  |
> |
>  |   To:   "'Tomcat Users List'" 
> |
>  |   cc:
> |
>  |   Subject:  RE: Tomcat Not An App Server
> |
> 
> 
> 
> Sorry guys I didn't mean to offend anyone.  I know that Tomcat offers a lot
> but what I meant is as you said, it's not a full J2EE App Server, like
> JBoss, WebSphere ...
> 
> What I have is a large enterprise application that does have a web
> application.  In fact it has many.  These web apps rely on our core
> services
> to be running.  Within JBoss etc I can install this as an EAR or SAR and
> JBoss will start it.
> 
> I was wondering if there is anything in Tomcat like that, were my Core
> Services could get loaded/started before the tomcat web container loads the
> web apps.  Thus I wouldn't have to code anything into the web apps
> themselves to try and start it.
> 
> TIA
> 
> Mike Wannamaker
> 
> -Original Message-
> From: David Smith [mailto:[EMAIL PROTECTED]
> Sent: July 13, 2006 4:05 PM
> To: Tomcat Users List
> Subject: Re: Tomcat Not An App Server
> 
> Tomcat's not really an app server?  Geee really, I feel so inadequate
> now. :-(
> 
> Seriously, I think I've seen this religious war around here somewhere
> and it really depends on definition.  No, it's not a full J2EE
> container, but it's definitely an app server in my opinion.
> 
> Have you read the servlet spec and thought about the
> ServletContextListener for handling the start/shutdown of a component
> within your app?
> 
> --David
> 
> Mike Wannamaker wrote:
> 
>>I know that Tomcat is not really an App Server like JBoss etc... However,
> if
>>I had a component that was not a web application and I wanted to start it
>>inside tomcat how could I do that ?
>>
>>Is there some configuration file I would need to add something to in order
>>to have a component started and would I need to implement some Tomcat
>>interface to do it?
>>
>>TIA
>>Mike Wannamaker
>>
>>
>>-
>>To start a new topic, e-mail: users@tomcat.apache.org
>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>
> 
> 
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> 
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> -
> To start a new topic, e-mail: users@tomcat.apache.org

Re: Tomcat on a server

2006-07-17 Thread David Smith
Yes, but  Tomcat also pools threads and keeps them around between 
requests, recycling as necessary.  The servlet's themselves should avoid 
class instance variables unless they are reset to some known state at 
the beggining or end of every request for this reason.


--David

Alan Meyer wrote:


is it possible to have one tomcat running on a server and allow
multiple clients to execute their programs on the tomcat
running on the server without affecting other clients
execution.How can we configure tomcat for this purpose?
   



If I understand everything correctly, when Tomcat receives a
request it creates a new thread and runs the servlet in that
thread that matches the servlet or JSP requested.

Multiple requests can be processed concurrently, whether they are
requests for the same servlet or for different servlets.

Each thread will normally get its own stack for automatically
allocated variables and objects.  Depending upon how your program
is written however, it is possible for the threads to interfere
with each other if they use any static variables - so you must
use synchronization if it is required.

   Alan

Alan Meyer
[EMAIL PROTECTED]

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

 




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat on a server

2006-07-17 Thread Tim Lucia

> -Original Message-
> From: David Smith [mailto:[EMAIL PROTECTED]
> Sent: Monday, July 17, 2006 10:36 AM
> To: Tomcat Users List
> Subject: Re: Tomcat on a server
> 
> Yes, but  Tomcat also pools threads and keeps them around between
> requests, recycling as necessary.  The servlet's themselves should avoid
> class instance variables unless they are reset to some known state at
> the beggining or end of every request for this reason.

Class instance variables must be synchronized to be completely safe, or kept
in ThreadLocal objects.  Unless you implement the SingleThreadModel
interface, in which case Tomcat will not run concurrent threads through your
servlet.  Otherwise, two threads can easily get in each other's way
accessing instance variables.


Tim

> 
> --David
> 
> Alan Meyer wrote:
> 
> >>is it possible to have one tomcat running on a server and allow
> >>multiple clients to execute their programs on the tomcat
> >>running on the server without affecting other clients
> >>execution.How can we configure tomcat for this purpose?
> >>
> >>
> >
> >If I understand everything correctly, when Tomcat receives a
> >request it creates a new thread and runs the servlet in that
> >thread that matches the servlet or JSP requested.
> >
> >Multiple requests can be processed concurrently, whether they are
> >requests for the same servlet or for different servlets.
> >
> >Each thread will normally get its own stack for automatically
> >allocated variables and objects.  Depending upon how your program
> >is written however, it is possible for the threads to interfere
> >with each other if they use any static variables - so you must
> >use synchronization if it is required.
> >
> >Alan
> >
> >Alan Meyer
> >[EMAIL PROTECTED]
> >
> >__
> >Do You Yahoo!?
> >Tired of spam?  Yahoo! Mail has the best spam protection around
> >http://mail.yahoo.com
> >
> >-
> >To start a new topic, e-mail: users@tomcat.apache.org
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> 
> 
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat Not An App Server

2006-07-17 Thread Christopher Schultz
Mike,

> What I've done is ripped out our core services from our internal app server
> and provided an app server connector layer.  The idea is that we'll be able
> to plug into any app server like container.  Our own internal, JBoss,
> WebSphere, Tomcat???
> 
> That is the idea.  So we have customers that may have tomcat installed and
> perhaps they would like to utilize that instead of installing another app
> server.

That is perfectly reasonable.

Here's a suggestion: create a new webapp that doesn't actually have any
servlets. Just create a ContextListener that responds to START and STOP
requests, and use the listener to startup your services.

web.xml in each webapp can specify the order of servlets coming into
service... I'd imagine that Tomcat can be configured to load this
"services" webapp before all other webapps are loaded, so that those
services are available.

Would this meet your needs?

-chris




signature.asc
Description: OpenPGP digital signature


Re: multiple t hreads

2006-07-17 Thread Christopher Schultz
Alan,

> When I tried to [spawn a new thread on behalf of the remote user] on
> older versions of Tomcat (4.x), all
> output to the user was suspended until _all_ of the threads 
> completed.

This was probably due to mismanagement of the thread; a new thread will
run independently of your request handler thread, unless you call "join"
on that thread, which will block the current thread until the "joined"
thread completes.

> So you can't use this technique to run a batch job on 
> behalf of the user. In fact, running a long batch job will time out
> the webserver and abort the job.

You /can/ do a batch job on behalf of a user -- you just have to be
careful about it. For example, a user RELOADing the page many times will
spawn many threads on your server, which represents a potential DoS
risk. Resource management (such as threads) is usually best left to the
container unless you really know what you're doing.

> What I did to overcome that was to spawn a new Java virtual
> machine that ran apart from Tomcat.  To do this, I used an open
> source routine by Marty Hall.  You can exec "java classname" or
> exec a shell script or batch file that starts the JVM.

This is arguably worse than spawning a new thread to do this kind of
thing: you are subverting Java's protections and essentially allowing a
user to create a new process on your server.

You are better off creating a thread pool and re-using threads to
complete long-running operations. You can have your long-running thread
write some status to somewhere convenient (such as the user's session)
so that subsequent requests can display some kind of status information
each time. There's no need to worry about request timeouts, etc.

If possible, a better solution would be to actually run the batch job
/as a batch job/ -- i.e. store the job in a database/file/whatever, and
have another process come along and process that request as necessary.

This is all academic, since I think the original question was something
along the lines of "Does Tomcat actually work like an app server should?
with threads and everything? Does it?!".

-chris




signature.asc
Description: OpenPGP digital signature


Re: jsp compilation error in tomcat

2006-07-17 Thread Christopher Schultz
Suba,

> If this is the wrong group to post this question let me know. I am new
> to jsp.

This probably /is/ the wrong place to post a question about JSP,
although most of the readers of this group are well-versed.

> org.apache.jasper.JasperException: Unable to compile class for JSP
> 
> An error occurred at line: 120 in the jsp file: /results.jsp
> Generated servlet error:
> String literal is not properly closed by a double-quote

Your code snippet does not seem to contain the action error ("String
literal is not properly closed by a double-quote"). Try looking around
your code for a place where you tried to define a string, but forgot to
put a " at the end, like this:

String foo = "bar;

Note that it should be changed to this:

String foo = "bar";

Good luck,
-chris




signature.asc
Description: OpenPGP digital signature


Re: How to redirect URLs

2006-07-17 Thread Ibrahim . Siddiqui
Excuse me,
I don't mean to interrupt an existing thread but could someone tell me how 
to properly create anew thread for Tomcat related questions?
I have an immediate issue regarding tomcat performace monitoring.

Thanks
Ibrahim





"Nilesh Shastrakar" <[EMAIL PROTECTED]>
07/17/2006 05:59 AM
Please respond to "Tomcat Users List"

 
To: 
cc: 
Subject:How to redirect URLs


Dear All,

 

I have setup the Tomcat sever and Application, its working fine..

but I got the long URL now I want to make it short

Ex : 

 

http://www.abc.om/test/JSP/ondemand/rdtest/login.jsp

 

I want www.abc.com/forward  if  someone  types this URL in browser the 
site
should 

Redirect to above URL.

 

Could anyone please help me how to do it in Tomcat?

 

Regards

Nilesh.

 

 




**
This communication (including any attachments) may contain privileged or
confidential information intended for a specific individual and purpose, 
and is protected by law.  If you are not the intended recipient, you should
delete this communication and/or shred the materials and any attachments and
are hereby notified that any disclosure, copying, or distribution of this
communication, or the taking of any action based on it, is strictly prohibited.

Thank you.



RE: getting "?" instead of "¢"

2006-07-17 Thread Propes, Barry L
why don't you manually write it to your page and then just have the variable 
string or db value returned to the left of it within the jsp/servlet?

Is that not an option?

-Original Message-
From: Ronald Klop [mailto:[EMAIL PROTECTED]
Sent: Monday, July 17, 2006 6:45 AM
To: Tomcat Users List
Cc: David Delbecq
Subject: Re: getting "?" instead of "¢"


On Mon Jul 17 12:16:00 CEST 2006 Tomcat Users List  
wrote:
> This is not a matter of saving the jsp/html file on server with the good 
> charset, this is a matter of using the correct entity reference (¢) 
> which is supposed to be displayable by any html 2.0 compliant browser.
 There are more possibilities for the same thing. In the original question 
there is no mention about where the character is coming from. If it is 
something an user submits in a form and is stored in the database and then 
displayed in another webpage you can not asume the user to type ¢.

Ronald.
>  Ronald Klop wrote:
> > On Mon Jul 17 08:55:56 CEST 2006 Tomcat Users List 
> >  wrote:
> >> Hi All,
> >>
> >> I need some help from you. I need to display Cent(¢) symbol on 
> >> browser. I am
> >> getting ? symbol instead, what could be the problem, please explain me.
> >>
> >> Thank you.
> >>
> >> balaraju
> > Hello,
> >
> > Use the method ServletResponse.setCharacterEncoding("UTF-8") in a 
> > Servlet or contentType="text/html; charset=UTF-8" in a jsp page.
> > http://java.sun.com/products/jsp/syntax/1.2/syntaxref1210.html#15653
> >
> > But charset issues are tricky because all you files need to use a 
> > known charset. And if you use a database it needs to have a supported 
> > charset also.
> > If your editor saves files in iso-8859-1 the problem is already there 
> > and the browser wil never see the right character. So you need to 
> > debug where the character is correct for the last time.
> >
> > Ronald.
> >
> >
> 
> 
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


RE: How to redirect URLs

2006-07-17 Thread Propes, Barry L
Look in the web.xml file. Perhaps within servlet mapping is what you're looking 
for?
At least it's that way in Tomcat 4 series.

-Original Message-
From: Nilesh Shastrakar [mailto:[EMAIL PROTECTED]
Sent: Monday, July 17, 2006 8:00 AM
To: users@tomcat.apache.org
Subject: How to redirect URLs 


Dear All,

 

I have setup the Tomcat sever and Application, its working fine..

but I got the long URL now I want to make it short

Ex : 

 

http://www.abc.om/test/JSP/ondemand/rdtest/login.jsp

 

I want www.abc.com/forward  if  someone  types this URL in browser the site
should 

Redirect to above URL.

 

Could anyone please help me how to do it in Tomcat?

 

Regards

Nilesh.

 

 


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: NEW : Tomcat Performance Monitoring

2006-07-17 Thread Ibrahim . Siddiqui
Hello.
I'm creating a new thread regarding tomcat performance monitoring.
I am using Tomcat 4.0.6 in a Vignette content management application.
I need to monitor Tomcats performance real time.
Could someone suggest any answers?
Up till now, the only sure way was to do a kill -3 JVM-PID and get a 
thread dump,
which gives ample information but it is post-incident.
Are there any tools I can download and use or any commands someone can 
suggest?


Thanks,
Ibrahim
**
This communication (including any attachments) may contain privileged or
confidential information intended for a specific individual and purpose, 
and is protected by law.  If you are not the intended recipient, you should
delete this communication and/or shred the materials and any attachments and
are hereby notified that any disclosure, copying, or distribution of this
communication, or the taking of any action based on it, is strictly prohibited.

Thank you.



RE: NEW : Tomcat Performance Monitoring

2006-07-17 Thread Propes, Barry L
you might try looking within the server it's (Tomcat) residing on -- be it Unix 
or IIS. Either might have some non-sophisticated, built-in tools to help gauge 
it.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Monday, July 17, 2006 12:24 PM
To: users@tomcat.apache.org
Subject: Re: NEW : Tomcat Performance Monitoring


Hello.
I'm creating a new thread regarding tomcat performance monitoring.
I am using Tomcat 4.0.6 in a Vignette content management application.
I need to monitor Tomcats performance real time.
Could someone suggest any answers?
Up till now, the only sure way was to do a kill -3 JVM-PID and get a 
thread dump,
which gives ample information but it is post-incident.
Are there any tools I can download and use or any commands someone can 
suggest?


Thanks,
Ibrahim
**
This communication (including any attachments) may contain privileged or
confidential information intended for a specific individual and purpose, 
and is protected by law.  If you are not the intended recipient, you should
delete this communication and/or shred the materials and any attachments and
are hereby notified that any disclosure, copying, or distribution of this
communication, or the taking of any action based on it, is strictly prohibited.

Thank you.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: NEW : Tomcat Performance Monitoring

2006-07-17 Thread Ibrahim . Siddiqui
Only one I know of is "top" which gives me cpu/memory/disk usage;
wondering if there was freeware on the web or other commands anyone knew 
of?






"Propes, Barry L" <[EMAIL PROTECTED]>
07/17/2006 10:29 AM
Please respond to "Tomcat Users List"

 
To: "Tomcat Users List" 
cc: 
Subject:RE: NEW : Tomcat Performance Monitoring


you might try looking within the server it's (Tomcat) residing on -- be it 
Unix or IIS. Either might have some non-sophisticated, built-in tools to 
help gauge it.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Monday, July 17, 2006 12:24 PM
To: users@tomcat.apache.org
Subject: Re: NEW : Tomcat Performance Monitoring


Hello.
I'm creating a new thread regarding tomcat performance monitoring.
I am using Tomcat 4.0.6 in a Vignette content management application.
I need to monitor Tomcats performance real time.
Could someone suggest any answers?
Up till now, the only sure way was to do a kill -3 JVM-PID and get a 
thread dump,
which gives ample information but it is post-incident.
Are there any tools I can download and use or any commands someone can 
suggest?


Thanks,
Ibrahim
**
This communication (including any attachments) may contain privileged or
confidential information intended for a specific individual and purpose, 
and is protected by law.  If you are not the intended recipient, you 
should
delete this communication and/or shred the materials and any attachments 
and
are hereby notified that any disclosure, copying, or distribution of this
communication, or the taking of any action based on it, is strictly 
prohibited.

Thank you.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




**
This communication (including any attachments) may contain privileged or
confidential information intended for a specific individual and purpose, 
and is protected by law.  If you are not the intended recipient, you should
delete this communication and/or shred the materials and any attachments and
are hereby notified that any disclosure, copying, or distribution of this
communication, or the taking of any action based on it, is strictly prohibited.

Thank you.



RE: NEW : Tomcat Performance Monitoring

2006-07-17 Thread Sharma, Siddharth
You can use sar or vmstat
They give you system level health.
If you need inside the jvm health you can run the jvm in hprof mode. It adds
plenty of overhead so beware.
Try checking out
http://www.javaperformancetuning.com/resources.shtml#PerfTools 



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 17, 2006 1:35 PM
To: Tomcat Users List
Cc: Tomcat Users List
Subject: RE: NEW : Tomcat Performance Monitoring

Only one I know of is "top" which gives me cpu/memory/disk usage;
wondering if there was freeware on the web or other commands anyone knew 
of?






"Propes, Barry L" <[EMAIL PROTECTED]>
07/17/2006 10:29 AM
Please respond to "Tomcat Users List"

 
To: "Tomcat Users List" 
cc: 
Subject:RE: NEW : Tomcat Performance Monitoring


you might try looking within the server it's (Tomcat) residing on -- be it 
Unix or IIS. Either might have some non-sophisticated, built-in tools to 
help gauge it.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Monday, July 17, 2006 12:24 PM
To: users@tomcat.apache.org
Subject: Re: NEW : Tomcat Performance Monitoring


Hello.
I'm creating a new thread regarding tomcat performance monitoring.
I am using Tomcat 4.0.6 in a Vignette content management application.
I need to monitor Tomcats performance real time.
Could someone suggest any answers?
Up till now, the only sure way was to do a kill -3 JVM-PID and get a 
thread dump,
which gives ample information but it is post-incident.
Are there any tools I can download and use or any commands someone can 
suggest?


Thanks,
Ibrahim

**
This communication (including any attachments) may contain privileged or
confidential information intended for a specific individual and purpose, 
and is protected by law.  If you are not the intended recipient, you 
should
delete this communication and/or shred the materials and any attachments 
and
are hereby notified that any disclosure, copying, or distribution of this
communication, or the taking of any action based on it, is strictly 
prohibited.

Thank you.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





**
This communication (including any attachments) may contain privileged or
confidential information intended for a specific individual and purpose, 
and is protected by law.  If you are not the intended recipient, you should
delete this communication and/or shred the materials and any attachments and
are hereby notified that any disclosure, copying, or distribution of this
communication, or the taking of any action based on it, is strictly
prohibited.

Thank you.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: jsp compilation error in tomcat

2006-07-17 Thread Suba Suresh
Thanks. I thought it was something to do with Tomcat. I am compiling the 
file using NetBeans. It is progressing.


thanks,
suba suresh.

Christopher Schultz wrote:

Suba,



If this is the wrong group to post this question let me know. I am new
to jsp.



This probably /is/ the wrong place to post a question about JSP,
although most of the readers of this group are well-versed.



org.apache.jasper.JasperException: Unable to compile class for JSP

An error occurred at line: 120 in the jsp file: /results.jsp
Generated servlet error:
String literal is not properly closed by a double-quote



Your code snippet does not seem to contain the action error ("String
literal is not properly closed by a double-quote"). Try looking around
your code for a place where you tried to define a string, but forgot to
put a " at the end, like this:

String foo = "bar;

Note that it should be changed to this:

String foo = "bar";

Good luck,
-chris





-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: NEW : Tomcat Performance Monitoring

2006-07-17 Thread Ibrahim . Siddiqui
Sid,

I know of sar but how do I run it?
just by 'sar' command or any other parameters?
I can't afford overhead as this is production;
as to vmstat: just by command or anything else?


Thanks,
Ibrahim




"Sharma, Siddharth" <[EMAIL PROTECTED]>
07/17/2006 10:49 AM
Please respond to "Tomcat Users List"

 
To: Tomcat Users List 
cc: 
Subject:RE: NEW : Tomcat Performance Monitoring


You can use sar or vmstat
They give you system level health.
If you need inside the jvm health you can run the jvm in hprof mode. It 
adds
plenty of overhead so beware.
Try checking out
http://www.javaperformancetuning.com/resources.shtml#PerfTools 



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 17, 2006 1:35 PM
To: Tomcat Users List
Cc: Tomcat Users List
Subject: RE: NEW : Tomcat Performance Monitoring

Only one I know of is "top" which gives me cpu/memory/disk usage;
wondering if there was freeware on the web or other commands anyone knew 
of?






"Propes, Barry L" <[EMAIL PROTECTED]>
07/17/2006 10:29 AM
Please respond to "Tomcat Users List"

 
To: "Tomcat Users List" 
cc: 
Subject:RE: NEW : Tomcat Performance Monitoring


you might try looking within the server it's (Tomcat) residing on -- be it 

Unix or IIS. Either might have some non-sophisticated, built-in tools to 
help gauge it.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Monday, July 17, 2006 12:24 PM
To: users@tomcat.apache.org
Subject: Re: NEW : Tomcat Performance Monitoring


Hello.
I'm creating a new thread regarding tomcat performance monitoring.
I am using Tomcat 4.0.6 in a Vignette content management application.
I need to monitor Tomcats performance real time.
Could someone suggest any answers?
Up till now, the only sure way was to do a kill -3 JVM-PID and get a 
thread dump,
which gives ample information but it is post-incident.
Are there any tools I can download and use or any commands someone can 
suggest?


Thanks,
Ibrahim

**
This communication (including any attachments) may contain privileged or
confidential information intended for a specific individual and purpose, 
and is protected by law.  If you are not the intended recipient, you 
should
delete this communication and/or shred the materials and any attachments 
and
are hereby notified that any disclosure, copying, or distribution of this
communication, or the taking of any action based on it, is strictly 
prohibited.

Thank you.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





**
This communication (including any attachments) may contain privileged or
confidential information intended for a specific individual and purpose, 
and is protected by law.  If you are not the intended recipient, you 
should
delete this communication and/or shred the materials and any attachments 
and
are hereby notified that any disclosure, copying, or distribution of this
communication, or the taking of any action based on it, is strictly
prohibited.

Thank you.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




**
This communication (including any attachments) may contain privileged or
confidential information intended for a specific individual and purpose, 
and is protected by law.  If you are not the intended recipient, you should
delete this communication and/or shred the materials and any attachments and
are hereby notified that any disclosure, copying, or distribution of this
communication, or the taking of any action based on it, is strictly prohibited.

Thank you.



Re: NEW : Tomcat Performance Monitoring

2006-07-17 Thread Leon Rosenberg

if you want to monitor the tomcat itself check out lambdaprobe:
http://www.lambdaprobe.org/d/index.htm
Not sure it will work with 4.0.6

if you want to monitor the performance of your application check out moskito
http://moskito.anotheria.net
Needs jdk 1.5

regards
Leon

On 7/17/06, Sharma, Siddharth <[EMAIL PROTECTED]> wrote:

You can use sar or vmstat
They give you system level health.
If you need inside the jvm health you can run the jvm in hprof mode. It adds
plenty of overhead so beware.
Try checking out
http://www.javaperformancetuning.com/resources.shtml#PerfTools



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Monday, July 17, 2006 1:35 PM
To: Tomcat Users List
Cc: Tomcat Users List
Subject: RE: NEW : Tomcat Performance Monitoring

Only one I know of is "top" which gives me cpu/memory/disk usage;
wondering if there was freeware on the web or other commands anyone knew
of?






"Propes, Barry L" <[EMAIL PROTECTED]>
07/17/2006 10:29 AM
Please respond to "Tomcat Users List"


To: "Tomcat Users List" 
cc:
Subject:RE: NEW : Tomcat Performance Monitoring


you might try looking within the server it's (Tomcat) residing on -- be it
Unix or IIS. Either might have some non-sophisticated, built-in tools to
help gauge it.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Monday, July 17, 2006 12:24 PM
To: users@tomcat.apache.org
Subject: Re: NEW : Tomcat Performance Monitoring


Hello.
I'm creating a new thread regarding tomcat performance monitoring.
I am using Tomcat 4.0.6 in a Vignette content management application.
I need to monitor Tomcats performance real time.
Could someone suggest any answers?
Up till now, the only sure way was to do a kill -3 JVM-PID and get a
thread dump,
which gives ample information but it is post-incident.
Are there any tools I can download and use or any commands someone can
suggest?


Thanks,
Ibrahim

**
This communication (including any attachments) may contain privileged or
confidential information intended for a specific individual and purpose,
and is protected by law.  If you are not the intended recipient, you
should
delete this communication and/or shred the materials and any attachments
and
are hereby notified that any disclosure, copying, or distribution of this
communication, or the taking of any action based on it, is strictly
prohibited.

Thank you.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





**
This communication (including any attachments) may contain privileged or
confidential information intended for a specific individual and purpose,
and is protected by law.  If you are not the intended recipient, you should
delete this communication and/or shred the materials and any attachments and
are hereby notified that any disclosure, copying, or distribution of this
communication, or the taking of any action based on it, is strictly
prohibited.

Thank you.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



How to log and debug Realm Authentication in 5.5.17?

2006-07-17 Thread David Erickson
Hi I am running two hosts under an engine in Tomcat 5.5.17, I have one
webapp on each host and am having some problems with authentication on both.
Each has a jdbc realm being deployed by a context.xml file in the META-INF
directory of the webapp.  

My question is, how can I log and debug the deployment of each realm and its
properties, and subsequent login attempts/rejections, and their JDBC SQL
queries etc?

I am using log4j for logging with the below basic setup, and have been
unable to get any information:

log4j.appender.R=org.apache.log4j.RollingFileAppender 
log4j.appender.R.File=${catalina.home}/logs/tomcat.log 
log4j.appender.R.MaxFileSize=10MB 
log4j.appender.R.MaxBackupIndex=10 
log4j.appender.R.layout=org.apache.log4j.PatternLayout 
log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n 

log4j.appender.localhost=org.apache.log4j.RollingFileAppender 
log4j.appender.localhost.File=${catalina.home}/logs/localhost.log
log4j.appender.localhost.MaxFileSize=10MB 
log4j.appender.localhost.MaxBackupIndex=10 
log4j.appender.localhost.layout=org.apache.log4j.PatternLayout 
log4j.appender.localhost.layout.ConversionPattern=%p %t %c - %m%n 

log4j.rootLogger=ERROR, R 
log4j.logger.org.apache=ERROR, R
log4j.logger.org.apache.catalina.realm=DEBUG,R

log4j.logger.org.apache.[Catalina].[localhost]=DEBUG, localhost

Thanks,
David

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.10.1/389 - Release Date: 7/14/2006
 


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: NEW : Tomcat Performance Monitoring

2006-07-17 Thread Sharma, Siddharth
Pls look at the man pages and decide what you want.
You should probably pipe the output of these commands to a log file, so it
is running all the time and logging to a file and then whoever needs to see
this info, simply tails the log rather than running another sar or vmstat
session.

Ex. Vmstat gives you a bunch of information such as CPU idle % time, system
and user CPU utilization, paging, I/O Wait etc. You can pick and choose.



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 17, 2006 2:01 PM
To: Tomcat Users List
Cc: Tomcat Users List
Subject: RE: NEW : Tomcat Performance Monitoring

Sid,

I know of sar but how do I run it?
just by 'sar' command or any other parameters?
I can't afford overhead as this is production;
as to vmstat: just by command or anything else?


Thanks,
Ibrahim




"Sharma, Siddharth" <[EMAIL PROTECTED]>
07/17/2006 10:49 AM
Please respond to "Tomcat Users List"

 
To: Tomcat Users List 
cc: 
Subject:RE: NEW : Tomcat Performance Monitoring


You can use sar or vmstat
They give you system level health.
If you need inside the jvm health you can run the jvm in hprof mode. It 
adds
plenty of overhead so beware.
Try checking out
http://www.javaperformancetuning.com/resources.shtml#PerfTools 



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 17, 2006 1:35 PM
To: Tomcat Users List
Cc: Tomcat Users List
Subject: RE: NEW : Tomcat Performance Monitoring

Only one I know of is "top" which gives me cpu/memory/disk usage;
wondering if there was freeware on the web or other commands anyone knew 
of?






"Propes, Barry L" <[EMAIL PROTECTED]>
07/17/2006 10:29 AM
Please respond to "Tomcat Users List"

 
To: "Tomcat Users List" 
cc: 
Subject:RE: NEW : Tomcat Performance Monitoring


you might try looking within the server it's (Tomcat) residing on -- be it 

Unix or IIS. Either might have some non-sophisticated, built-in tools to 
help gauge it.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Monday, July 17, 2006 12:24 PM
To: users@tomcat.apache.org
Subject: Re: NEW : Tomcat Performance Monitoring


Hello.
I'm creating a new thread regarding tomcat performance monitoring.
I am using Tomcat 4.0.6 in a Vignette content management application.
I need to monitor Tomcats performance real time.
Could someone suggest any answers?
Up till now, the only sure way was to do a kill -3 JVM-PID and get a 
thread dump,
which gives ample information but it is post-incident.
Are there any tools I can download and use or any commands someone can 
suggest?


Thanks,
Ibrahim

**
This communication (including any attachments) may contain privileged or
confidential information intended for a specific individual and purpose, 
and is protected by law.  If you are not the intended recipient, you 
should
delete this communication and/or shred the materials and any attachments 
and
are hereby notified that any disclosure, copying, or distribution of this
communication, or the taking of any action based on it, is strictly 
prohibited.

Thank you.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





**
This communication (including any attachments) may contain privileged or
confidential information intended for a specific individual and purpose, 
and is protected by law.  If you are not the intended recipient, you 
should
delete this communication and/or shred the materials and any attachments 
and
are hereby notified that any disclosure, copying, or distribution of this
communication, or the taking of any action based on it, is strictly
prohibited.

Thank you.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





**
This communication (including any attachments) may contain privileged or
confidential information intended for a specific individual and purpose, 
and is protected by law.  If you are not the intended recipient, you should
delete this communication and/or shred the materials and any attachments and
are hereby notified that any disclosure, copying, or distribution of this
communication, or the taking of any action based on it, is strictly
prohibited.

Thank you.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands,

tomcat4 and balancer app

2006-07-17 Thread Derek McEachern

Has anyone successfully run the balancer web app that ships with
tomcat 5.0or higher to work with tomcat4?

So far I haven't been able to make it work and was wondering if it even
works in tomcat4.

Thanks,
Derek


RE: NEW : Tomcat Performance Monitoring

2006-07-17 Thread Ibrahim . Siddiqui
does sar effect the system as in imposing an overload?





"Sharma, Siddharth" <[EMAIL PROTECTED]>
07/17/2006 11:30 AM
Please respond to "Tomcat Users List"

 
To: Tomcat Users List 
cc: 
Subject:RE: NEW : Tomcat Performance Monitoring


Pls look at the man pages and decide what you want.
You should probably pipe the output of these commands to a log file, so it
is running all the time and logging to a file and then whoever needs to 
see
this info, simply tails the log rather than running another sar or vmstat
session.

Ex. Vmstat gives you a bunch of information such as CPU idle % time, 
system
and user CPU utilization, paging, I/O Wait etc. You can pick and choose.



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 17, 2006 2:01 PM
To: Tomcat Users List
Cc: Tomcat Users List
Subject: RE: NEW : Tomcat Performance Monitoring

Sid,

I know of sar but how do I run it?
just by 'sar' command or any other parameters?
I can't afford overhead as this is production;
as to vmstat: just by command or anything else?


Thanks,
Ibrahim




"Sharma, Siddharth" <[EMAIL PROTECTED]>
07/17/2006 10:49 AM
Please respond to "Tomcat Users List"

 
To: Tomcat Users List 
cc: 
Subject:RE: NEW : Tomcat Performance Monitoring


You can use sar or vmstat
They give you system level health.
If you need inside the jvm health you can run the jvm in hprof mode. It 
adds
plenty of overhead so beware.
Try checking out
http://www.javaperformancetuning.com/resources.shtml#PerfTools 



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 17, 2006 1:35 PM
To: Tomcat Users List
Cc: Tomcat Users List
Subject: RE: NEW : Tomcat Performance Monitoring

Only one I know of is "top" which gives me cpu/memory/disk usage;
wondering if there was freeware on the web or other commands anyone knew 
of?






"Propes, Barry L" <[EMAIL PROTECTED]>
07/17/2006 10:29 AM
Please respond to "Tomcat Users List"

 
To: "Tomcat Users List" 
cc: 
Subject:RE: NEW : Tomcat Performance Monitoring


you might try looking within the server it's (Tomcat) residing on -- be it 


Unix or IIS. Either might have some non-sophisticated, built-in tools to 
help gauge it.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Monday, July 17, 2006 12:24 PM
To: users@tomcat.apache.org
Subject: Re: NEW : Tomcat Performance Monitoring


Hello.
I'm creating a new thread regarding tomcat performance monitoring.
I am using Tomcat 4.0.6 in a Vignette content management application.
I need to monitor Tomcats performance real time.
Could someone suggest any answers?
Up till now, the only sure way was to do a kill -3 JVM-PID and get a 
thread dump,
which gives ample information but it is post-incident.
Are there any tools I can download and use or any commands someone can 
suggest?


Thanks,
Ibrahim

**
This communication (including any attachments) may contain privileged or
confidential information intended for a specific individual and purpose, 
and is protected by law.  If you are not the intended recipient, you 
should
delete this communication and/or shred the materials and any attachments 
and
are hereby notified that any disclosure, copying, or distribution of this
communication, or the taking of any action based on it, is strictly 
prohibited.

Thank you.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





**
This communication (including any attachments) may contain privileged or
confidential information intended for a specific individual and purpose, 
and is protected by law.  If you are not the intended recipient, you 
should
delete this communication and/or shred the materials and any attachments 
and
are hereby notified that any disclosure, copying, or distribution of this
communication, or the taking of any action based on it, is strictly
prohibited.

Thank you.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





**
This communication (including any attachments) may contain privileged or
confidential information intended for a specific individual and purpose, 
and is protected by law.  If you are not the intended recipient, you 
should
delete this communication and/or shred the materials and any attachments 
and
are hereby notified that any disclosure, copying, or distribution of this
comm

RE: Tomcat Not An App Server

2006-07-17 Thread Mike Wannamaker

I believe you and Martin are saying the same thing.  I could do that however
I would need my jar file to be in $TOMCAT_HOME/shared/lib probably.  I can't
have each different web app starting new instances of the services.
Services are only started once be Tomcat Server.

I thought maybe it was possible to add something to server.xml to get a
component to startup.  Perhaps I'd have it implement a Tomcat Interface but
I could do that and then have it only start once per Tomcat Instance.

Either way I need my jar in $TOMCAT_HOME/shared/lib.  That is the one I put
it in right?  Not $TOMCAT_HOME/common/lib?

Mike Wannamaker

-Original Message-
From: Christopher Schultz [mailto:[EMAIL PROTECTED] 
Sent: July 17, 2006 12:39 PM
To: Tomcat Users List
Subject: Re: Tomcat Not An App Server

Mike,

> What I've done is ripped out our core services from our internal app
server
> and provided an app server connector layer.  The idea is that we'll be
able
> to plug into any app server like container.  Our own internal, JBoss,
> WebSphere, Tomcat???
> 
> That is the idea.  So we have customers that may have tomcat installed and
> perhaps they would like to utilize that instead of installing another app
> server.

That is perfectly reasonable.

Here's a suggestion: create a new webapp that doesn't actually have any
servlets. Just create a ContextListener that responds to START and STOP
requests, and use the listener to startup your services.

web.xml in each webapp can specify the order of servlets coming into
service... I'd imagine that Tomcat can be configured to load this
"services" webapp before all other webapps are loaded, so that those
services are available.

Would this meet your needs?

-chris




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: NEW : Tomcat Performance Monitoring

2006-07-17 Thread Sharma, Siddharth
Everything does. You have to figure out how much it adds in your
environment.
I'd be surprised if it adds even 1% as long as you do not have a
ridiculously low delay.


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 17, 2006 2:41 PM
To: Tomcat Users List
Cc: Tomcat Users List
Subject: RE: NEW : Tomcat Performance Monitoring

does sar effect the system as in imposing an overload?





"Sharma, Siddharth" <[EMAIL PROTECTED]>
07/17/2006 11:30 AM
Please respond to "Tomcat Users List"

 
To: Tomcat Users List 
cc: 
Subject:RE: NEW : Tomcat Performance Monitoring


Pls look at the man pages and decide what you want.
You should probably pipe the output of these commands to a log file, so it
is running all the time and logging to a file and then whoever needs to 
see
this info, simply tails the log rather than running another sar or vmstat
session.

Ex. Vmstat gives you a bunch of information such as CPU idle % time, 
system
and user CPU utilization, paging, I/O Wait etc. You can pick and choose.



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 17, 2006 2:01 PM
To: Tomcat Users List
Cc: Tomcat Users List
Subject: RE: NEW : Tomcat Performance Monitoring

Sid,

I know of sar but how do I run it?
just by 'sar' command or any other parameters?
I can't afford overhead as this is production;
as to vmstat: just by command or anything else?


Thanks,
Ibrahim




"Sharma, Siddharth" <[EMAIL PROTECTED]>
07/17/2006 10:49 AM
Please respond to "Tomcat Users List"

 
To: Tomcat Users List 
cc: 
Subject:RE: NEW : Tomcat Performance Monitoring


You can use sar or vmstat
They give you system level health.
If you need inside the jvm health you can run the jvm in hprof mode. It 
adds
plenty of overhead so beware.
Try checking out
http://www.javaperformancetuning.com/resources.shtml#PerfTools 



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 17, 2006 1:35 PM
To: Tomcat Users List
Cc: Tomcat Users List
Subject: RE: NEW : Tomcat Performance Monitoring

Only one I know of is "top" which gives me cpu/memory/disk usage;
wondering if there was freeware on the web or other commands anyone knew 
of?






"Propes, Barry L" <[EMAIL PROTECTED]>
07/17/2006 10:29 AM
Please respond to "Tomcat Users List"

 
To: "Tomcat Users List" 
cc: 
Subject:RE: NEW : Tomcat Performance Monitoring


you might try looking within the server it's (Tomcat) residing on -- be it 


Unix or IIS. Either might have some non-sophisticated, built-in tools to 
help gauge it.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Monday, July 17, 2006 12:24 PM
To: users@tomcat.apache.org
Subject: Re: NEW : Tomcat Performance Monitoring


Hello.
I'm creating a new thread regarding tomcat performance monitoring.
I am using Tomcat 4.0.6 in a Vignette content management application.
I need to monitor Tomcats performance real time.
Could someone suggest any answers?
Up till now, the only sure way was to do a kill -3 JVM-PID and get a 
thread dump,
which gives ample information but it is post-incident.
Are there any tools I can download and use or any commands someone can 
suggest?


Thanks,
Ibrahim

**
This communication (including any attachments) may contain privileged or
confidential information intended for a specific individual and purpose, 
and is protected by law.  If you are not the intended recipient, you 
should
delete this communication and/or shred the materials and any attachments 
and
are hereby notified that any disclosure, copying, or distribution of this
communication, or the taking of any action based on it, is strictly 
prohibited.

Thank you.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





**
This communication (including any attachments) may contain privileged or
confidential information intended for a specific individual and purpose, 
and is protected by law.  If you are not the intended recipient, you 
should
delete this communication and/or shred the materials and any attachments 
and
are hereby notified that any disclosure, copying, or distribution of this
communication, or the taking of any action based on it, is strictly
prohibited.

Thank you.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





**
Thi

RE: NEW : Tomcat Performance Monitoring

2006-07-17 Thread Ibrahim . Siddiqui
but would sar & vmstat give me monitoring info on tomcat?
or just system usage or webserver usage?






"Sharma, Siddharth" <[EMAIL PROTECTED]>
07/17/2006 11:51 AM
Please respond to "Tomcat Users List"

 
To: Tomcat Users List 
cc: 
Subject:RE: NEW : Tomcat Performance Monitoring


Everything does. You have to figure out how much it adds in your
environment.
I'd be surprised if it adds even 1% as long as you do not have a
ridiculously low delay.


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 17, 2006 2:41 PM
To: Tomcat Users List
Cc: Tomcat Users List
Subject: RE: NEW : Tomcat Performance Monitoring

does sar effect the system as in imposing an overload?





"Sharma, Siddharth" <[EMAIL PROTECTED]>
07/17/2006 11:30 AM
Please respond to "Tomcat Users List"

 
To: Tomcat Users List 
cc: 
Subject:RE: NEW : Tomcat Performance Monitoring


Pls look at the man pages and decide what you want.
You should probably pipe the output of these commands to a log file, so it
is running all the time and logging to a file and then whoever needs to 
see
this info, simply tails the log rather than running another sar or vmstat
session.

Ex. Vmstat gives you a bunch of information such as CPU idle % time, 
system
and user CPU utilization, paging, I/O Wait etc. You can pick and choose.



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 17, 2006 2:01 PM
To: Tomcat Users List
Cc: Tomcat Users List
Subject: RE: NEW : Tomcat Performance Monitoring

Sid,

I know of sar but how do I run it?
just by 'sar' command or any other parameters?
I can't afford overhead as this is production;
as to vmstat: just by command or anything else?


Thanks,
Ibrahim




"Sharma, Siddharth" <[EMAIL PROTECTED]>
07/17/2006 10:49 AM
Please respond to "Tomcat Users List"

 
To: Tomcat Users List 
cc: 
Subject:RE: NEW : Tomcat Performance Monitoring


You can use sar or vmstat
They give you system level health.
If you need inside the jvm health you can run the jvm in hprof mode. It 
adds
plenty of overhead so beware.
Try checking out
http://www.javaperformancetuning.com/resources.shtml#PerfTools 



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 17, 2006 1:35 PM
To: Tomcat Users List
Cc: Tomcat Users List
Subject: RE: NEW : Tomcat Performance Monitoring

Only one I know of is "top" which gives me cpu/memory/disk usage;
wondering if there was freeware on the web or other commands anyone knew 
of?






"Propes, Barry L" <[EMAIL PROTECTED]>
07/17/2006 10:29 AM
Please respond to "Tomcat Users List"

 
To: "Tomcat Users List" 
cc: 
Subject:RE: NEW : Tomcat Performance Monitoring


you might try looking within the server it's (Tomcat) residing on -- be it 



Unix or IIS. Either might have some non-sophisticated, built-in tools to 
help gauge it.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Monday, July 17, 2006 12:24 PM
To: users@tomcat.apache.org
Subject: Re: NEW : Tomcat Performance Monitoring


Hello.
I'm creating a new thread regarding tomcat performance monitoring.
I am using Tomcat 4.0.6 in a Vignette content management application.
I need to monitor Tomcats performance real time.
Could someone suggest any answers?
Up till now, the only sure way was to do a kill -3 JVM-PID and get a 
thread dump,
which gives ample information but it is post-incident.
Are there any tools I can download and use or any commands someone can 
suggest?


Thanks,
Ibrahim

**
This communication (including any attachments) may contain privileged or
confidential information intended for a specific individual and purpose, 
and is protected by law.  If you are not the intended recipient, you 
should
delete this communication and/or shred the materials and any attachments 
and
are hereby notified that any disclosure, copying, or distribution of this
communication, or the taking of any action based on it, is strictly 
prohibited.

Thank you.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





**
This communication (including any attachments) may contain privileged or
confidential information intended for a specific individual and purpose, 
and is protected by law.  If you are not the intended recipient, you 
should
delete this communication and/or shred the materials and any attachments 
and
are hereby notified that any disclosure, copying, or distribution of this
communication, or the taking of any action based on it, is strictly
prohibite

RE: NEW : Tomcat Performance Monitoring

2006-07-17 Thread Sharma, Siddharth
Nope. No tomcat info. System-info only


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 17, 2006 2:53 PM
To: Tomcat Users List
Cc: Tomcat Users List
Subject: RE: NEW : Tomcat Performance Monitoring

but would sar & vmstat give me monitoring info on tomcat?
or just system usage or webserver usage?






"Sharma, Siddharth" <[EMAIL PROTECTED]>
07/17/2006 11:51 AM
Please respond to "Tomcat Users List"

 
To: Tomcat Users List 
cc: 
Subject:RE: NEW : Tomcat Performance Monitoring


Everything does. You have to figure out how much it adds in your
environment.
I'd be surprised if it adds even 1% as long as you do not have a
ridiculously low delay.


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 17, 2006 2:41 PM
To: Tomcat Users List
Cc: Tomcat Users List
Subject: RE: NEW : Tomcat Performance Monitoring

does sar effect the system as in imposing an overload?





"Sharma, Siddharth" <[EMAIL PROTECTED]>
07/17/2006 11:30 AM
Please respond to "Tomcat Users List"

 
To: Tomcat Users List 
cc: 
Subject:RE: NEW : Tomcat Performance Monitoring


Pls look at the man pages and decide what you want.
You should probably pipe the output of these commands to a log file, so it
is running all the time and logging to a file and then whoever needs to 
see
this info, simply tails the log rather than running another sar or vmstat
session.

Ex. Vmstat gives you a bunch of information such as CPU idle % time, 
system
and user CPU utilization, paging, I/O Wait etc. You can pick and choose.



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 17, 2006 2:01 PM
To: Tomcat Users List
Cc: Tomcat Users List
Subject: RE: NEW : Tomcat Performance Monitoring

Sid,

I know of sar but how do I run it?
just by 'sar' command or any other parameters?
I can't afford overhead as this is production;
as to vmstat: just by command or anything else?


Thanks,
Ibrahim




"Sharma, Siddharth" <[EMAIL PROTECTED]>
07/17/2006 10:49 AM
Please respond to "Tomcat Users List"

 
To: Tomcat Users List 
cc: 
Subject:RE: NEW : Tomcat Performance Monitoring


You can use sar or vmstat
They give you system level health.
If you need inside the jvm health you can run the jvm in hprof mode. It 
adds
plenty of overhead so beware.
Try checking out
http://www.javaperformancetuning.com/resources.shtml#PerfTools 



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 17, 2006 1:35 PM
To: Tomcat Users List
Cc: Tomcat Users List
Subject: RE: NEW : Tomcat Performance Monitoring

Only one I know of is "top" which gives me cpu/memory/disk usage;
wondering if there was freeware on the web or other commands anyone knew 
of?






"Propes, Barry L" <[EMAIL PROTECTED]>
07/17/2006 10:29 AM
Please respond to "Tomcat Users List"

 
To: "Tomcat Users List" 
cc: 
Subject:RE: NEW : Tomcat Performance Monitoring


you might try looking within the server it's (Tomcat) residing on -- be it 



Unix or IIS. Either might have some non-sophisticated, built-in tools to 
help gauge it.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Monday, July 17, 2006 12:24 PM
To: users@tomcat.apache.org
Subject: Re: NEW : Tomcat Performance Monitoring


Hello.
I'm creating a new thread regarding tomcat performance monitoring.
I am using Tomcat 4.0.6 in a Vignette content management application.
I need to monitor Tomcats performance real time.
Could someone suggest any answers?
Up till now, the only sure way was to do a kill -3 JVM-PID and get a 
thread dump,
which gives ample information but it is post-incident.
Are there any tools I can download and use or any commands someone can 
suggest?


Thanks,
Ibrahim

**
This communication (including any attachments) may contain privileged or
confidential information intended for a specific individual and purpose, 
and is protected by law.  If you are not the intended recipient, you 
should
delete this communication and/or shred the materials and any attachments 
and
are hereby notified that any disclosure, copying, or distribution of this
communication, or the taking of any action based on it, is strictly 
prohibited.

Thank you.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





**
This communication (including any attachments) may contain privileged or
confidential information intended for a specific individual and purpose, 
and is protected by law.  If you are not the intended rec

Re: Tomcat Not An App Server

2006-07-17 Thread Christopher Schultz
Mike,

>> Here's a suggestion: create a new webapp that doesn't actually have any
>> servlets. Just create a ContextListener that responds to START and STOP
>> requests, and use the listener to startup your services.
>
> I believe you and Martin are saying the same thing.  I could do that however
> I would need my jar file to be in $TOMCAT_HOME/shared/lib probably.  I can't
> have each different web app starting new instances of the services.
> Services are only started once be Tomcat Server.

No, in fact it's better if you /don't/ have your JAR file in
TOMCAT_HOME/shared/lib: you want a completely separate webapp. You can
even put it into a WAR file and drop it into the auto-deploy directory
if you have Tomcat to auto-deploy WAR files.

In this way, you have a completely portable webapp that simply does not
have any servlets running within it. The only trick is to get Tomcat to
load that webapp /before/ any other webapps start.

One option is to startup a separate instance of Tomcat for the purposes
of only hosting this services webapp, and run your other webapps however
you wish. You simply have to start the services instance of Tomcat
before starting any other instances. This strategy also allows you to
bring your services up and down (possibly for an upgrade) without
disturbing the dependent webapps.

Don't let the term "webapp" get in the way... your services (JMS or
something like it?) will be available just as you are accustomed to
having them. You are only adding a thin layer (the ContextListener) to
get them started within Tomcat -- because it does not have some of the
features aforementioned app servers.

-chris




signature.asc
Description: OpenPGP digital signature


Re: Tomcat Not An App Server

2006-07-17 Thread Timothy Collett

On Jul 17, 2006, at 2:43 PM, Mike Wannamaker wrote:

I thought maybe it was possible to add something to server.xml to  
get a
component to startup.  Perhaps I'd have it implement a Tomcat  
Interface but

I could do that and then have it only start once per Tomcat Instance.

Either way I need my jar in $TOMCAT_HOME/shared/lib.  That is the  
one I put

it in right?  Not $TOMCAT_HOME/common/lib?


If you want something to start before all the other webapps, my  
feeling is it would need to do *something* with the container itself,  
and thus would need to be in common/lib.


If you are willing to modify server.xml, then you can probably write  
an implementation of Host or Engine (whether or not it's a subclass  
of StandardHost or StandardEngine as I suggested before), and put its  
class name in server.xml, and that should do what you want.  You  
might be able to do the same with a Valve: I'm not sure as I've never  
worked with Valves.


Either way, it should, indeed, just be a jar you drop into common/lib  
and an attribute you add/change in server.xml.


Timothy Collett

--

Error: No keyboard.
Press F1 to continue.
(It's some kind of Zen)
~haiku~


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat Not An App Server

2006-07-17 Thread Martin Gainty
commons/lib is for CATALINA specific implementations as well as any jar'ed 
versions of new Jasper compiler(s)
http://tomcat.apache.org/tomcat-5.5-doc/jasper-howto.html

Can you provide a quick overview of the desired outcome for this effort

Martin --
*
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.



- Original Message - 
From: "Timothy Collett" <[EMAIL PROTECTED]>
To: "Tomcat Users List" 
Sent: Monday, July 17, 2006 3:19 PM
Subject: Re: Tomcat Not An App Server


> On Jul 17, 2006, at 2:43 PM, Mike Wannamaker wrote:
> 
>> I thought maybe it was possible to add something to server.xml to  
>> get a
>> component to startup.  Perhaps I'd have it implement a Tomcat  
>> Interface but
>> I could do that and then have it only start once per Tomcat Instance.
>>
>> Either way I need my jar in $TOMCAT_HOME/shared/lib.  That is the  
>> one I put
>> it in right?  Not $TOMCAT_HOME/common/lib?
> 
> If you want something to start before all the other webapps, my  
> feeling is it would need to do *something* with the container itself,  
> and thus would need to be in common/lib.
> 
> If you are willing to modify server.xml, then you can probably write  
> an implementation of Host or Engine (whether or not it's a subclass  
> of StandardHost or StandardEngine as I suggested before), and put its  
> class name in server.xml, and that should do what you want.  You  
> might be able to do the same with a Valve: I'm not sure as I've never  
> worked with Valves.
> 
> Either way, it should, indeed, just be a jar you drop into common/lib  
> and an attribute you add/change in server.xml.
> 
> Timothy Collett
> 
> --
> 
> Error: No keyboard.
> Press F1 to continue.
> (It's some kind of Zen)
> ~haiku~
> 
> 
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

Re: Tomcat Not An App Server

2006-07-17 Thread Timothy Collett

On Jul 17, 2006, at 4:06 PM, Martin Gainty wrote:

commons/lib is for CATALINA specific implementations as well as any  
jar'ed versions of new Jasper compiler(s)

http://tomcat.apache.org/tomcat-5.5-doc/jasper-howto.html


I was given the impression that it was more generally the place to  
put anything that is required by the container itself, as well as the  
webapps.


Can you provide a quick overview of the desired outcome for this  
effort


The desired outcome is to have something that can start up as soon as  
Tomcat is started, rather than on the first client request, and not  
be attached to any particular webapp.  At least, that's how I see it.


But, as I've said before, I'm relatively new at this, and am willing  
to be contradicted, as long as I'm also educated ;-)


Timothy Collett

--

Stay the patient course
Of little worth is your ire
The network is down
~haiku~


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Shared code but different pages on different virtual hosts?

2006-07-17 Thread Harris, Thomas

I have been trying to determine how to configure Tomcat 5.5.17 to have a
shared appBase on multiple webapps, but have a different set of JSPs for
each web app. I've followed the Wiki's CreateVirtualHosts page to
configure multiple webapps that use exactly the same WAR file. But, I
would like to share the Java, but supply a different docBase for each
site. Is this possible?

Reference:
http://wiki.apache.org/tomcat/CreateVirtualHosts

Thanks!

Tom Harris

"This communication is intended solely for the addressee and is confidential 
and not for third party unauthorized distribution"

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to log and debug Realm Authentication in 5.5.17?

2006-07-17 Thread Martin Gainty
Looks like you'll have to implement a customised JDBCSecurityRealm such as what 
you see here

http://www.trifork.com/package/eos/external/static/T4/doc-4.1/documentation/userdoc/html/ch32.html
overriding the important access points such as all access(es) by implementing 
your own override of JDBCSecurityRealm
to (possibly your own base class) underlying principal javax.security.Principal

so when your own JDBCSecurityRealm authenticates the supplied username/password 
via the method
public Principal authenticate(String userName, String password)
throws LoginException {

your catch clause for 'LoginException' would write to Log4j..

HTH,
Martin--
*
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.



- Original Message - 
From: "David Erickson" <[EMAIL PROTECTED]>
To: 
Sent: Monday, July 17, 2006 2:15 PM
Subject: How to log and debug Realm Authentication in 5.5.17?


> Hi I am running two hosts under an engine in Tomcat 5.5.17, I have one
> webapp on each host and am having some problems with authentication on both.
> Each has a jdbc realm being deployed by a context.xml file in the META-INF
> directory of the webapp.  
> 
> My question is, how can I log and debug the deployment of each realm and its
> properties, and subsequent login attempts/rejections, and their JDBC SQL
> queries etc?
> 
> I am using log4j for logging with the below basic setup, and have been
> unable to get any information:
> 
> log4j.appender.R=org.apache.log4j.RollingFileAppender 
> log4j.appender.R.File=${catalina.home}/logs/tomcat.log 
> log4j.appender.R.MaxFileSize=10MB 
> log4j.appender.R.MaxBackupIndex=10 
> log4j.appender.R.layout=org.apache.log4j.PatternLayout 
> log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n 
> 
> log4j.appender.localhost=org.apache.log4j.RollingFileAppender 
> log4j.appender.localhost.File=${catalina.home}/logs/localhost.log
> log4j.appender.localhost.MaxFileSize=10MB 
> log4j.appender.localhost.MaxBackupIndex=10 
> log4j.appender.localhost.layout=org.apache.log4j.PatternLayout 
> log4j.appender.localhost.layout.ConversionPattern=%p %t %c - %m%n 
> 
> log4j.rootLogger=ERROR, R 
> log4j.logger.org.apache=ERROR, R
> log4j.logger.org.apache.catalina.realm=DEBUG,R
> 
> log4j.logger.org.apache.[Catalina].[localhost]=DEBUG, localhost
> 
> Thanks,
> David
> 
> -- 
> No virus found in this outgoing message.
> Checked by AVG Free Edition.
> Version: 7.1.394 / Virus Database: 268.10.1/389 - Release Date: 7/14/2006
> 
> 
> 
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

downloading tomcat

2006-07-17 Thread Pratap Parne
I just wanted to download a tomcat 5.5 but i found
there are different downloads like core,deployer.how
should  i select the one suitable for me and are there
any different installation steps to install tomcat on
windows server platforms.

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Unable to run tomcat

2006-07-17 Thread Martin Gainty
The connector (essentially the configured port of the connector) is already 
'bound' on Port 9000
You want to determine who is bound on that port such as 
ps -ef | grep 9000
and eradicate the process using the Pid or 
for a more complete solution 
cycle the Tomcat server

M-
*
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.



- Original Message - 
From: "Bansal, Tarun" <[EMAIL PROTECTED]>
To: 
Sent: Monday, July 17, 2006 4:21 AM
Subject: Unable to run tomcat


Hi

I tried to run tomcat 5.0 on my machine but it is giving the following
error:


Error initializing endpoint java.net.BindException: Address in use: JVM_Bind:9000


Please help


Thanks and Regards


Tarun Bansal



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: multiple t hreads

2006-07-17 Thread Alan Meyer

Chris,

Thank you for the excellent advice and suggestions.

>> When I tried to [spawn a new thread on behalf of the remote
>> user] on older versions of Tomcat (4.x), all output to the
>> user was suspended until _all_ of the threads completed.

> This was probably due to mismanagement of the thread; a new
> thread will run independently of your request handler thread,
> unless you call "join" on that thread, which will block the
> current thread until the "joined" thread completes.

I take it you've actually tried this and it worked for you.
Which version of Tomcat were you using?

I'm positive that I didn't call join to wait for completion of
the threads that I started.  Is it possible that earlier versions
of Tomcat did that beneath the covers, or perhaps that this was
configurable and our systems administrators (I wasn't
administering Tomcat myself) forced this to happen?

I agree that my technique was worse than spawning a thread.  I
didn't want the overhead of running two JVMs.  But, try as I
might (and I tried mightily hard), I wasn't able to make it work
on the installation of Tomcat that I was using.

I only allowed one batch job to run at a time, for just the
reasons you mentioned.  I wasn't worried about a malicious denial
of service attack since our server was running on an intranet for
vetted users, and I wasn't concerned about starting arbitrary
jobs since the users could only pick from my menu of jobs to run.
But I was worried about a user starting a long running job, not
seeing results right away, and starting it again and again.

> You are better off creating a thread pool and re-using threads
> to complete long-running operations.

Is this just to limit the number of threads that can run?

I wouldn't be much worried about the overhead of starting a new
thread since I already know I'm running a batch job which is
going to take a long time.  Starting a new thread is in the
noise, performance wise.

> You can have your long-running thread write some status to
> somewhere convenient (such as the user's session) so that
> subsequent requests can display some kind of status information
> each time. There's no need to worry about request timeouts,
> etc.

That's a very neat idea!  I never thought of anything like that.

> If possible, a better solution would be to actually run the
> batch job /as a batch job/ -- i.e. store the job in a
> database/file/whatever, and have another process come along and
> process that request as necessary.

Another excellent idea.  I thought of it and have used it on
other projects but, alas, the sys admins hated the idea of
running another daemon and I didn't want to fight with them.

> This is all academic, since I think the original question was
> something along the lines of "Does Tomcat actually work like an
> app server should?  with threads and everything? Does it?!".

Well, the original poster may not have learned anything from
this, but I certainly did.

Thanks again.

 Alan


Alan Meyer
[EMAIL PROTECTED]

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Increase Heapsize

2006-07-17 Thread Ibrahim . Siddiqui
Hello.
I am using Tomcat 4.0.6 on the server.
I need to increase the heapsize.
Questions:
I've been receiving java OutOfMemory errors several times when a user 
attempts to upload files.
Is this enough to increase the heapsize as a 1st step?
Also how to go about doing it?
Do I simply increase the value after 'Xmx' in the JAVA_OPTS variable in 
catalina.sh file?
Or is there a export function?
Do I simply restart tomcat for the increase to take affect?
How can I monitor the application after the increase has been made?


Thanks,
Ibrahim
**
This communication (including any attachments) may contain privileged or
confidential information intended for a specific individual and purpose, 
and is protected by law.  If you are not the intended recipient, you should
delete this communication and/or shred the materials and any attachments and
are hereby notified that any disclosure, copying, or distribution of this
communication, or the taking of any action based on it, is strictly prohibited.

Thank you.



RE: Increase Heapsize

2006-07-17 Thread Propes, Barry L
I thought maybe it was done in the startup.bat file by changing the properties 
and the initial environment space (defaulted usually to Auto ot 4096).
Is this not correct? 
You might try right-clicking startup.bat, and under the Memory tab try changing 
the expanded memory or extended memory values if they're defaulted to a certain 
value?

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Monday, July 17, 2006 4:49 PM
To: users@tomcat.apache.org
Subject: Re: Increase Heapsize


Hello.
I am using Tomcat 4.0.6 on the server.
I need to increase the heapsize.
Questions:
I've been receiving java OutOfMemory errors several times when a user 
attempts to upload files.
Is this enough to increase the heapsize as a 1st step?
Also how to go about doing it?
Do I simply increase the value after 'Xmx' in the JAVA_OPTS variable in 
catalina.sh file?
Or is there a export function?
Do I simply restart tomcat for the increase to take affect?
How can I monitor the application after the increase has been made?


Thanks,
Ibrahim
**
This communication (including any attachments) may contain privileged or
confidential information intended for a specific individual and purpose, 
and is protected by law.  If you are not the intended recipient, you should
delete this communication and/or shred the materials and any attachments and
are hereby notified that any disclosure, copying, or distribution of this
communication, or the taking of any action based on it, is strictly prohibited.

Thank you.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: How to redirect URLs

2006-07-17 Thread Richard Mixon
Take a look at the section of this page on the "tomcat-users" mailing list:
  http://tomcat.apache.org/lists.html

Basically you just create a new email (I.E. do not reply to an existing
email from the list), address it to  users@tomcat.apache.org with an
appropriate Subject and message Body.

HTH 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 17, 2006 10:02 AM
To: Tomcat Users List
Cc: users@tomcat.apache.org
Subject: Re: How to redirect URLs

Excuse me,
I don't mean to interrupt an existing thread but could someone tell me how
to properly create anew thread for Tomcat related questions?
I have an immediate issue regarding tomcat performace monitoring.

Thanks
Ibrahim





"Nilesh Shastrakar" <[EMAIL PROTECTED]>
07/17/2006 05:59 AM
Please respond to "Tomcat Users List"

 
To: 
cc: 
Subject:How to redirect URLs


Dear All,

 

I have setup the Tomcat sever and Application, its working fine..

but I got the long URL now I want to make it short

Ex : 

 

http://www.abc.om/test/JSP/ondemand/rdtest/login.jsp

 

I want www.abc.com/forward  if  someone  types this URL in browser the site
should 

Redirect to above URL.

 

Could anyone please help me how to do it in Tomcat?

 

Regards

Nilesh.

 

 





**
This communication (including any attachments) may contain privileged or
confidential information intended for a specific individual and purpose, and
is protected by law.  If you are not the intended recipient, you should
delete this communication and/or shred the materials and any attachments and
are hereby notified that any disclosure, copying, or distribution of this
communication, or the taking of any action based on it, is strictly
prohibited.

Thank you.



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Increase Heapsize

2006-07-17 Thread Ibrahim . Siddiqui
I thought startup.bat was used for other versions of tomcat? no?
in my case tomcat is on a solaris box and not windows.
so isnt startup.bat used on windows?






"Propes, Barry L" <[EMAIL PROTECTED]>
07/17/2006 02:55 PM
Please respond to "Tomcat Users List"

 
To: "Tomcat Users List" 
cc: 
Subject:RE: Increase Heapsize


I thought maybe it was done in the startup.bat file by changing the 
properties and the initial environment space (defaulted usually to Auto ot 
4096).
Is this not correct? 
You might try right-clicking startup.bat, and under the Memory tab try 
changing the expanded memory or extended memory values if they're 
defaulted to a certain value?

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Monday, July 17, 2006 4:49 PM
To: users@tomcat.apache.org
Subject: Re: Increase Heapsize


Hello.
I am using Tomcat 4.0.6 on the server.
I need to increase the heapsize.
Questions:
I've been receiving java OutOfMemory errors several times when a user 
attempts to upload files.
Is this enough to increase the heapsize as a 1st step?
Also how to go about doing it?
Do I simply increase the value after 'Xmx' in the JAVA_OPTS variable in 
catalina.sh file?
Or is there a export function?
Do I simply restart tomcat for the increase to take affect?
How can I monitor the application after the increase has been made?


Thanks,
Ibrahim
**
This communication (including any attachments) may contain privileged or
confidential information intended for a specific individual and purpose, 
and is protected by law.  If you are not the intended recipient, you 
should
delete this communication and/or shred the materials and any attachments 
and
are hereby notified that any disclosure, copying, or distribution of this
communication, or the taking of any action based on it, is strictly 
prohibited.

Thank you.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




**
This communication (including any attachments) may contain privileged or
confidential information intended for a specific individual and purpose, 
and is protected by law.  If you are not the intended recipient, you should
delete this communication and/or shred the materials and any attachments and
are hereby notified that any disclosure, copying, or distribution of this
communication, or the taking of any action based on it, is strictly prohibited.

Thank you.



Re: multiple t hreads

2006-07-17 Thread Christopher Schultz
Alan,

>>> When I tried to [spawn a new thread on behalf of the remote
>>> user] on older versions of Tomcat (4.x), all output to the
>>> user was suspended until _all_ of the threads completed.
> 
>> This was probably due to mismanagement of the thread; a new
>> thread will run independently of your request handler thread,
>> unless you call "join" on that thread, which will block the
>> current thread until the "joined" thread completes.
> 
> I take it you've actually tried this and it worked for you.
> Which version of Tomcat were you using?

I can't recall what we were using on some of our development servers
(probably 4.1.something), but we were running Weblogic in production. We
used our own simple thread pool and it worked great. Our "batch job", as
it were, was actually opening an FTP connection, pushing a handful of
files through it, and notifying us of its progress during the whole thing.

The previous implementation was synchronous, and (as someone pointed
out) the request can time out if it takes too long. We modified this
process to use a background thread and an auto-refreshing page that
refreshed every couple of seconds. It actually made for a relatively
good looking progress bar.

> I'm positive that I didn't call join to wait for completion of
> the threads that I started.  Is it possible that earlier versions
> of Tomcat did that beneath the covers, or perhaps that this was
> configurable and our systems administrators (I wasn't
> administering Tomcat myself) forced this to happen?

I think that it was unlikely that Tomcat did anything like that; Tomcat
doesn't manage /all/ threads in the system... only the request handling
threads. Perhaps something else was happening. Were you writing to the
response in that thread that you created? That could cause some odd
things to happen...

> I agree that my technique was worse than spawning a thread.  I
> didn't want the overhead of running two JVMs.  But, try as I
> might (and I tried mightily hard), I wasn't able to make it work
> on the installation of Tomcat that I was using.

That's too bad. I don't recall having too much trouble when we did ours.
I argued with the engineers that we couldn't write a decent thread pool
fast enough and ought to get something off-the-open-source-shelf. I lost
the argument and we wrote our own simple one.

> I only allowed one batch job to run at a time, for just the
> reasons you mentioned.  I wasn't worried about a malicious denial
> of service attack since our server was running on an intranet for
> vetted users, and I wasn't concerned about starting arbitrary
> jobs since the users could only pick from my menu of jobs to run.
> But I was worried about a user starting a long running job, not
> seeing results right away, and starting it again and again.

That was probably a good move. We were dealing with several dozen users
on each machine, across 6 production app servers. Our peak load was
about 100 users/box every morning, so we weren't really excited about
/potentially/ starting 100 (or more, in case we mismanaged RELOADs) new
threads to handle these FTP transactions. At least those operations were
relatively infrequent.

>> You are better off creating a thread pool and re-using threads
>> to complete long-running operations.
> 
> Is this just to limit the number of threads that can run?

Yes. In fact, some thread pools are written to act like batch processors
(I think that .NET comes with one such implementation): you create a
Runnable object and basically queue it into the batch processor. The
batch processor then attaches a thread whenever one is available. That
Runnable object could still report status information to the session, etc.

So, if you only had a single thread in your thread pool (a "shallow"
pool, if you will), and high demand for batch jobs to be run, most
clients would sit around refreshing their pages simply saying "waiting",
since the job hadn't started. One lucky job would get done, and then the
rest would follow.

Refreshing pages aren't too much load, as long as you don't have a ton
of work to do in order to display them. For example, if you keep all the
information in the user's session (and the updated status information in
there, too), then you do very little work to spit out a status page each
time.

> I wouldn't be much worried about the overhead of starting a new
> thread since I already know I'm running a batch job which is
> going to take a long time.  Starting a new thread is in the
> noise, performance wise.

Agreed -- as long as you are managing those resources and not letting
many threads get started. You mentioned that you already protected
against that.

>> If possible, a better solution would be to actually run the
>> batch job /as a batch job/ -- i.e. store the job in a
>> database/file/whatever, and have another process come along and
>> process that request as necessary.
> 
> Another excellent idea.  I thought of it and have used it on
> other projects but, alas, the

RE: Increase Heapsize

2006-07-17 Thread Propes, Barry L
ok, maybe so, yes.
I believe you're correct, Ibrahim...sorry about that. I've got mine 
piggybacking on IIS.
Eventually it will be on a UNIX box.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Monday, July 17, 2006 5:33 PM
To: Tomcat Users List
Cc: Tomcat Users List
Subject: RE: Increase Heapsize


I thought startup.bat was used for other versions of tomcat? no?
in my case tomcat is on a solaris box and not windows.
so isnt startup.bat used on windows?






"Propes, Barry L" <[EMAIL PROTECTED]>
07/17/2006 02:55 PM
Please respond to "Tomcat Users List"

 
To: "Tomcat Users List" 
cc: 
Subject:RE: Increase Heapsize


I thought maybe it was done in the startup.bat file by changing the 
properties and the initial environment space (defaulted usually to Auto ot 
4096).
Is this not correct? 
You might try right-clicking startup.bat, and under the Memory tab try 
changing the expanded memory or extended memory values if they're 
defaulted to a certain value?

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Monday, July 17, 2006 4:49 PM
To: users@tomcat.apache.org
Subject: Re: Increase Heapsize


Hello.
I am using Tomcat 4.0.6 on the server.
I need to increase the heapsize.
Questions:
I've been receiving java OutOfMemory errors several times when a user 
attempts to upload files.
Is this enough to increase the heapsize as a 1st step?
Also how to go about doing it?
Do I simply increase the value after 'Xmx' in the JAVA_OPTS variable in 
catalina.sh file?
Or is there a export function?
Do I simply restart tomcat for the increase to take affect?
How can I monitor the application after the increase has been made?


Thanks,
Ibrahim
**
This communication (including any attachments) may contain privileged or
confidential information intended for a specific individual and purpose, 
and is protected by law.  If you are not the intended recipient, you 
should
delete this communication and/or shred the materials and any attachments 
and
are hereby notified that any disclosure, copying, or distribution of this
communication, or the taking of any action based on it, is strictly 
prohibited.

Thank you.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




**
This communication (including any attachments) may contain privileged or
confidential information intended for a specific individual and purpose, 
and is protected by law.  If you are not the intended recipient, you should
delete this communication and/or shred the materials and any attachments and
are hereby notified that any disclosure, copying, or distribution of this
communication, or the taking of any action based on it, is strictly prohibited.

Thank you.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



problems getting jkstatus to work in mod_jk

2006-07-17 Thread Bob Jaques
I am using apache to load balance apache/tomcat servers

I am trying to add jkstatus. It works fine until I enable the line in 
workers.properties enabling jkstatus then I get
"The server encountered an internal error or misconfiguration and was unable to 
complete your request."
When I access http://mywebsite.com/status/ but http://mywebsite.com/trader-web/ 
works fine. I cannot 
Find my errors also is there a way to eliminate the last / on trader-web to not 
be required

Thanks 
Bob




I am running the most current mod_jk



Here is what I have in httpd.conf

...

LoadModule jk_module modules/mod_jk.so
JkWorkersFile conf/workers.properties
JkLogFile logs/mod_jk.log
JkLogLevel debug
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
JkRequestLogFormat "%w %V %T"
JkMount /trader-web/* wrkr
JkMount /jkstatus jkstatus


Here is workers.properties

#worker.list=node1, node2, wrkr
worker.list=wrkr,jkstatus

worker.wrkr.type=lb
worker.wrkr.balanced_workers=node1,node2
worker.wrkr.sticky_session=1

worker.node1.port=8010
worker.node1.host=172.20.117.80
worker.node1.type=ajp13
worker.node1.lbfactor=100
worker.node1.cachesize=10
worker.node1.cache_timeout=600
worker.node1.socket_keepalive=1
worker.node1.recycle_timeout=300

worker.node2.port=8010
worker.node2.host=172.20.117.84
worker.node2.type=ajp13
worker.node2.lbfactor=100
worker.node2.cachesize=10
worker.node2.cache_timeout=600
worker.node2.socket_keepalive=1
worker.node2.recycle_timeout=300

worker.jkstatus.type=status


  



 

 
Robert R. Jaques
Director Technical Operations 
HedgeFleX Inc 
490 2nd Street
Suite 100
San Francisco, CA 94107 
[EMAIL PROTECTED] 
tel: 
fax: 
mobile:
Skype
Yahoo  IM 
415.357.1177 ext 203
415.357.9897 
415.595.7496
415.578.4490
bobjaques 
 
 
 
 

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

RE: Increase Heapsize

2006-07-17 Thread Ibrahim . Siddiqui
I've increased the heapsize in my development enviroment.
And I don't knowhow to confirm the change has been made to the effect the 
whole system is affected.
So I'd like to know how to go about confirming this, possibly thru some 
monitoring measure.

Before I move to production I'd like to be certain that a simply edit of 
one line from one file and restart of tomcat would do the job.






"Propes, Barry L" <[EMAIL PROTECTED]>
07/17/2006 03:37 PM
Please respond to "Tomcat Users List"

 
To: "Tomcat Users List" 
cc: 
Subject:RE: Increase Heapsize


ok, maybe so, yes.
I believe you're correct, Ibrahim...sorry about that. I've got mine 
piggybacking on IIS.
Eventually it will be on a UNIX box.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Monday, July 17, 2006 5:33 PM
To: Tomcat Users List
Cc: Tomcat Users List
Subject: RE: Increase Heapsize


I thought startup.bat was used for other versions of tomcat? no?
in my case tomcat is on a solaris box and not windows.
so isnt startup.bat used on windows?






"Propes, Barry L" <[EMAIL PROTECTED]>
07/17/2006 02:55 PM
Please respond to "Tomcat Users List"

 
To: "Tomcat Users List" 
cc: 
Subject:RE: Increase Heapsize


I thought maybe it was done in the startup.bat file by changing the 
properties and the initial environment space (defaulted usually to Auto ot 

4096).
Is this not correct? 
You might try right-clicking startup.bat, and under the Memory tab try 
changing the expanded memory or extended memory values if they're 
defaulted to a certain value?

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Monday, July 17, 2006 4:49 PM
To: users@tomcat.apache.org
Subject: Re: Increase Heapsize


Hello.
I am using Tomcat 4.0.6 on the server.
I need to increase the heapsize.
Questions:
I've been receiving java OutOfMemory errors several times when a user 
attempts to upload files.
Is this enough to increase the heapsize as a 1st step?
Also how to go about doing it?
Do I simply increase the value after 'Xmx' in the JAVA_OPTS variable in 
catalina.sh file?
Or is there a export function?
Do I simply restart tomcat for the increase to take affect?
How can I monitor the application after the increase has been made?


Thanks,
Ibrahim
**
This communication (including any attachments) may contain privileged or
confidential information intended for a specific individual and purpose, 
and is protected by law.  If you are not the intended recipient, you 
should
delete this communication and/or shred the materials and any attachments 
and
are hereby notified that any disclosure, copying, or distribution of this
communication, or the taking of any action based on it, is strictly 
prohibited.

Thank you.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




**
This communication (including any attachments) may contain privileged or
confidential information intended for a specific individual and purpose, 
and is protected by law.  If you are not the intended recipient, you 
should
delete this communication and/or shred the materials and any attachments 
and
are hereby notified that any disclosure, copying, or distribution of this
communication, or the taking of any action based on it, is strictly 
prohibited.

Thank you.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




**
This communication (including any attachments) may contain privileged or
confidential information intended for a specific individual and purpose, 
and is protected by law.  If you are not the intended recipient, you should
delete this communication and/or shred the materials and any attachments and
are hereby notified that any disclosure, copying, or distribution of this
communication, or the taking of any action based on it, is strictly prohibited.

Thank you.



symbolic links usage

2006-07-17 Thread Phill O'Flynn



  I have a web app that needs to access
directories outside of the context using symlinks. However these files are not
visible to the servlet. I have looked at all the FAQ's and made the recommended
changes but it still doen't work. I am using Tomcat 5.0.XX

i have a
context.xml file setup in the webapps META-INF directory as recommended for 
tomcat 5
on the web site. This is my context.xml 




 

this is the
error I get

org.apache.jasper.JasperException: /dwgList.jsp(12,0) File
"/downloads/info.jsp" not found

("downloads" is a
symbolic link and is a sub directory of the project directory)

and this
is the calling code

<[EMAIL PROTECTED] file='/downloads/info.jsp'%>


Regards
Phill O'Flynn





-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Tomcat 5.5/Axis 1.4 java.lang.reflect.InvocationTargetException

2006-07-17 Thread Luis Rivera

Hi Tomcat users,

I have a web service which will JNI to access the application, which
according to the documentation should be placed in the shared/classes
directory. I did so and I got a dreaded
java.lang.reflect.InvocationTargetException, which I believe is a class
loader problem. However, I have tried to solve this placing it in the
common/classes, server/classes and I get the same result.

I have searched the web for solutions, some people say that it is a
classpath problem, but nobody seems to let you know where exactly you set
this so that the correct class loader finds the class (assuming I am right
and it is a classloader problem).

Anyone here can help me? If have had a similar setup/problem and have a
solution at hand?

Thanks in advance,
--Luis R.


RE: Tomcat 5.5/Axis 1.4 java.lang.reflect.InvocationTargetException

2006-07-17 Thread Tim Lucia
Please post a full stack trace.  TargetInvocationException should have an
underlying cause associated with it, like NullPointerException or
ClassNotFoundException.

Tim


> -Original Message-
> From: Luis Rivera [mailto:[EMAIL PROTECTED]
> Sent: Monday, July 17, 2006 8:57 PM
> To: users@tomcat.apache.org
> Subject: Tomcat 5.5/Axis 1.4 java.lang.reflect.InvocationTargetException
> 
> Hi Tomcat users,
> 
> I have a web service which will JNI to access the application, which
> according to the documentation should be placed in the shared/classes
> directory. I did so and I got a dreaded
> java.lang.reflect.InvocationTargetException, which I believe is a class
> loader problem. However, I have tried to solve this placing it in the
> common/classes, server/classes and I get the same result.
> 
> I have searched the web for solutions, some people say that it is a
> classpath problem, but nobody seems to let you know where exactly you set
> this so that the correct class loader finds the class (assuming I am right
> and it is a classloader problem).
> 
> Anyone here can help me? If have had a similar setup/problem and have a
> solution at hand?
> 
> Thanks in advance,
> --Luis R.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat 5.5/Axis 1.4 java.lang.reflect.InvocationTargetException

2006-07-17 Thread Luis Rivera

  Thanks for the reply Tim,

Here is the stack trace, it does not look to me like it gives enough
information. Of course I am just starting with Tomcat and have some blanks
in my brain. I know is the classes are being found, either under commons or
shared classes directory, because if I just delete the classes then what I
get is a ClassNotFound exception, while if I place them under any of those
directories, I get the following exception:

AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: java.lang.reflect.InvocationTargetException
faultActor:
faultNode:
faultDetail:
   {http://xml.apache.org/axis/}hostname:dellp101

java.lang.reflect.InvocationTargetException
   at org.apache.axis.message.SOAPFaultBuilder.createFault(
SOAPFaultBuilder.java:222)
   at org.apache.axis.message.SOAPFaultBuilder.endElement(
SOAPFaultBuilder.java:129)
   at org.apache.axis.encoding.DeserializationContext.endElement(
DeserializationContext.java:1087)
   at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(Unknown
Source)
   at
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown
Source)
   at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
Source)
   at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
   at 
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
Source)
   at 
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
Source)
   at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown
Source)
   at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown
Source)
   at javax.xml.parsers.SAXParser.parse(Unknown Source)
   at org.apache.axis.encoding.DeserializationContext.parse(
DeserializationContext.java:227)
   at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
   at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
   at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(
MustUnderstandChecker.java:62)
   at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
   at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
   at org.apache.axis.client.Call.invoke(Call.java:2767)
   at org.apache.axis.client.Call.invoke(Call.java:2443)
   at org.apache.axis.client.Call.invoke(Call.java:2366)
   at org.apache.axis.client.Call.invoke(Call.java:1812)
   at soap.wsdl.CRLStub.getCompany(Unknown Source)
   at client.gui.VSAApplet.setCompanyName(VSAApplet.java:94)
   at client.gui.VSAApplet.init(VSAApplet.java:131)
   at sun.applet.AppletPanel.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: java.lang.reflect.InvocationTargetException
faultActor:
faultNode:
faultDetail:
   {http://xml.apache.org/axis/}hostname:dellp101

java.lang.reflect.InvocationTargetException
   at org.apache.axis.message.SOAPFaultBuilder.createFault(
SOAPFaultBuilder.java:222)
   at org.apache.axis.message.SOAPFaultBuilder.endElement(
SOAPFaultBuilder.java:129)
   at org.apache.axis.encoding.DeserializationContext.endElement(
DeserializationContext.java:1087)
   at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(Unknown
Source)
   at
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown
Source)
   at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
Source)
   at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
   at 
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
Source)
   at 
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
Source)
   at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown
Source)
   at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown
Source)
   at javax.xml.parsers.SAXParser.parse(Unknown Source)
   at org.apache.axis.encoding.DeserializationContext.parse(
DeserializationContext.java:227)
   at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
   at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
   at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(
MustUnderstandChecker.java:62)
   at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
   at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
   at org.apache.axis.client.Call.invoke(Call.java:2767)
   at org.apache.axis.client.Call.invoke(Call.java:2443)
   at org.apache.axis.client.Call.invoke(Call.java:2366)
   at org.apache.axis.client.Call.invoke(Call.java:1812)
   at soap.wsdl.CRLStub.getCompany(Unknown Source)
   at client.gui.VSAApplet.setCompanyName(VSAApplet.java:94)
   at client.gui.VSAApplet

Share context classes: Possible?

2006-07-17 Thread Foo Shyn
Hi guys,

This may sound dumb. Just wanna double check whether Tomcat provide sharing 
function where an application under a context could use a class that sit inside 
another context. I understand that for classes that need to be use by all 
application i'll need to jar it and put inside common\lib, but i'm wondering 
whether i could share out the classes in one of the context as a general 
application.

Thanx.
Regards,
FooShyn

Re: Increase Heapsize

2006-07-17 Thread Christopher Schultz
Barry and Ibrahim,

> I thought maybe it was done in the startup.bat file by changing the 
> properties and the initial environment space (defaulted usually to
> Auto to 4096). Is this not correct? You might try right-clicking
> startup.bat, and under the Memory tab try changing the expanded
> memory or extended memory values if they're defaulted to a certain
> value?

No, this isn't right: the properties you are talking about are for the
batch process itself (on a win32 machine). When startup.bat calls
"java", those values are not inherited by the VM.

> Do I simply increase the value after 'Xmx' in the JAVA_OPTS variable 
> in catalina.sh file?

This ought to work for you.

Although it is not unheard of to legitimately run out of memory (i.e.
get OutOfMemoryErrors), you ought to think about whether or not
increasing your heap size is actually going to fix your problem: often,
you have a memory leak and it's better to test your app with a small
heap because you can find it more quickly (i.e. less memory to burn
through before you run out).

I strongly advise you to critically examine your code to determine if
the OutOfMemoryErrors are being caused by you, or if you really do just
need more memory allocated to the JVM.

-chris




signature.asc
Description: OpenPGP digital signature


Re: Increase Heapsize

2006-07-17 Thread Christopher Schultz
Ibrahim,

> I've increased the heapsize in my development enviroment.
> And I don't knowhow to confirm the change has been made to the effect the 
> whole system is affected.
> So I'd like to know how to go about confirming this, possibly thru some 
> monitoring measure.

You can always call Runtime.getRuntime().totalMemory() to find out the
amount of heap space that has been allocated to the JVM. I have
incorporated this piece of information into a page that allows the
current user to "snoop" their session (only enabled in development, of
course).

-chris




signature.asc
Description: OpenPGP digital signature


RE: How to redirect URLs

2006-07-17 Thread Nilesh Shastrakar
Thnaks for help,

But where do I specify forward for /test/JSP/ondemand/rdtest/login.jsp

If someone type the url www.abc.com/forward it should redierct to above jsp.

Regards
Nilesh,
-Original Message-
From: Martin Gainty [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 17, 2006 7:31 PM
To: Tomcat Users List
Subject: Re: How to redirect URLs

I would suggest in the forward webapp web.xml that you update the
welcome-file-list to point to your jsp
e.g.
web.xml contents of www.abc.com (forward webapp)


  /test/JSP/ondemand/rdtest/login.jsp


M-
*
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.



- Original Message - 
From: "Nilesh Shastrakar" <[EMAIL PROTECTED]>
To: 
Sent: Monday, July 17, 2006 8:59 AM
Subject: How to redirect URLs 


> Dear All,
> 
> 
> 
> I have setup the Tomcat sever and Application, its working fine..
> 
> but I got the long URL now I want to make it short
> 
> Ex : 
> 
> 
> 
> http://www.abc.om/test/JSP/ondemand/rdtest/login.jsp
> 
> 
> 
> I want www.abc.com/forward  if  someone  types this URL in browser the
site
> should 
> 
> Redirect to above URL.
> 
> 
> 
> Could anyone please help me how to do it in Tomcat?
> 
> 
> 
> Regards
> 
> Nilesh.
> 
> 
> 
> 
> 
>


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Increase Heapsize

2006-07-17 Thread Suresh babu

Hi,

Using -verbose:gc will also help in finding out the heap size


On 7/18/06, Christopher Schultz <[EMAIL PROTECTED]> wrote:


Ibrahim,

> I've increased the heapsize in my development enviroment.
> And I don't knowhow to confirm the change has been made to the effect
the
> whole system is affected.
> So I'd like to know how to go about confirming this, possibly thru some
> monitoring measure.

You can always call Runtime.getRuntime().totalMemory() to find out the
amount of heap space that has been allocated to the JVM. I have
incorporated this piece of information into a page that allows the
current user to "snoop" their session (only enabled in development, of
course).

-chris







Re: Increase Heapsize

2006-07-17 Thread Suresh babu

-verbosegc -XX:+PrintGCDetails

On 7/18/06, Suresh babu <[EMAIL PROTECTED]> wrote:


 Hi,

Using -verbose:gc will also help in finding out the heap size


 On 7/18/06, Christopher Schultz <[EMAIL PROTECTED]> wrote:
>
> Ibrahim,
>
> > I've increased the heapsize in my development enviroment.
> > And I don't knowhow to confirm the change has been made to the effect
> the
> > whole system is affected.
> > So I'd like to know how to go about confirming this, possibly thru
> some
> > monitoring measure.
>
> You can always call Runtime.getRuntime().totalMemory() to find out the
> amount of heap space that has been allocated to the JVM. I have
> incorporated this piece of information into a page that allows the
> current user to "snoop" their session (only enabled in development, of
> course).
>
> -chris
>
>
>
>
>