Re: APR Tomcat...

2010-07-20 Thread André Warnier

Christopher Schultz wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Dale,

On 7/19/2010 7:42 PM, Dale Ogilvie wrote:

Reasons to use httpd being what?


Here are a few ideas:

1. Load balancing
2. Use of mixed Java and non-Java webapps (PHP, Perl, etc.)
3. Use of multiple Tomcat instances behind a single web server

If I thought about it, I could come up with a few more.


4. Imperative/beneficial use of one of the multiple Apache built-in or add-on modules 
which exist for Apache, and where comparable ready-made Tomcat valves, filters, 
applications do not (yet) exist or are not as mature.

(ref : http://httpd.apache.org/docs/2.2/mod/)

5. Situations where running java webapps under a servlet engine is not the main 
focus/purpose/interest of a website, but things like 2. above are.
I'll enclose in that the situations where the main area of competence of the people 
developing or managing the website is not Java.


To round this off, I'd say that the right tool for a job does not depend only on the 
intrinsic qualities of the tool itself.  It also depends on many other local 
circumstances, of which the availability of people with the appropriate competences is 
probably the most important.
From a relative outsider's point of view, I would compare Apache httpd and Tomcat as 
follows :


To achieve anything other than relatively trivial with Tomcat, at some point you'll need 
to become very competent with Java. Being competent with Java is a lifetime occupation, 
not because of the language itself, but because achieving anything worthwhile with it 
requires learning about many, many class libraries and their API's.

(Anyone challenging the above ?)

In comparison Apache httpd has, built-in, many features that just require configuration, 
and already has many ready-to-use add-on modules which just require to be plugged-in and 
configured, without having to do any programming at all.

This may suit sysadmins types better than developer types.

In both cases, some knowledge of the HTTP protocol is a must, and a good knowledge of HTTP 
is a tremendous help.
To achieve a certain goal, if you have a choice, choose whatever you are more comfortable 
with.


Technically, I think that Christopher's earlier benchmarks showed that Tomcat can serve 
simple static content at least as well as Apache httpd.
Using Apache httpd as a front-end to Tomcat introduces some overhead, but with a correct 
configuration this overhead will be insignificant in most real-world situations, compared 
to what can be achieved (in terms of unnecessary overhead) by bad coding in the 
applications themselves, whether they are running under Tomcat or under Apache.
To connect Apache with Tomcat, you can use either mod_jk or mod_proxy_ajp (or just 
mod_proxy_http).  Again, each one has its advantages and inconvenients, and you should 
mainly choose whichever you feel more comfortable with.  The difference in performance 
between these solutions will likely be insignificant, compared to the mistakes in 
configuration and in the applications.




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Apache Tomcat/5.5.20

2010-07-20 Thread Elad Dotan
 Hi,

1. OS version Solaris 10 (intel)
2. Apache Tomcat/5.5.20


*I'm using my tomcat  for OTA... *
*for example: http://wap.aaa.com/elad*
**
*I would my users to be able to also enter elad in uppercase ELAD (
http://wap.aaa.com/ELAD) and to be able to reach the page.*
*is it possible to configure the tomcat to ignore case senstivity?*
**
*Regards,*
**
*Elad.*


RE: Please remove me from the users emailing list

2010-07-20 Thread Martin Gainty

the unsubscribe emaill address is

users-unsubscr...@tomcat.apache.org


follow directions at

http://tomcat.apache.org/lists.html#tomcat-users

 

Martin Gainty 
__ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.



 

 Date: Tue, 20 Jul 2010 09:42:41 +0800
 Subject: Please remove me from the users emailing list
 From: jianglei...@gmail.com
 To: users@tomcat.apache.org
 
 
  
_
Hotmail has tools for the New Busy. Search, chat and e-mail from your inbox.
http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_1

Re: Apache Tomcat/5.5.20

2010-07-20 Thread André Warnier

Elad Dotan wrote:

 Hi,

1. OS version Solaris 10 (intel)
2. Apache Tomcat/5.5.20


*I'm using my tomcat  for OTA... *
*for example: http://wap.aaa.com/elad*
**
*I would my users to be able to also enter elad in uppercase ELAD (
http://wap.aaa.com/ELAD) and to be able to reach the page.*
*is it possible to configure the tomcat to ignore case senstivity?*
**
I believe yes, on an application-by-application base, see 
http://tomcat.apache.org/tomcat-5.5-doc/config/context.html#Common_Attributes

caseSensitive.
But read the remark in that box.

What is not so clear to me, is whether this applies even for the upper application level 
(here elad/ELAD). In other words, if you put this in the Context for the elad 
application, does Tomcat then know to direct requests to ELAD to that same application ?


Basically, I would say that it is not a good idea anyway, because it may still bypass some 
security features of the server, and may make things confusing anyway.


It would probably be better to create a dummy webapps/ELAD application, which does nothing 
else but send a redirect response to the browser, to the real webapps/elad application.

Maybe you can use this filter for that purpose :
http://www.tuckey.org/urlrewrite/

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Apache Tomcat/5.5.20

2010-07-20 Thread Caldarale, Charles R
 From: Elad Dotan [mailto:elad.do...@gmail.com]
 Subject: Apache Tomcat/5.5.20
 
 *is it possible to configure the tomcat to ignore case senstivity?*

Not safely (at least not safely on all platforms).  However, if you configure 
an appropriate filter in the ROOT webapp, you can have it forward or redirect 
the request to the properly cased URI.  The appropriate filter can be found 
here:

http://www.tuckey.org/urlrewrite/

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Apache Tomcat/5.5.20

2010-07-20 Thread Konstantin Kolinko
2010/7/20 André Warnier a...@ice-sa.com:
 Elad Dotan wrote:
\
 1. OS version Solaris 10 (intel)
 2. Apache Tomcat/5.5.20



 I believe yes, on an application-by-application base, see
 http://tomcat.apache.org/tomcat-5.5-doc/config/context.html#Common_Attributes
 caseSensitive.
 But read the remark in that box.

 What is not so clear to me, is whether this applies even for the upper
 application level (here elad/ELAD). In other words, if you put this in the
 Context for the elad application, does Tomcat then know to direct requests
 to ELAD to that same application ?


That caseSensitive attribute in Context is essentially useless. It
does not make a web-application case-insensitive per se, unless your
OS is case-insensitive. It just removes a security check that compares
requested URL and canonical path of a file.

In Tomcat 7 it is removed.

 Basically, I would say that it is not a good idea anyway, because it may
 still bypass some security features of the server, and may make things
 confusing anyway.

 It would probably be better to create a dummy webapps/ELAD application,
 which does nothing else but send a redirect response to the browser, to the
 real webapps/elad application.
 Maybe you can use this filter for that purpose :
 http://www.tuckey.org/urlrewrite/


Using a filter is the way to go. You can write it yourself, or use urlrewrite.



Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: setenv.sh and CATALINA_BASE

2010-07-20 Thread Rainer Frey
On Thursday 15 July 2010 20:26:14 Christopher Schultz wrote:
 Rainer,

Hi, and sorry for the late reply.

[I changed the order of some parts of your mail to reply 

 On 7/12/2010 9:14 AM, Rainer Frey wrote:
  I understand that, but would it be possible/good/not causing problems to
  change this to do CATALINA_BASE=$CATALINA_HOME first, so a setenv.sh can
  rely on CATALINA_BASE being set?
 
 I think I understand the source of the confusion, here:
 
 1. you want CATALINA_BASE to be set before CATALINA_HOME/bin/setenv.sh
is invoked

yes.

 2. CATALINA_BASE must be set to something other than CATALINA_BASE
in order for CATALINA_BASE/bin/setenv.sh to be invoked /at all/

Detecting the right setenv.sh works fine, so I don't care about that.

 3. case here is that CATALINA_HOME/bin/setenv.sh is being used,
but you want to use CATALINA_BASE/[something] in your generic scripts

Exactly.

 if [ -n ${CATALINA_BASE} ] ; then
   THE_BASE_DIR=${CATALINA_BASE}
 else
   THE_BASE_DIR=${CATALINA_HOME}
 fi
[...]
 CONF_DIR=${THE_BASE_DIR}/conf

Thanks for the hint, I'm doing exactly that now.

 I'm not sure a patch is necessary, since the script has all the
 information it needs. Perhaps your script will have to be a bit more
 verbose (for instance, by explicitly testing for CATALINA_BASE), but it
 is certainly not prohibited from doing it's own work.

That's absolutely right. A patch certainly is not necessary. My thought behind 
the question was just: would it be better to solve this once for everybody by 
changing catalina.sh, instead of let everybody handle that in their own 
script?

 if a user is going to use CATALINA_BASE, it
 must be set before any scripts are called, otherwise CATALINA_BASE
 doesn't get used at all (and CATALINA_HOME is the appropriate location
 of whatever configuration files you want to use).
 
 There will be cases where CATALINA_BASE is not set at all, and therefore
 essentially defaults to CATALINA_HOME. 

Well, actually, from a few lines down in catalina.sh, CATALINA_BASE *is* 
always set (to the value of CATALINA_HOME if not set to anything else). The 
rest of the script *does* use CATALINA_BASE unconditionally, and it is used to 
set the catalina.base system property which *is* always used by Tomcat 
internally. 

 It's probably a good thing for setenv.sh to be able to determine whether
 CATALINA_BASE is explicitly set

I did not think I'd ever need this, that's why I asked for other opinions. In 
that case my proposed change is undesirable.

 Does your setenv.sh script expect to use a default file
 (CATALINA_HOME/conf/whatever.jmx) and allow it to be overridden in
 CATALINA_BASE/conf/whatever.jmx? 

No, though it might be a good idea after all. My original plan was to use one 
separate file per instance, no matter whether that instance is standalone or 
part of a multi-instance setup.

 If so, then your script will have to
 test both locations, anyway, because you'll have to check to see if the
 (optional) override file exists in CATALINA_BASE and then check for it
 again under CATALINA_HOME.
 
 Having a blank CATALINA_BASE seems to be helpful in this situation.

Well, then there *is* reason to leave it as is. That is a helpful answer to my 
question.

 Is there a situation that you think doesn't work given the current
 script behavior?

No, and I didn't want to imply that. But in general, one can change something 
that already works to make it work a little bit better :-)

Thanks for your time.

Rainer

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: using Apache as a front end for Tomcat

2010-07-20 Thread James Godrej
On your blog 
http://myunster.com/blog/10.html
at step number 8 you mentioned to create worker.properties

there a variable is workers.tomcat_home and
workers.java_home 
if the apache machine and tomcat machine are physically different then how do 
you define these variables .
Also is there any change in this situation in this setup of file in this case.



Re: deploying tomcat not on localhost

2010-07-20 Thread Tapas Mishra
Even I am trying for the same if you happen to do so please do share.
While browsing the list I came across
http://myunster.com/blog/10.html
May not be of much help.

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat 5.5.23 server startup issue

2010-07-20 Thread Venkat Tanga

Hi Pid,

   Thanks for your reply,  It seems that the problem is with some of 
the jars those which are I added from my older environment(tomcat 
5.0.18). So I have freshly added jars one bye one  tested, now I am not 
facing this issue.


Regards,
Venkat



Pid wrote:

On 19/07/2010 17:23, Venkat Tanga wrote:
  

*Hi All,

 I am facing the below mentioned issues in the server startup. hence
the server is not starting up.

Can any one plz help me how to resolve these issues. *

Jul 19, 2010 9:41:30 PM org.apache.catalina.startup.HostConfig
deployDescriptor
SEVERE: Error deploying configuration descriptor host-manager.xml
java.lang.NoSuchMethodError:
org.apache.naming.NamingContextBindingsEnumeration.init(Ljava/util/Iterator;Ljavax/naming/Context;)V

   at
org.apache.naming.resources.FileDirContext.listBindings(FileDirContext.java:338)

   at
org.apache.naming.resources.ProxyDirContext.listBindings(ProxyDirContext.java:516)

   at
org.apache.catalina.util.ExtensionValidator.validateApplication(ExtensionValidator.java:175)

   at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4064)
   at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)

   at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
   at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
   at
