How does Tomcat on Mac OS X Server handle requests to different domain names?

2010-10-19 Thread Thomas Hauk
I'm setting up a Mac OS X Server (10.5) machine, and that will include setting up Tomcat. The machine will be the host for at least two different domain names -- let's say myapp.example.com and myapp.anotherexample.com -- each of which will need to be hooked up to a different servlet. In other w

Re: Logging hostname/virutal name in the log

2010-10-19 Thread Konstantin Kolinko
2010/10/19 Mohit Anchlia : > Currently we use proxy and x-forwarded. Proxy uses snat so when it > gets logged we see something like: > > 10.128.1.5 65.204.229.11 - - [14/Oct/2010:22:29:49 -0700] POST > /adi.cgi HTTP/1.1 200 753 > > > 10.128.1.5 is proxy's ip > 65.204.229.11 is browser client ip > >

Re: org.apache.tomcat.jni programming question

2010-10-19 Thread Mladen Turk
On 10/20/2010 01:21 AM, Francesc Oller wrote: Please what I am doing wrong? Socket.bind(s, addr); You need to tell the socket to listen after binding it to the address. eg: Socket.listen(s, 10); long ns = Socket.accept(s); Regards -- ^TM -

Re: Struts 2 help with Tomcat 6

2010-10-19 Thread Josh Gooding
Just one more thing on this. Do you have to download the Javaassist jar separately? I've d/l'd both the libs and the "all" package, but it is in neither. Does anyone have it to spare by chance for version 2.2.1? On Tue, Oct 19, 2010 at 8:25 AM, Josh Gooding wrote: > Rock on, Thanks Jason! That

RE: Tomcat performance under low load

2010-10-19 Thread Vijay Menon
Hi Chris Sorry about the delay in replying. I've been a bit busy with performance issues :) The issue has come down to the vendor code persisting the cache as serialized objects to the file system and taking time to load it back, based on the decompiled code. The cache seems to be sufficiently

Re: Splitting Content Across Multiple Domains

2010-10-19 Thread Ðavîd Låndïs
On Tue, Oct 19, 2010 at 7:35 AM, Pid wrote: > > And I'm not sure what actual performance gain you'd get from hosting it > on the same IP address.  From memory, my experience was that the > performance gain was barely detectable and only occurred when the app > was on a separate IP address. Hmm, i

Re: Splitting Content Across Multiple Domains

2010-10-19 Thread Ðavîd Låndïs
On Mon, Oct 18, 2010 at 10:49 PM, Caldarale, Charles R wrote: > > I think you may be wasting your time.  Have you determined that you actually > have a performance problem, or are you fixing a non-existent problem? I don't expect the technique to make that much difference on its own, but it's a

Re: How to write the web.xml file in WAR package

2010-10-19 Thread ganu MailList
2010/10/19 Pid > On 19/10/2010 08:51, Wesley Acheson wrote: > > On Tue, Oct 19, 2010 at 3:54 AM, ganu MailList > wrote: > >> I need transmit one java project to the WAR package then put it under > the > >> tomcat. But I donot know how to write web.xml of this project rightly. > I > >> had wr

Re: How to write the web.xml file in WAR package

2010-10-19 Thread ganu MailList
2010/10/19 Wesley Acheson > On Tue, Oct 19, 2010 at 3:54 AM, ganu MailList > wrote: > > I need transmit one java project to the WAR package then put it under the > > tomcat. But I donot know how to write web.xml of this project rightly. > I > > had written onem but error. Tomcat cannot start

org.apache.tomcat.jni programming question