org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:626)

   at
org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553)

   at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)
   at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
   at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
   at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)

   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
   at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
   at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
   at
org.apache.catalina.core.StandardService.start(StandardService.java:448)
   at
org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
   at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
   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:295)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
Jul 19, 2010 9:41:30 PM org.apache.catalina.startup.HostConfig
deployDescriptor
SEVERE: Error deploying configuration descriptor manager.xml
java.lang.NoSuchMethodError:
org.apache.naming.NamingContextBindingsEnumeration.init(Ljava/util/Iterator;Ljavax/naming/Context;)V

   at
org.apache.naming.resources.FileDirContext.listBindings(FileDirContext.java:338)

   at
org.apache.naming.resources.ProxyDirContext.listBindings(ProxyDirContext.java:516)

   at
org.apache.catalina.util.ExtensionValidator.validateApplication(ExtensionValidator.java:175)

   at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4064)
   at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)

   at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
   at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
   at
org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:626)

   at
org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553)

   at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)
   at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
   at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
   at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)

   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
   at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
   at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
   at
org.apache.catalina.core.StandardService.start(StandardService.java:448)
   at
org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
   at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
   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 

Re: using Apache as a front end for Tomcat

2010-07-20 Thread André Warnier

James Godrej wrote:
On your blog 
http://myunster.com/blog/10.html

at step number 8 you mentioned to create worker.properties

there a variable is workers.tomcat_home and
workers.java_home 



I think that both of these variables/properties have been obsolete for a long time, and 
are not used at all by mod_jk.  A long time meaning at least 4-5 years.

Examples of workers.properties which have them still, are most probably out of 
date.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: How to retrieve persisted session

2010-07-20 Thread Ashish Kulkarni
Hi
Where do i set this max age for session? i dont see any thing in document
http://tomcat.apache.org/tomcat-6.0-doc/config/manager.html

Ashish

On Mon, Jul 19, 2010 at 6:03 PM, Christopher Schultz 
ch...@christopherschultz.net wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Ashish,

 On 7/19/2010 4:48 PM, Ashish Kulkarni wrote:
  Is there a way i can save this session cookie, so i can access it later?
 is
  it possible

 Set the maxAge of the session to something other than -1 (the default,
 which means this cookie will die when the browser shuts down).

  How does yahoo or gmail keep me signed on for 2-3 days

 See above.

 - -chris
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.10 (MingW32)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

 iEYEARECAAYFAkxEy5YACgkQ9CaO5/Lv0PAZhACfTxY8EWC5c1yhNbwA64AgLPRH
 9NQAoKxsfFPaqiX/2WHLpZkcg6VAjAAw
 =4ABC
 -END PGP SIGNATURE-

 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org




-- 
Ashish
www.ayurwellness.com
www.mysoftwareneeds.com


Re: How is Apache Documentation organized

2010-07-20 Thread Pid
On 20/07/2010 12:41, James Godrej wrote:
 I am curious to know how is Apache documentation organized.

 Meaning if some one comes with complete zero experience of web hosting where 
 should they start so that they can be thorough with Apache.
 Which pages they should access.

Start at http://www.apache.org/ and let us know when you've finished.

 I read many doc pages at some places examples are given but not at all 
 places.Or 
 did I miss some thing?

Could you give an example?

 What I mean to say different directives and modules in sample setups how are 
 they applied are there some sample configurations or it is assumed that it is 
 obvious.

If you mean Apache HTTPD rather than Apache Tomcat, then you'll want:

 http://www.apache.org/


p




signature.asc
Description: OpenPGP digital signature


Re: How to retrieve persisted session

2010-07-20 Thread Pid
On 20/07/2010 14:58, Ashish Kulkarni wrote:
 Hi
 Where do i set this max age for session? i dont see any thing in document
 http://tomcat.apache.org/tomcat-6.0-doc/config/manager.html

Have you manually set the session expiry time or are you using the default?


p

 Ashish
 
 On Mon, Jul 19, 2010 at 6:03 PM, Christopher Schultz 
 ch...@christopherschultz.net wrote:
 
 Ashish,
 
 On 7/19/2010 4:48 PM, Ashish Kulkarni wrote:
 Is there a way i can save this session cookie, so i can access it later?
 is
 it possible
 
 Set the maxAge of the session to something other than -1 (the default,
 which means this cookie will die when the browser shuts down).
 
 How does yahoo or gmail keep me signed on for 2-3 days
 
 See above.
 
 -chris

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org






signature.asc
Description: OpenPGP digital signature


Re: How is Apache Documentation organized

2010-07-20 Thread Antonio Petrelli
2010/7/20 Pid p...@pidster.com:
 If you mean Apache HTTPD rather than Apache Tomcat, then you'll want:

  http://www.apache.org/