2010-10-19 Thread Francesc Oller
Please what I am doing wrong? import org.apache.tomcat.jni.*; import java.util.*; public class ExampleAPR { public static void main(String[] args) { try { // Initialize APR library Library.initialize(null); // Create pool long pool = Pool.create(0);

Re: Problems with logging.properties

2010-10-19 Thread Edson Carlos Ericksson Richter
It works: "file:///C:/Users/Edson/.netbeans/6.9/apache-tomcat-6.0.26_base/logs/somethingelse.2010-10-19.log" (I'm running Tomcat from inside NetBeans, in Windows platform - I have also similar configuration in Ubuntu Server 10.10 with Tomcat alone). Edson. Em 19/10/2010 20:43, Jason Brit

DBCP connections not in accordance with netstat output

2010-10-19 Thread Marc Wilmots
Hi List, I installed Lambda Probe to debug a problem that I'm having with a Liferay portal (5.1.2): Tomcat: 6.0.26 with dbcp JDK: 1.6.0_18 DB: Oracle 10.2.0.4 (ojdbc14) RHEL 5.4 64Bits When launching a stress test with JMeter, Lambda Probe indicates that my connection pool (150 connections (I kn

Re: Problems with logging.properties

2010-10-19 Thread Jason Britton
Just for your sanity, to make sure there are no other logging.properties files in your classpath, change the prefix for your FileHandler to something other than catalina so you can be sure this logging.properties file is the one being used for your logging config. If your prefix remains catalina..

Problems with logging.properties

2010-10-19 Thread Edson Carlos Ericksson Richter
Dear all, I've already spent lot's of time trying to make some Spring Framework messages go away from my log, without success. My last configuration is: /** Begin of file **/ handlers = 1catalina.org.apache.juli.FileHandler, 2localhost.org.apache.juli.FileHandler, 3manager.org.apache.juli.F

RE: Restart problem

2010-10-19 Thread Caldarale, Charles R
> From: Artur Osmanov [mailto:a.osma...@52north.org] > Subject: Restart problem > But if I stop Tomcat and start it again Tomcat hangs > and nothing works anymore. Have you tried taking a thread dump? > Tomcat version: Apache Tomcat/6.0.29 with default configuration > Windows 7 Professional 64

Re: what is it doing ?

2010-10-19 Thread Dave Mansfield
André Warnier wrote: Justin Randall wrote: Hello, From a general Linux perspective, if you have a knowledge of Linux system calls, not really along with what operations are performed by which web application not really either. Basically, that is what I am trying to find out. (One mig

Restart problem

2010-10-19 Thread Artur Osmanov
Hello Tomcat users, I have a big problem with Tomcat after restart. I try to solve this problem some days and can not find any solution for it: When I start Tomcat and copy the *.war file of my application to the webapps folder everything is fine. Tomcat deploys the application as normal. Everyth

Logging hostname/virutal name in the log

2010-10-19 Thread Mohit Anchlia
Currently we use proxy and x-forwarded. Proxy uses snat so when it gets logged we see something like: 10.128.1.5 65.204.229.11 - - [14/Oct/2010:22:29:49 -0700] POST /adi.cgi HTTP/1.1 200 753 10.128.1.5 is proxy's ip 65.204.229.11 is browser client ip I also need the name of the hostname or vir

RE: Tomcat memory leak error launching web app in NetBeans 6.9.1

2010-10-19 Thread appy74
Thanks Charles. Quoting "Caldarale, Charles R" : > > From: app...@dsl.pipex.com [mailto:app...@dsl.pipex.com] > > Subject: RE: Tomcat memory leak error launching web app in NetBeans 6.9.1 > > > Are you able to advise how this may be done within > > NetBeans 6.9.1 / Tomcat 6.0.26? > > Within

RE: Tomcat memory leak error launching web app in NetBeans 6.9.1

2010-10-19 Thread Caldarale, Charles R
> From: app...@dsl.pipex.com [mailto:app...@dsl.pipex.com] > Subject: RE: Tomcat memory leak error launching web app in NetBeans 6.9.1 > Are you able to advise how this may be done within > NetBeans 6.9.1 / Tomcat 6.0.26? Within NetBeans? No idea. (As stated before, I don't even think about r

Re: what is it doing ?

2010-10-19 Thread André Warnier
Justin Randall wrote: Hello, From a general Linux perspective, if you have a knowledge of Linux system calls, not really along with what operations are performed by which web application not really either. Basically, that is what I am trying to find out. (One might wonder what I really

RE: Tomcat memory leak error launching web app in NetBeans 6.9.1

2010-10-19 Thread appy74
Are you able to advise how this may be done within NetBeans 6.9.1 / Tomcat 6.0.26? Thanks. Quoting "Caldarale, Charles R" : > > From: app...@dsl.pipex.com [mailto:app...@dsl.pipex.com] > > Subject: Re: Tomcat memory leak error launching web app in NetBeans 6.9.1 > > > Where there are fewer me

RE: what is it doing ?

2010-10-19 Thread Justin Randall
One more thing, aside from checking whether the CPU consumed is usr or sys you may also want to lookup at iowait (a.k.a "wa"). This would indicate the CPU is busy waiting for IO operations to complete (potentially a slow disk or storage device). Regards, Justin Randall > From: ran...@hotmai

RE: Source Address based Realms

2010-10-19 Thread Aggarwal, Ajay
> you are already fronting Tomcat with another webserver ? No, Tomcat is the only web server and I am not looking to front it with another webserver. -Original Message- From: André Warnier [mailto:a...@ice-sa.com] Sent: Tuesday, October 19, 2010 11:01 AM To: Tomcat Users List Subject: Re

RE: what is it doing ?

2010-10-19 Thread Justin Randall
Hello, >From a general Linux perspective, if you have a knowledge of Linux system >calls, along with what operations are performed by which web application you >could use "strace" (use the -f to follow threads). Depending on what you're >interested in you can filter further for operations on

Re: what is it doing ?

2010-10-19 Thread Pid
On 19/10/2010 16:40, André Warnier wrote: > Hi. > > I have a Linux system like so : > > Linux arthur 2.6.26-2-686 #1 SMP Mon Aug 30 07:01:57 UTC 2010 i686 > GNU/Linux > > with a tomcat like so : > > Using CATALINA_BASE: /usr/share/tomcat5.5 > Using CATALINA_HOME: /usr/share/tomcat5.5 > Usin

RE: Tomcat memory leak error launching web app in NetBeans 6.9.1

2010-10-19 Thread Caldarale, Charles R
> From: app...@dsl.pipex.com [mailto:app...@dsl.pipex.com] > Subject: Re: Tomcat memory leak error launching web app in NetBeans 6.9.1 > Where there are fewer messages but it still seems as if > Tomcat is detecting Quartz threads after Quartz is shut down. Which means Quartz isn't really shutti

what is it doing ?

2010-10-19 Thread André Warnier
Hi. I have a Linux system like so : Linux arthur 2.6.26-2-686 #1 SMP Mon Aug 30 07:01:57 UTC 2010 i686 GNU/Linux with a tomcat like so : Using CATALINA_BASE: /usr/share/tomcat5.5 Using CATALINA_HOME: /usr/share/tomcat5.5 Using CATALINA_TMPDIR: /usr/share/tomcat5.5/temp Using JRE_HOME:

Re: Source Address based Realms

2010-10-19 Thread André Warnier
Aggarwal, Ajay wrote: I need to treat my clients differently depending on where they came from. I need to trust all requests coming locally (i.e. from 127.0.0.1/localhost) and not require them to authentication. However all external requests need to go through authentication. Is there a way to co

RE: Source Address based Realms

2010-10-19 Thread Aggarwal, Ajay
Sorry. I meant... "Is there another way to achieve this, i.e. without using Realms or mixing valve/filters with Realms?" -Original Message- From: Aggarwal, Ajay [mailto:ajay.aggar...@stratus.com] Sent: Tuesday, October 19, 2010 9:45 AM To: users@tomcat.apache.org Subject: Source Address

Re: Tomcat memory leak error launching web app in NetBeans 6.9.1

2010-10-19 Thread appy74
Well, I've tried Mark's code earlier, albeit without using a properties file for Log4J, and the position has improved slightly. The log indicates the following: INFO: Pausing Coyote AJP/1.3 on ajp-8009 Job Job1 unsubmitted at 2010-10-19 15:18:10 24047 [main] INFO org.quartz.core.QuartzScheduler

Source Address based Realms

2010-10-19 Thread Aggarwal, Ajay
I need to treat my clients differently depending on where they came from. I need to trust all requests coming locally (i.e. from 127.0.0.1/localhost) and not require them to authentication. However all external requests need to go through authentication. Is there a way to configure Realms in Tomcat

RE: Confidential Login

2010-10-19 Thread Caldarale, Charles R
> From: Simon Funnell [mailto:simon.funn...@propositum.biz] > Subject: Confidential Login > I have some content that is restricted by role but not over > a secure connection, however, if a user tries to access the > content and is presented with the credentials/authentication > form the form is a

Re: APR Features

2010-10-19 Thread Mark Thomas
On 18/10/2010 23:20, Simon Funnell wrote: > Hi, > > I wanted to know if it was worth using the sendfile features for small > static files or is the APR already optimised for serving static content? > > I basically have a jsp that makes a choice between serving up a static > (.html) and custom ver

Re: Struts 2 help with Tomcat 6

2010-10-19 Thread Josh Gooding
Rock on, Thanks Jason! That was exactly what I was looking for. I was looking under the Apache struts 2 site, and looking through their "getting started" section, but was not finding this. You the man. - J On Mon, Oct 18, 2010 at 10:41 PM, Jason Britton wrote: > This gives a little more detai

Re: APR Features

2010-10-19 Thread Mikolaj Rydzewski
On Tue, 19 Oct 2010 11:05:42 +0100, Simon Funnell wrote: I guess my question is, if I use instead of sendfile, is their any difference? I figure that if I have lots of unauthenticated users this will help with maintaining the load. I'm afraid, that processing of directive is so expensive

Re: Tomcat 5.5.25 | Memory leak in Web Application

2010-10-19 Thread Pid
On 19/10/2010 12:36, Anurag Kapur wrote: > 1. I am not quite sure if I have the correct answer to your question but I >> think the most probable reason is that we use tags provided by the CMS to >> cache the HTML response (JSP caches). The body of these tags can hold large >> chunks of HTML respons

Re: Tomcat 5.5.25 | Memory leak in Web Application

2010-10-19 Thread André Warnier
Anurag, Anurag Kapur wrote: ... 3. What does the JVM argument actually do? -Dorg.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER=true I understand it does not turn off tag pooling and instead limits the size of the buffer. Can you please elaborate what this means? What happens when a body

Re: How to configuration rails upload directory in tomcat?

2010-10-19 Thread Pid
On 19/10/2010 02:25, Ray Sun wrote: > Thanks all your response, let me clarify: > > Here's my development environment: > OS: Windows 7 6.1 x86 > Tomcat: Apache Tomcat/6.0.26 > Java: jdk1.6.0_21-b07 > Jruby: jruby 1.5.1 (ruby 1.8.7 patchlevel 249) (2010-07-28 6586) (Java > HotSpot(TM) Client VM 1.6

Re: Tomcat 5.5.25 | Memory leak in Web Application

2010-10-19 Thread Anurag Kapur
Hello all, Can one of you please help answer the last set of queries I have on this please? Thanks Anurag On Mon, Oct 18, 2010 at 3:02 PM, Anurag Kapur wrote: > Thanks Chris/Mark/Charles/Pid for your help with this. The issue has been > fixed after using the JVM argument :- > > -Dorg.apache.j

Re: Splitting Content Across Multiple Domains

2010-10-19 Thread Pid
On 19/10/2010 03:49, Caldarale, Charles R wrote: >> From: Ðavîd Låndïs [mailto:dlan...@gmail.com] >> Subject: Splitting Content Across Multiple Domains > >> I am considering creating another Host in my Tomcat >> server and creating another .war file with static >> content for that additional ho

Re: How to write the web.xml file in WAR package

2010-10-19 Thread Pid
On 19/10/2010 08:51, Wesley Acheson wrote: > On Tue, Oct 19, 2010 at 3:54 AM, ganu MailList > wrote: >> I need transmit one java project to the WAR package then put it under the >> tomcat. But I donot know how to write web.xml of this project rightly. I >> had written onem but error. Tomcat

APR Features

2010-10-19 Thread Simon Funnell
Hi, I wanted to know if it was worth using the sendfile features for small static files or is the APR already optimised for serving static content? I basically have a jsp that makes a choice between serving up a static (.html) and custom version of the page dependant on whether the user is a

Heading [OT] Re: Tomcat memory leak error launching web app in NetBeans 6.9.1

2010-10-19 Thread Pid
On 19/10/2010 01:07, Mark Eggers wrote: > Once again, I apologize for the wall of text. However, most of it is > pretty quick and dirty code, so it should be easy to skim. > > I'm guessing the end result is harmless? Well, if the ClassLoader is still extant after it's supposed to have been cleare

Re: Tomcat 6.0.29 - Windows Service - JMX

2010-10-19 Thread Konstantin Kolinko
2010/10/19 André Warnier : >(...) > In this case, the application appears in jvisualvm, as an "unknown > application (pid )" > >(...) > In this case, the application appears in jvisualvm, as a "tomcat (pid )" > >(...) > To confirm this, I used the Windows Services applet to change the user

Re: WebServer/Application server cache problem

2010-10-19 Thread André Warnier
sachin_nabble wrote: Hi, i build a web application with jetspeed as a server. On my portal i am showing a table called "Student" with his class,grade and marks. When i run my web application everything works well & my portal shows me the correct values for marks(e.g 50.56, 90.45, 80.60 etc)

Re: How to write the web.xml file in WAR package

2010-10-19 Thread Wesley Acheson
On Tue, Oct 19, 2010 at 3:54 AM, ganu MailList wrote: > I need transmit one java project to the WAR package then put it under the > tomcat.  But I donot know how to write web.xml of this project rightly.   I > had written onem  but error.  Tomcat cannot start this servlet.  Can anyone > teach me h

RE: Tomcat memory leak error launching web app in NetBeans 6.9.1

2010-10-19 Thread Martin O'Shea
Thanks Mark. I will give this a try later on. -Original Message- From: Mark Eggers [mailto:its_toas...@yahoo.com] Sent: 19 Oct 2010 01 08 To: Tomcat Users List Subject: Re: Tomcat memory leak error launching web app in NetBeans 6.9.1 Once again, I apologize for the wall of text. However,