Do you mean:
http://httpd.apache.org/

Antonio

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: How to retrieve persisted session

2010-07-20 Thread Ashish Kulkarni
Hi
I am using the default, how do i set session expiry time, i can think of
only 1 place that is in web.xml

session-config
   session-timeout-1/session-timeout
  /session-config

Is there any other way


On Tue, Jul 20, 2010 at 10:25 AM, Pid p...@pidster.com wrote:

 On 20/07/2010 14:58, Ashish Kulkarni wrote:
  Hi
  Where do i set this max age for session? i dont see any thing in document
  http://tomcat.apache.org/tomcat-6.0-doc/config/manager.html

 Have you manually set the session expiry time or are you using the default?


 p

  Ashish
 
  On Mon, Jul 19, 2010 at 6:03 PM, Christopher Schultz 
  ch...@christopherschultz.net wrote:
 
  Ashish,
 
  On 7/19/2010 4:48 PM, Ashish Kulkarni wrote:
  Is there a way i can save this session cookie, so i can access it
 later?
  is
  it possible
 
  Set the maxAge of the session to something other than -1 (the default,
  which means this cookie will die when the browser shuts down).
 
  How does yahoo or gmail keep me signed on for 2-3 days
 
  See above.
 
  -chris
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 
 





-- 
Ashish
www.ayurwellness.com
www.mysoftwareneeds.com


Re: using Apache as a front end for Tomcat

2010-07-20 Thread Rainer Jung

On 20.07.2010 15:30, André Warnier wrote:

James Godrej wrote:

On your blog http://myunster.com/blog/10.html
at step number 8 you mentioned to create worker.properties

there a variable is workers.tomcat_home and
workers.java_home


I think that both of these variables/properties have been obsolete for a
long time, and are not used at all by mod_jk. A long time meaning at
least 4-5 years.
Examples of workers.properties which have them still, are most probably
out of date.


Grab yourself the official source download of mod_jk 1.2.30. It contains 
a useful and well-commented example workers.properties. Older ones do 
not contain a good example config.


Regards,

Rainer

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: How is Apache Documentation organized

2010-07-20 Thread André Warnier

Antonio Petrelli wrote:

2010/7/20 Pid p...@pidster.com:

If you mean Apache HTTPD rather than Apache Tomcat, then you'll want:

 http://www.apache.org/


Do you mean:
http://httpd.apache.org/


No, I believe he really meant
http://www.apache.org/

Considering the question of the OP, it seemed to be a very generic question, not 
particularly specific to the httpd server or Tomcat.
Considering the premise if some one comes with complete zero experience of web 
hosting.., then I would add : start with the HTTP RFC (Google for http rfc 2616).

Then go to www.apache.org, and maybe start with httpd.
Then if you want to really learn about how Apache does things internally (as opposed to 
just its configuration), my suggestion would be here :

http://perl.apache.org/docs/2.0/user/handlers/http.html#HTTP_Request_Cycle_Phases
(This is part of the mod_perl documentation, but it is at the same time the best 
introduction to the Apache httpd internals which I know of).
Then if Tomcat is your main point of interest, grab yourself a copy of the Java Servlet 
Specification.  It is dense, but fairly readable, and a must before you really start 
dabbling with Tomcat.

Then go to tomcat.apache.org and read the documentation.
At the end of that, you'll already know more than most people on this forum.



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: APR Tomcat...

2010-07-20 Thread Pid
On 19/07/2010 22:21, Tony Anecito wrote:
 Hi Pid
 
 First off I get a little red x in the upper left hand corner of the web page.

Excellent technical description of the problem.  Is it the response
status 404 or a 500, I wonder?


 Yep I agree maybe an upgrade to the latest Tomcat and APR might accomplish 
 fixing the problem but silly me I like to understand an issue before I 
 upgrade.

I didn't say it would, but silly me I like to advise people to stay
current, to gain the benefit of bug and security fixes.


 APR==httpd at least that is what the Apache Web site says and the acronym I 
 put 
 up on the title page is about. The Apache Web server group disavow any 
 knowledge 
 of APR since they say the Tomcat Group developed to to replace Apache Web 
 Server.

It's been explained elsewhere in the thread that this is incorrect, but
I'm curious to know where you read that the HTTPD 'group' disavowed APR?


 What little info I could find seems to indicate APR uses the ROOT directory  
 under Webapps for html based apps.
 
 I will probably go back to Apache Web server as a separate tier. I was trying 
 to 
 get better performance using APR + Tomcat and saw some but not enough to 
 justify 
 the advantages of a seperate tier.


I can't seem to see whether your original problem has actually been
resolved or not, did you manage to determine what was happening or not?


p


 Best Regards,
 -Tony
 
 
 
 - Original Message 
 From: Pid p...@pidster.com
 To: Tomcat Users List users@tomcat.apache.org
 Sent: Mon, July 19, 2010 3:05:41 PM
 Subject: Re: APR  Tomcat...
 
 On 19/07/2010 19:44, Tony Anecito wrote:
 Hi All,

 I have been having odd issues with APR  Tomcat (6.0.20) since I set it up a 
 while ago. I am seeing:
 
 Time for an upgrade.
 
 1. Sometimes on the first try to get images from a page where the images are 
 assigned a sub domain via a host tag I get a red x. Hitting refresh seems to 
 retrieve the images. The images are in a subfolder off of the ROOT folder of 
 tomcat.
 
 Can you reproduce the problem?
 
 What does the client actually see?
 
 You can use a browser tool to find out, e.g. Firebug in Firefox.
 Fiddler, ieHttpHeaders in IE, the built-in developer tools in Safari/Chrome.
 
 What does the server actually send?  You didn't state your OS (tsk) but
 there are tools available for most OS which will allow you to monitor
 network traffic at the server. (e.g. Wireshark).
 
 2. I get a file not found off of another folder where the file is a jnlp 
 file.


 So is there any type of directory tag (allow, deny ect) I should be using 
 for 
 the sub folders off or ROOT? When I used Apache Web server I set those up 
 but 
 then I was not using a Host tag either. But for APR I did not set up any 
 type 
 directory tags.
 
 No there isn't.  Tomcat != Apache HTTPD.
 
 Security permissions are set in the ROOT/WEB-INF/web.xml, as per the
 Servlet Spec.
 
 
 p
 
 If I need the directory tags where would I put them?

 Thanks,
 -Tony


   

 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org

 
 
   




signature.asc
Description: OpenPGP digital signature


Re: Unable to get Tomcat 7 to work in Eclipse

2010-07-20 Thread Pid
On 19/07/2010 22:37, Austin Shelton wrote:
 The resource for my web page servlet can't be located. This was not the
 case with Tomcat 6.
 
 Nobody complained once I started getting a good Tomcat launch.

So it works if Tomcat 7 works, or it doesn't - I'm not clear on what
that means.

 There are no logs in the Tomcat home.

Like I said, they are probably not there.  Eclipse uses it's own, I
don't know where that is in your case, you'll have to work it out.


p

 On Mon, Jul 19, 2010 at 1:56 PM, Pid p...@pidster.com
 mailto:p...@pidster.com wrote:
 
 On 19/07/2010 20:13, Austin Shelton wrote:
  Hi,
 
  I am unable to get Tomcat 7.0.0 to work correctly with Eclipse Helios.
  Tomcat 6 was working just fine; the problem occurred when I
 upgraded to
  Tomcat 7.0. It complained about Resource Not found. I now have it
 working
  to the extent that no errors or warning show up in the console.
 But I do not
  get my page, without errors, to display. Any tips on solving this
 problem?
 
  Thanks
 
 Which resource isn't found?
 
 What complained, your browser, Eclipse, or Tomcat?
 
 What do the Tomcat logs say?  (Note: they may be in a different location
 than a normal Tomcat installation)
 
 
 p
 
 




signature.asc
Description: OpenPGP digital signature


Re: APR Tomcat...

2010-07-20 Thread Tony Anecito
The red x is the standard way in an html page to indicate something is wrong 
but 
no 404 or other status code is displayed otherwise I would have mentioned it.
Simple google indicated many reasons why it might occur.

As I mentioned in another email I plan to switch back to Apache Web Server and 
there recently has been very good explantions on this email group why to do so. 
As I mentioned I used APR for performance which it did a good job for me but 
other considerations come into play at this point so no need to drag up old 
emails from the Apache group regarding APR.

Regards,
-Tony



- Original Message 
From: Pid p...@pidster.com
To: Tomcat Users List users@tomcat.apache.org
Sent: Tue, July 20, 2010 10:11:39 AM
Subject: Re: APR  Tomcat...

On 19/07/2010 22:21, Tony Anecito wrote:
 Hi Pid
 
 First off I get a little red x in the upper left hand corner of the web page.

Excellent technical description of the problem.  Is it the response
status 404 or a 500, I wonder?


 Yep I agree maybe an upgrade to the latest Tomcat and APR might accomplish 
 fixing the problem but silly me I like to understand an issue before I 
upgrade.

I didn't say it would, but silly me I like to advise people to stay
current, to gain the benefit of bug and security fixes.


 APR==httpd at least that is what the Apache Web site says and the acronym I 
 put 

 up on the title page is about. The Apache Web server group disavow any 
knowledge 

 of APR since they say the Tomcat Group developed to to replace Apache Web 
 Server.

It's been explained elsewhere in the thread that this is incorrect, but
I'm curious to know where you read that the HTTPD 'group' disavowed APR?


 What little info I could find seems to indicate APR uses the ROOT directory  
 under Webapps for html based apps.
 
 I will probably go back to Apache Web server as a separate tier. I was trying 
to 

 get better performance using APR + Tomcat and saw some but not enough to 
justify 

 the advantages of a seperate tier.


I can't seem to see whether your original problem has actually been
resolved or not, did you manage to determine what was happening or not?


p


 Best Regards,
 -Tony
 
 
 
 - Original Message 
 From: Pid p...@pidster.com
 To: Tomcat Users List users@tomcat.apache.org
 Sent: Mon, July 19, 2010 3:05:41 PM
 Subject: Re: APR  Tomcat...
 
 On 19/07/2010 19:44, Tony Anecito wrote:
 Hi All,

 I have been having odd issues with APR  Tomcat (6.0.20) since I set it up a 
 while ago. I am seeing:
 
 Time for an upgrade.
 
 1. Sometimes on the first try to get images from a page where the images are 
 assigned a sub domain via a host tag I get a red x. Hitting refresh seems to 
 retrieve the images. The images are in a subfolder off of the ROOT folder of 
 tomcat.
 
 Can you reproduce the problem?
 
 What does the client actually see?
 
 You can use a browser tool to find out, e.g. Firebug in Firefox.
 Fiddler, ieHttpHeaders in IE, the built-in developer tools in Safari/Chrome.
 
 What does the server actually send?  You didn't state your OS (tsk) but
 there are tools available for most OS which will allow you to monitor
 network traffic at the server. (e.g. Wireshark).
 
 2. I get a file not found off of another folder where the file is a jnlp 
file.


 So is there any type of directory tag (allow, deny ect) I should be using 
 for 

 the sub folders off or ROOT? When I used Apache Web server I set those up 
 but 

 then I was not using a Host tag either. But for APR I did not set up any 
 type 

 directory tags.
 
 No there isn't.  Tomcat != Apache HTTPD.
 
 Security permissions are set in the ROOT/WEB-INF/web.xml, as per the
 Servlet Spec.
 
 
 p
 
 If I need the directory tags where would I put them?

 Thanks,
 -Tony


      

 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org

 
 
      




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: APR Tomcat...

2010-07-20 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Chuck,

On 7/19/2010 11:50 PM, Caldarale, Charles R wrote:
 From: Christopher Schultz [mailto:ch...@christopherschultz.net]
 Subject: Re: APR  Tomcat...

 My tests show that use of sendFile is dramatically faster 
 than without.
 
 Was that vs BIO or NIO?  As I recall, there is no sendFile capability in BIO, 
 so both NIO and APR should beat that.

BIO = JIO, right? Too many TLAs.

The NIO and APR connectors support sendFile, but the blocking, vanilla
Java connector does not. sendFile, in both the NIO and APR connectors,
gives a significant performance improvement. So, you're right, it's not
APR's magic, but the magic of sendFile in either case.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkxF4mYACgkQ9CaO5/Lv0PDnAQCggQqYH8rZ4MgWs96fAaoI0KXW
NPsAoLkQepKjXBNJ4RdzYnGjt5m8Eh/j
=rEM7
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: APR Tomcat...

2010-07-20 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Tony,

On 7/20/2010 12:35 AM, Tony Anecito wrote:
 Interesting. I saw that when a static file was around 21K or below a dramatic 
 improvement in recorded time in the log for APR. I have not tried with 
 regular 
 Apache Web Server to see what I get.

I should get off my ass and publish my benchmarking results. These
Tomcat knuckleheads keep releasing new versions, and I feel like I
should repeat my tests with the latest version. :(

Soon. Maybe.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkxF4qQACgkQ9CaO5/Lv0PCaEgCfePU71YPyDFCPi8dhXyQa+WWZ
haIAn3x04yVH94WKjRyRvaAlFis3C+QV
=E0HG
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: ]OT] APR Tomcat...

2010-07-20 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

André,

Finally off-topic.

On 7/20/2010 4:18 AM, André Warnier wrote:
 To achieve anything other than relatively trivial with Tomcat, at some
 point you'll need to become very competent with Java.

Not necessarily. You might have to become familiar with things like
fully-qualified class names and a few specific tools necessary for
proper configuration (like cluster implementations, etc.), but Tomcat
administration need not carry with it any deep programming knowledge.
It's always good to know a good Java dev, though, in case you get in
over your head.

 Being competent
 with Java is a lifetime occupation, not because of the language itself,
 but because achieving anything worthwhile with it requires learning
 about many, many class libraries and their API's.
 (Anyone challenging the above ?)

Mmmm... I wouldn't say that's unique to Java. You're a Perl fanboy, and
Perl is ... an art in and of itself.

 In comparison Apache httpd has, built-in, many features that just
 require configuration, and already has many ready-to-use add-on modules
 which just require to be plugged-in and configured, without having to do
 any programming at all.

Note that using Tomcat as a web server is nearly as trivial to set up as
Apache httpd: anything that you'd make into a DocumentRoot is a webapp
rooted in a single directory. Anything you'd Alias onto the filesystem
must be the same.

 In both cases, some knowledge of the HTTP protocol is a must, and a good
 knowledge of HTTP is a tremendous help.

+1

You can't administer a server for a system you don't understand. You
don't need to know exactly how a router works, but you need to know what
it's accomplishing.

 Technically, I think that Christopher's earlier benchmarks showed that
 Tomcat can serve simple static content at least as well as Apache httpd.
 Using Apache httpd as a front-end to Tomcat introduces some overhead,
 but with a correct configuration this overhead will be insignificant in
 most real-world situations, compared to what can be achieved (in terms
 of unnecessary overhead) by bad coding in the applications themselves,
 whether they are running under Tomcat or under Apache.

+1

If Tomcat and httpd are on the same machine, the overhead is likely to
be minimal (I haven't httpd-Tomcat performance) due to the tricks most
TCP/IP stacks play with localhost traffic to make it super fast.

Your webapp usually sucks way more than the server ;)

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkxF5E4ACgkQ9CaO5/Lv0PDccQCgsUmYf3g1pKIV7iqzHg8tyv0a
i60Ani+PtwmaFNekAbkdXGvrfEJ5500W
=EluQ
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: How to retrieve persisted session

2010-07-20 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Ashish,

On 7/20/2010 9:58 AM, Ashish Kulkarni wrote:
 Where do i set this max age for session? i dont see any thing in document
 http://tomcat.apache.org/tomcat-6.0-doc/config/manager.html

You will have to write code to do this yourself: Tomcat won't do it for you.

Pid's question about setting the max inactive interval isn't germane,
because you want the JSESSIONID cookie to remain active across a browser
restart, rather than having the server hold on to the session longer
than it is. Setting session-timeout in web.xml (which is the same as
setting maxInactiveInterval on the Manager, though it's more standard)
will not affect the cookie lifetime on the client.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkxGBYoACgkQ9CaO5/Lv0PCgBQCcC8/ysjc/bgmZzYXa3S6Ku0ji
qYcAn3Wf04f2J8jKCQIrTbvnqtXewGsZ
=7yJE
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: APR Tomcat...

2010-07-20 Thread Tony Anecito
Do not worry my friends did not believe me till I sent the before/after logs 
even then they argued about physics and the speed of light :-) Where is 
Einstein 
when you need him?

-Tony



- Original Message 
From: Christopher Schultz ch...@christopherschultz.net
To: Tomcat Users List users@tomcat.apache.org
Sent: Tue, July 20, 2010 11:53:40 AM
Subject: Re: APR  Tomcat...

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Tony,

On 7/20/2010 12:35 AM, Tony Anecito wrote:
 Interesting. I saw that when a static file was around 21K or below a dramatic 
 improvement in recorded time in the log for APR. I have not tried with 
 regular 

 Apache Web Server to see what I get.

I should get off my ass and publish my benchmarking results. These
Tomcat knuckleheads keep releasing new versions, and I feel like I
should repeat my tests with the latest version. :(

Soon. Maybe.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkxF4qQACgkQ9CaO5/Lv0PCaEgCfePU71YPyDFCPi8dhXyQa+WWZ
haIAn3x04yVH94WKjRyRvaAlFis3C+QV
=E0HG
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


  

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Unable to get Tomcat 7 to work in Eclipse

2010-07-20 Thread Austin Shelton
Bizarre. I will keep looking for logs that might tell me something. I'll
keep everyone posted on my efforts, feeble though they may be :-)

On Tue, Jul 20, 2010 at 9:14 AM, Pid p...@pidster.com wrote:

 On 19/07/2010 22:37, Austin Shelton wrote:
  The resource for my web page servlet can't be located. This was not the
  case with Tomcat 6.
 
  Nobody complained once I started getting a good Tomcat launch.

 So it works if Tomcat 7 works, or it doesn't - I'm not clear on what
 that means.

  There are no logs in the Tomcat home.

 Like I said, they are probably not there.  Eclipse uses it's own, I
 don't know where that is in your case, you'll have to work it out.


 p

  On Mon, Jul 19, 2010 at 1:56 PM, Pid p...@pidster.com
  mailto:p...@pidster.com wrote:
 
  On 19/07/2010 20:13, Austin Shelton wrote:
   Hi,
  
   I am unable to get Tomcat 7.0.0 to work correctly with Eclipse
 Helios.
   Tomcat 6 was working just fine; the problem occurred when I
  upgraded to
   Tomcat 7.0. It complained about Resource Not found. I now have it
  working
   to the extent that no errors or warning show up in the console.
  But I do not
   get my page, without errors, to display. Any tips on solving this
  problem?
  
   Thanks
 
  Which resource isn't found?
 
  What complained, your browser, Eclipse, or Tomcat?
 
  What do the Tomcat logs say?  (Note: they may be in a different
 location
  than a normal Tomcat installation)
 
 
  p
 
 





Re: Unable to get Tomcat 7 to work in Eclipse

2010-07-20 Thread Austin Shelton
Well. A message showed up in my Eclipse console that I had overlooked in my
previous launches:

WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting
property 'source' to 'org.eclipse.jst.jee.server:HelloWorldServlet' did not
find a matching property.

(The name of my application is HelloWorldServlet)

Does anyone have an idea about what this means?

On Tue, Jul 20, 2010 at 4:32 PM, Austin Shelton ashelt...@gmail.com wrote:

 Bizarre. I will keep looking for logs that might tell me something. I'll
 keep everyone posted on my efforts, feeble though they may be :-)


 On Tue, Jul 20, 2010 at 9:14 AM, Pid p...@pidster.com wrote:

 On 19/07/2010 22:37, Austin Shelton wrote:
  The resource for my web page servlet can't be located. This was not the
  case with Tomcat 6.
 
  Nobody complained once I started getting a good Tomcat launch.

 So it works if Tomcat 7 works, or it doesn't - I'm not clear on what
 that means.

  There are no logs in the Tomcat home.

 Like I said, they are probably not there.  Eclipse uses it's own, I
 don't know where that is in your case, you'll have to work it out.


 p

  On Mon, Jul 19, 2010 at 1:56 PM, Pid p...@pidster.com
  mailto:p...@pidster.com wrote:
 
  On 19/07/2010 20:13, Austin Shelton wrote:
   Hi,
  
   I am unable to get Tomcat 7.0.0 to work correctly with Eclipse
 Helios.
   Tomcat 6 was working just fine; the problem occurred when I
  upgraded to
   Tomcat 7.0. It complained about Resource Not found. I now have it
  working
   to the extent that no errors or warning show up in the console.
  But I do not
   get my page, without errors, to display. Any tips on solving this
  problem?
  
   Thanks
 
  Which resource isn't found?
 
  What complained, your browser, Eclipse, or Tomcat?
 
  What do the Tomcat logs say?  (Note: they may be in a different
 location
  than a normal Tomcat installation)
 
 
  p
 
 






Re: Self-Contained Web Applications

2010-07-20 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Chuck,

(I mist have missed these replies... I'm resurrecting this thread).

On 6/25/2010 5:44 PM, Caldarale, Charles R wrote:
 From: Jon Brisbin [mailto:jon.bris...@npcinternational.com]
 Subject: Re: Self-Contained Web Applications

 Wouldn't it make sense to scope it to the Context, since 
 you'd be using the webapp's classloader?
 
 Correct.  Note that the desired effect should be achievable by
 including commons-dbcp in its WEB-INF/lib, and coding the application
 to use that.  Completely self-contained, and not dependent on any
 container behavior or capabilities.

Well, having to include commons-dbcp is a bit of an implementation
detail, here. I should be able to include only my own JDBC driver and
have Tomcat figure out that commons-dbcp should be available elsewhere
(say, in the lib directory).

That should work even if the WebappClassLoader is being used to
initialize the DataSource, since it will call up the ClassLoader chain
to find classes not available locally.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkxGRyIACgkQ9CaO5/Lv0PD4bwCgkw/zD0zmMJbjROvneYT0ZCFw
whcAoMBZ8RL2iN2SdFoUqy+3q5LtTIPf
=p0vo
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Self-Contained Web Applications

2010-07-20 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Chuck,

On 6/25/2010 6:01 PM, Caldarale, Charles R wrote:
 From: Pid [mailto:p...@pidster.com]
 Subject: Re: Self-Contained Web Applications

 We can define a DataSource inside a Context already, hook up a locally
 configured Realm, and it'll use a driver from the web app ClassLoader,
 which makes the app completely self contained.

 I don't understand what Chris is getting at.  :s
 
 What I interpreted his posting to mean was he wanted
 container-managed connection pooling (and all other JNDI-based
 resource usage) done without placing any classes in any global
 directory space.

Exactly.

 In other words, the Tomcat classes would use the
 webapp's classloader first before looking in any global locations for
 necessary driver libraries.  This might require having the webapp
 classloader get its own copies of the Tomcat classes, but it sounds
 doable with a bit of re-plumbing.

Today, the install process for a webapp that needs MySQL connections is:

1a. Copy mysql-connector-j.x.y.z.jar into CATALINA_BASE/lib
1b. Make sure you don't have mysql-connector-j.x.y.z.jar in WEB-INF/lib
2. Configure DataSource in META-INF/context.xml
3. Use JNDI to locate and use the DataSource

I'm trying to replace step #1 with:

1. Just but mysql-connector-j.x.y.z.jar into WEB-INF/lib

This would alleviate several irritating issues:

1. People always do what I want to do anyway, and want to know why they
get that weird Cannot load JDBC driver 'null' message

2. The webapp is not self-contained if it requires MySQL and yet does
not include the MySQL JDBC driver library

3. All webapps (that want to use container-provided DataSource services)
are forced to use the same version of the MySQL driver

4. The DataSource currently outlives the Context, which is kind of silly
if the context itself defines the DataSource

Is there an architectural reason why Tomcat has historically done JNDI
DataSources in this way? Is it because of the historical use of global
resources defined in server.xml?

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkxGSMQACgkQ9CaO5/Lv0PCXaQCgsI6mGrHyY+UmH/q7PUO7T4lR
c9sAoJTlaBZIfeC4k1AYDb0hO3dx3ZyF
=XPWU
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



java.lang.NoSuchMethodException: org.apache.catalina.deploy.WebXml addServlet

2010-07-20 Thread Austin Shelton
I cleaned the Tomcat server in Eclipse and now I get the following
exception:

java.lang.NoSuchMethodException: org.apache.catalina.deploy.WebXml
addServlet

I have all of the Tomcat libraries in my build path and the lib
directories of the WEB/INF/lib directory.

Any ideas?


RE: APR Tomcat...

2010-07-20 Thread Caldarale, Charles R
 From: Christopher Schultz [mailto:ch...@christopherschultz.net]
 Subject: Re: APR  Tomcat...
 
  Was that vs BIO or NIO?  As I recall, there is no sendFile 
  capability in BIO, so both NIO and APR should beat that.
 
 BIO = JIO, right? Too many TLAs.

The Tomcat doc refers to the original Connector implementation as BIO, not 
JIO.  Using JIO is ambiguous, since both BIO and JIO are pure Java.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.


RE: Self-Contained Web Applications

2010-07-20 Thread Caldarale, Charles R
 From: Christopher Schultz [mailto:ch...@christopherschultz.net]
 Subject: Re: Self-Contained Web Applications
 
 Well, having to include commons-dbcp is a bit of an implementation
 detail, here. I should be able to include only my own JDBC driver and
 have Tomcat figure out that commons-dbcp should be available elsewhere
 (say, in the lib directory).

But now you're asking commons-dbcp classes (loaded by the common classloader) 
to look _downwards_ in the classloader hierarchy to find the JDBC driver 
they're using for the connections.  I don't think that's going to happen - ever.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.



RE: Self-Contained Web Applications

2010-07-20 Thread Caldarale, Charles R
 From: Christopher Schultz [mailto:ch...@christopherschultz.net]
 Subject: Re: Self-Contained Web Applications
 
 1. Just but mysql-connector-j.x.y.z.jar into WEB-INF/lib

But still use container-provided connection pooling when the container classes 
are loaded by the common classloader.  This is what I was referring to when I 
said the webapp classloader would have to get its own copies of Tomcat classes. 
 Might be doable by extending the classpath of the webapp classloader to 
include some directory containing jars/classes that would be available to each 
webapp (eg, commons-dbcp or tomcat-dbcp) but still loaded by each webapp rather 
than some shared classloader.  Doesn't sound like too much work, but does 
introduce potential versioning complications.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.



Re: Unable to get Tomcat 7 to work in Eclipse

2010-07-20 Thread Konstantin Kolinko
2010/7/21 Austin Shelton ashelt...@gmail.com:
 Bizarre. I will keep looking for logs that might tell me something. I'll
 keep everyone posted on my efforts, feeble though they may be :-)


Maybe you do not have a logging.properties file.

There should be -Djava.util.logging.manager and
-Djava.util.logging.config.file being set to appropriate values in
the launch configuration for Tomcat for the logging to work properly.


By the way,
http://wiki.eclipse.org/WTP_Tomcat_FAQ

 WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting
 property 'source' to 'org.eclipse.jst.jee.server:HelloWorldServlet' did not
 find a matching property.

It is just a warning. That extra attribute (that was set by Eclipse
for whatever reason) is ignored.

Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org