Re: Please help...

2007-09-02 Thread Brian Munroe
On 9/1/07, Brian Munroe [EMAIL PROTECTED] wrote:
 On 9/1/07, Hassan Schroeder [EMAIL PROTECTED] wrote:

 
  If you're talking about TC6, there is no common/lib or shared/lib;
  $CATALINA_HOME/lib is correct...
 

 Oh crap, I was going off my 5.5 install!


Hassan:

Ok, lend me a hand here, besides the incorrect statement about
common/lib, does everything else look fine?

-- brian

-
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 close all the port allocated by tomcat after a doGet() request

2007-09-02 Thread David Delbecq
You certainly do not want to have tomcat stop responding to port it is 
listening too, it would be useless :) Except if you want your tomcat to 
not serve anything to anyone.


If what you want is prevent client browser to use keep-alive connection 
and issue several requests on same connection, take a look at
maxKeepAliveRequests on 
http://tomcat.apache.org/tomcat-5.5-doc/config/http.html



ying lcs a écrit :

Hi,

I have a simple Servlet (stateless) which has a doGet() metohd.

How can I make sure both Tomcat and the client calling that servlet's
doGet()  to close all the ports allocated upon the doGet() request.

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]



Re: full path of 404 file

2007-09-02 Thread Peter Boughton
I'm not really trying to use webapps at all - I want each Host to be
associated with a user account, like this:
Host name=user1.com appBase=/home/user1/public_html.../Host
Host name=user2.com appBase=/home/user2/public_html.../Host
Host name=user3.com appBase=/home/user3/public_html.../Host


On 9/2/07, Bill Barker [EMAIL PROTECTED] wrote:


 Peter Boughton [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
 I mean full system path. (eg: /usr/local/jakarta/tomcat/webapps/index.jsp
 or
  /home/user/domain/public_html/index.jsp or whatever)
  As far as I can tell, the appBase and docBase are correctly pointing to
  the
  webroot dir, but cPanel/WHM auto-configured server.xml/etc so it could
 be
  doing anything.
 

 This looks like you are attempting the common, but unsupported
 configuration
 of trying to make webapps the root of your webapp.  The file should be
 something like /usr/local/jakarta/tomcat/webapps/ROOT/index.jsp.

  I'm tempted to just try wiping the conf dir and manually build up from a
  mimimal configuration...
 
 
  On 9/1/07, Hassan Schroeder [EMAIL PROTECTED] wrote:
 
  On 9/1/07, Peter Boughton [EMAIL PROTECTED] wrote:
   Thanks for the suggestion. I tried access logging, but it's only
   listing
  the
   /index.jsp, not the full path.
 
  Uh, then that *is* the full path; sounds like you need to double-check
  your Tomcat appBase/docBase/etc. configuration...
 
  --
  Hassan Schroeder  [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]
 
 
 
 
  --
  \ \
  Peter Boughton
  blog.bpsite.net
  / /
 




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




-- 
\ \
Peter Boughton
blog.bpsite.net
/ /


Re: full path of 404 file

2007-09-02 Thread Peter Boughton
Ooops.
This is what I currently have:
Host name=localhost appBase=webapps/
Host name=mydomain.com appBase=/home/user0/public_html
Aliaswww.mydomain.com/Alias
Context path= docBase=/home/user0/public_html reloadable=true/
/Host

What do I need to change so that mydomain.com/whatever will load
/home/user0/public_html/whatever ?

On 9/2/07, Mark Thomas [EMAIL PROTECTED] wrote:

 Peter Boughton wrote:
  As far as I can tell, the appBase and docBase are correctly pointing to
 the
  webroot dir,

 and there is the problem. appBase == docBase will result in all sorts
 of pain and grief. The appBase should never point to the root of any
 web application.

 Mark


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




-- 
\ \
Peter Boughton
blog.bpsite.net
/ /


Re: full path of 404 file

2007-09-02 Thread Mark Thomas
Peter Boughton wrote:
 Ooops.
 This is what I currently have:
 Host name=localhost appBase=webapps/
 Host name=mydomain.com appBase=/home/user0/public_html
 Aliaswww.mydomain.com/Alias
 Context path= docBase=/home/user0/public_html reloadable=true/
 /Host
 
 What do I need to change so that mydomain.com/whatever will load
 /home/user0/public_html/whatever ?

I would use:
Host name=localhost appBase=webapps/
Host name=mydomain.com appBase=/home/user0/webapps
Aliaswww.mydomain.com/Alias
/Host

and not define any contexts in server.xml

Contents for the root web application would then be placed in
/home/user0/webapps/ROOT

context for the foobar context in
/home/user0/webapps/foobar

etc

Mark


-
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: full path of 404 file

2007-09-02 Thread Peter Boughton
Ok, tried using that configuration, but I'm still getting the 405 method not
supported error for any jsp file.

Does the fact that it is apparently reaching the right directory now mean
that this is more likely to be a new problem with web.xml rather than
server.xml?


Thanks,

Peter

On 9/2/07, Mark Thomas [EMAIL PROTECTED] wrote:

 Peter Boughton wrote:
  Ooops.
  This is what I currently have:
  Host name=localhost appBase=webapps/
  Host name=mydomain.com appBase=/home/user0/public_html
  Aliaswww.mydomain.com/Alias
  Context path= docBase=/home/user0/public_html
 reloadable=true/
  /Host
 
  What do I need to change so that mydomain.com/whatever will load
  /home/user0/public_html/whatever ?

 I would use:
 Host name=localhost appBase=webapps/
 Host name=mydomain.com appBase=/home/user0/webapps
 Aliaswww.mydomain.com/Alias
 /Host

 and not define any contexts in server.xml

 Contents for the root web application would then be placed in
 /home/user0/webapps/ROOT

 context for the foobar context in
 /home/user0/webapps/foobar

 etc

 Mark


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




-- 
\ \
Peter Boughton
blog.bpsite.net
/ /


tomcat startup w/ aggressiveheap option

2007-09-02 Thread Jeff Schindler

Hello,

I have tomcat 5.5.23 running with Java 1.5.0.11 on Windows Server 2003 SP1. 
I had been running tomcat 5.0 w/ Java 1.4.2 with the exact same Java options 
(including -XX:+AggressiveHeap) and I never had issues with tomcat starting 
up via the Windows service.  Now, if I try to start it up, it fails without 
any error in the logs - if I take out the aggressiveheap option, it starts 
up fine.  I have to reboot the computer to restart tomcat (I think it 
actually starts up fine from the command line, but I'd have to confirm 
that - I'd rather use the service, though).  I had another identical 
deployment that exhibited this same behavior, but somehow magically fixed 
itself after I disabled a couple of other services.  Are there any known 
issues like this?


Thanks,
Jeff 



-
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: Please help...

2007-09-02 Thread Hassan Schroeder
On 9/1/07, Brian Munroe [EMAIL PROTECTED] wrote:

 Ok, lend me a hand here, besides the incorrect statement about
 common/lib, does everything else look fine?

The only discrepancy from my own config is that per the examples
in the JNDI config notes
http://tomcat.apache.org/tomcat-6.0-doc/jndi-datasource-examples-howto.html
I use 'auth=Container.

To be honest, I can't find any other documentation on that -- what
alternative values might be, or their effect. And I just gave it a quick
try with no setting and LambdaProbe's data sources page shows a
blank for Auth -- but accessing that resource still works.

Perhaps someone else can shed some light on this.

But otherwise, your suggested config looks OK to me :-)

HTH,
-- 
Hassan Schroeder  [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: full path of 404 file

2007-09-02 Thread Caldarale, Charles R
 From: Peter Boughton [mailto:[EMAIL PROTECTED] 
 Subject: Re: full path of 404 file
 
 Does the fact that it is apparently reaching the right 
 directory now mean that this is more likely to be a new
 problem with web.xml rather than server.xml?

Sounds like you really need to post your server.xml and WEB-INF/web.xml
files, rather than just hinting about them.  Also, is there anything in
the WEB-INF/lib or WEB-INF/classes directories (e.g., precompiled JSPs)?

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: HTTP method GET is not supported by this URL

2007-09-02 Thread Peter Boughton
Was starting to think the same thing, and then I thought to actually try the
local Host, and all the standard tomcat/webapps code and examples are all
working there.

So, that must mean it's a configuration difference between the main Host and
the one I'm trying to add?

The only thing I can think it might be is web.xml - since that's getting
over-ridden by the example stuff, but I can't see any obvious problems with
it.

Is there any other places where the config might change between hosts?


Thanks,

Peter

On 9/1/07, Hassan Schroeder [EMAIL PROTECTED]  wrote:

 On 9/1/07, Peter Boughton [EMAIL PROTECTED]  wrote:

  Trying to load index.jsp (or any jsp file, even if it doesn't exist)
 results
  in the following:
  HTTP Status 405 - HTTP method GET is not supported by this URL

  Anyone got any suggestions on how to fix it?

 It sounds like your install is totally hosed.

 If it were me, I'd reinstall from scratch, using a fresh tar file, and see
 that it worked out of the box (ROOT/index.jsp, examples, etc.).

 Then try deploying your own app(s).

 FWIW,
 --
 Hassan Schroeder  [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]




-- 
\ \
Peter Boughton
blog.bpsite.net
/ /


Re: Please help...

2007-09-02 Thread Brian Munroe
Mike, just an FYI:

This morning I tried my little 'hello, world' recipe on Tomcat 6;
aside from having to place the driver jar file in $CATALINA/lib,
everything else works the same.

Hope it helps you

-- brian

-
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: Please help...

2007-09-02 Thread Brian Munroe
On 9/2/07, Hassan Schroeder [EMAIL PROTECTED] wrote:


 To be honest, I can't find any other documentation on that -- what
 alternative values might be, or their effect. And I just gave it a quick
 try with no setting and LambdaProbe's data sources page shows a
 blank for Auth -- but accessing that resource still works.


Yea when I was originally struggling with getting connection pooling
working, I was crafting my Resource and was googling like mad trying
to find some reference to what that attribute meant.  Intuition tells
me that it is letting the tomcat container handle authorization to the
resource?  Since I ended up configuring the pool at the local
application level, I assumed I didn't need to worry about it since no
other apps could use the defined resource?  That is my guess at least.

 Perhaps someone else can shed some light on this.

 But otherwise, your suggested config looks OK to me :-)

Thanks for your help!  I just posted about 1 minute previous to your
email - it worked fine in Tomcat  6.

-- brian

-
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 startup w/ aggressiveheap option

2007-09-02 Thread Caldarale, Charles R
 From: Jeff Schindler [mailto:[EMAIL PROTECTED] 
 Subject: tomcat startup w/ aggressiveheap option
 
 I think it actually starts up fine from the command line,
 but I'd have to confirm that

Definitely need to confirm that first, before trying the service.

There are some checks made when setting AggressiveHeap; in particular,
there must be at least 256 MB of physical memory on the system.  There
are also constraints on the relationships between calculated heap size
and PermGen, and between calculated heap size and NewGen; do you have
any other heap-related parameters set?  Are you running with a 2 GB or 3
GB process space (boot-time option in some Windows .ini file)?

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Please help...

2007-09-02 Thread Caldarale, Charles R
 From: Brian Munroe [mailto:[EMAIL PROTECTED] 
 Subject: Re: Please help...
 
 Yea when I was originally struggling with getting connection pooling
 working, I was crafting my Resource and was googling like mad trying
 to find some reference to what that attribute meant.

The auth attribute is the equivalent of res-auth element inside a
web.xml resource-ref setting, as defined in the servlet spec.  The
valid values are Application or Container.

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: full path of 404 file

2007-09-02 Thread Peter Boughton
That's a good idea. :)
I don't have a WEB-INF directory created yet - it does get auto-created,
right?

Anyway, here's /usr/local/jakarta/tomcat/conf/web.xml (with a few million
mime types snipped out):

?xml version=1.0 encoding=ISO-8859-1?
web-app xmlns=http://java.sun.com/xml/ns/j2ee;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd;
version=2.4

!-- This document defines default values for *all* web applications
  --



servlet
servlet-namedefault/servlet-name
servlet-classorg.apache.catalina.servlets.DefaultServlet
/servlet-class
init-param
param-namedebug/param-name
param-value0/param-value
/init-param
init-param
param-namelistings/param-name
param-valuetrue/param-value
/init-param
load-on-startup1/load-on-startup
/servlet


servlet
servlet-namejsp/servlet-name
servlet-classorg.apache.jasper.servlet.JspServlet/servlet-class
init-param
param-namefork/param-name
param-valuefalse/param-value
/init-param
init-param
param-namexpoweredBy/param-name
param-valuefalse/param-value
/init-param
load-on-startup3/load-on-startup
/servlet


servlet
servlet-nameCFMLServlet/servlet-name
servlet-classrailo.runtime.servlet.MultiWebCFMLServlet
/servlet-class
init-param
param-nameconfiguration/param-name
param-value/WEB-INF/railo//param-value
descriptionConfiguration directory/description
/init-param
load-on-startup2/load-on-startup
/servlet




servlet-mapping
servlet-namedefault/servlet-name
url-pattern//url-pattern
/servlet-mapping


servlet-mapping
servlet-namejsp/servlet-name
url-pattern*.jsp/url-pattern
/servlet-mapping

servlet-mapping
servlet-namejsp/servlet-name
url-pattern*.jspx/url-pattern
/servlet-mapping


servlet-mapping
servlet-nameCFMLServlet/servlet-name
url-pattern*.cfm/url-pattern
/servlet-mapping

servlet-mapping
servlet-nameCFMLServlet/servlet-name
url-pattern*.cfml/url-pattern
/servlet-mapping

servlet-mapping
servlet-nameCFMLServlet/servlet-name
url-pattern*.cfc/url-pattern
/servlet-mapping



session-config
session-timeout30/session-timeout
/session-config



mime-mappingextensionabs/extension
mime-typeaudio/x-mpeg/mime-type  /mime-mapping
[snip]
mime-mappingextensionzip/extension
mime-typeapplication/zip/mime-type   /mime-mapping



welcome-file-list
welcome-fileindex.cfml/welcome-file
welcome-fileindex.html/welcome-file
welcome-fileindex.cfm/welcome-file
welcome-fileindex.htm/welcome-file
welcome-fileindex.jsp/welcome-file
/welcome-file-list


/web-app



And this is /usr/local/jakarta/tomcat/conf/server.xml:

Server port=8005 shutdown=SHUTDOWN

GlobalNamingResources
!-- Used by Manager webapp --
Resource
name=UserDatabase
auth=Container
type=org.apache.catalina.UserDatabase
description=User database that can be updated and saved
factory=org.apache.catalina.users.MemoryUserDatabaseFactory
pathname=conf/tomcat-users.xml
/
/GlobalNamingResources

Service name=Catalina
Connector port=8080
enableLookups=false
redirectPort=8443
/
Connector port=8009
enableLookups=false
redirectPort=8443
protocol=AJP/1.3
/

Engine name=Catalina defaultHost=localhost
Realm
className=org.apache.catalina.realm.UserDatabaseRealm
resourceName=UserDatabase
/


Host name=localhost appBase=webapps/

Host name=domain.com appBase=/home/hybrid/public_html
Aliaswww.domain.com/Alias
Context path= docBase=./ reloadable=true/
/Host
!--
Host name=domain.com appBase=/home/hybrid/webapps
Aliaswww.domain.com/Alias
/Host
--

/Engine

/Service
/Server




And In the interests of making sure I'm giving enough information, I should
probably say that I'm doing this via mod_jk from Apache, so if it's useful
then here's my /usr/local/apache/conf/jk.conf file:

JkWorkersFile /usr/local/jakarta/tomcat/conf/workers.properties
JkLogFile /usr/local/apache/logs/mod_jk.log
JkLogLevel info
JkLogStampFormat [%a %b %d %H:%M:%S %Y] 
JkOptions +ForwardKeySize +ForwardURICompat +ForwardDirectories
JkRequestLogFormat %w %V %T

JkAutoAlias 

Re: full path of 404 file

2007-09-02 Thread Hassan Schroeder
On 9/2/07, Peter Boughton [EMAIL PROTECTED] wrote:

 I don't have a WEB-INF directory created yet - it does get auto-created,
 right?

No.

 Anyway, here's /usr/local/jakarta/tomcat/conf/web.xml

You shouldn't have to touch this at all, and I certainly wouldn't make
any changes there until you've got your basic config working.

 ... I should probably say that I'm doing this via mod_jk from Apache,

Yes, you probably should :-) and you absolutely should get your
webapp working properly through direct access first.

It will simplify your debugging immensely...

-- 
Hassan Schroeder  [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: Please help...

2007-09-02 Thread Brian Munroe
On 9/2/07, Caldarale, Charles R [EMAIL PROTECTED] wrote:


 The auth attribute is the equivalent of res-auth element inside a
 web.xml resource-ref setting, as defined in the servlet spec.  The
 valid values are Application or Container.


Chuck:

So I guess I should probably read the Realm Configuration HOW-TO and
Security Manager HOW-TO on the Tomcat documentation page?

-- brian

-
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: Please help...

2007-09-02 Thread Hassan Schroeder
On 9/2/07, Caldarale, Charles R [EMAIL PROTECTED] wrote:

 The auth attribute is the equivalent of res-auth element inside a
 web.xml resource-ref setting, as defined in the servlet spec.  The
 valid values are Application or Container.

OK, in a resource-ref, res-auth is a mandatory element. What does
that imply about leaving it out of a Resource in a Tomcat config?

What's the default?

-- 
Hassan Schroeder  [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: Please help...

2007-09-02 Thread Caldarale, Charles R
 From: Brian Munroe [mailto:[EMAIL PROTECTED] 
 Subject: Re: Please help...
 
 So I guess I should probably read the Realm Configuration HOW-TO and
 Security Manager HOW-TO on the Tomcat documentation page?

Not really.  The Realm configuration documents how clients login to
applications, not how Tomcat (or your app) login to external resources.
The Security Manager describes how to place limits on what application
code can do within Tomcat.  Neither are relevant here.

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Please help...

2007-09-02 Thread Caldarale, Charles R
 From: Hassan Schroeder [mailto:[EMAIL PROTECTED] 
 Subject: Re: Please help...
 
 OK, in a resource-ref, res-auth is a mandatory element. What does
 that imply about leaving it out of a Resource in a Tomcat config?
 
 What's the default?

I take it you've noticed there's not a whole lot of documentation on
Resource...

Looking at the code, the default is indeed Container, which would be the
typical usage.

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Please help...

2007-09-02 Thread Hassan Schroeder
On 9/2/07, Caldarale, Charles R [EMAIL PROTECTED] wrote:

 I take it you've noticed there's not a whole lot of documentation on
 Resource...

Oh, yeah, I've noticed. :-)

 Looking at the code, the default is indeed Container, which would be the
 typical usage.

Thanks for the clarification!

-- 
Hassan Schroeder  [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: Please help...

2007-09-02 Thread Brian Munroe
On 9/2/07, Caldarale, Charles R [EMAIL PROTECTED] wrote:

 Not really.  The Realm configuration documents how clients login to
 applications, not how Tomcat (or your app) login to external resources.
 The Security Manager describes how to place limits on what application
 code can do within Tomcat.  Neither are relevant here.


Ok, how about JNDI Resources HOW-TO, which then links to the
Resource definition [1]  ;)

After digesting that, it seems like auth=Container is what should be
used when doing connection pooling, since Tomcat will be managing the
resources?

Am I getting any warmer here?

-- brian

[1] - 
http://tomcat.apache.org/tomcat-5.5-doc/config/context.html#Resource%20Definitions

-
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: Please help...

2007-09-02 Thread Caldarale, Charles R
 From: Brian Munroe [mailto:[EMAIL PROTECTED] 
 Subject: Re: Please help...
 
 After digesting that, it seems like auth=Container is what should be
 used when doing connection pooling, since Tomcat will be managing the
 resources?

Correct.  It appears that Container is the default, but setting it
explicitly certainly won't hurt.

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Please help...

2007-09-02 Thread Brian Munroe
On 9/2/07, Caldarale, Charles R [EMAIL PROTECTED] wrote:


 Correct.  It appears that Container is the default, but setting it
 explicitly certainly won't hurt.


Gotcha, thanks.

-- brian

-
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: full path of 404 file

2007-09-02 Thread Peter Boughton
  I don't have a WEB-INF directory created yet - it does get auto-created,
  right?

 No.

Ooops. :$

I created WEB-INF, chmod-ed, and it starts working now.


(Well, the CFMLServlet works, the JSP servlet doesn't, but I don't really
need that so I'm content to leave it.)


Thanks to everyone for all the help  suggestions. :)


Peter

On 9/2/07, Hassan Schroeder [EMAIL PROTECTED] wrote:

 On 9/2/07, Peter Boughton [EMAIL PROTECTED] wrote:

  I don't have a WEB-INF directory created yet - it does get auto-created,
  right?

 No.

  Anyway, here's /usr/local/jakarta/tomcat/conf/web.xml

 You shouldn't have to touch this at all, and I certainly wouldn't make
 any changes there until you've got your basic config working.

  ... I should probably say that I'm doing this via mod_jk from Apache,

 Yes, you probably should :-) and you absolutely should get your
 webapp working properly through direct access first.

 It will simplify your debugging immensely...

 --
 Hassan Schroeder  [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]




-- 
\ \
Peter Boughton
blog.bpsite.net
/ /


Re: Threads in tomcat application.

2007-09-02 Thread Juha Laiho
Manivannan Palanichamy wrote:
 I need to design a web application that may use threads. Thats, the web
 application might have to read some 200 files from network. In order to
 speed up the process, I've decided to use threads/thread pooling. But,
 however I know it is not a good practice to use threads in a web/server
 application... Just want to know whether this will be a great impact in
 future.. Otherwise, do you suggest any alternative design for the above
 problem? Looking forward a quick reply :-)


This might be a correct place for multithreading: slowness is somewhere
else than actual processing load of the server (and most probably
implementing this with multithreading will not saturate the network
connection of the server for extended times, either). So, one danger
of multithreading (as with all multiprocessing) is that your application
can starve itself of resources, and make the server spend most of its
time switching from one task to another (trashing). Tune the pool small
enough to avoid this danger, but large enough to benefit of being able to
interleave several tasks.

That being said, a long-running server application (such as a webapp running
under Tomcat) needs different care with threads than a end-user application.

Potential issues you'll need to handle in your code:
- threads may get stuck while attempting to do something (esp. when you're
  reading data over network); make sure your code doesn't have any place
  where a thread may hang for an indefinite time; make sure each thread
  will terminate with predetermined results for each possible case
  (otherwise your code will leak threads, and through that, memory)
- make sure all threads teminate also when the application is undeployed
  (for whatever reason, such as deploying a newer version of the webapp;
  again, this is to avoid memory/thread leaks)
- if possible, make all threads as daemon threads - so that a hung
  thread will not prevent Tomcat Java process from exiting
-- 
..Juha

-
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: jk 1.2.14 connector connection problem

2007-09-02 Thread Martin White

Just in case any other poor soul is trying to sort out such an error, thought
I'd post my discovery after 6 hours of hair pulling...!

The documentation I was following to set up the ISAPI redirector stated that
I should create the ISAPI filter on the Web Sites folder in IIS. I did this,
and all was well until I created a second website on my IIS server. I had
the Default Web Site set up already, and decided to create a temporary
'SiteDown' website to serve up an information page while the main site was
down and Tomcat being upgraded.

Once I restarted IIS, it seems that either IIS or the ISAPI filter, I'm not
sure which, decided that incoming requests picked up by the filter should be
forwarded to my SiteDown web site instead of (or possibly as well as) my
Default Web Site. Since I hadn't created the jakarta virtual directory in my
SiteDown website, this didn't work! My solution was to create the filter on
the Default Web Site and remove it from the Web Sites folder.

The key error message in the ISAPI redirect log file that indicates that
this is your problem is:
[/jakarta/isapi_redirect.dll] is not a servlet url.

Martin



Derrick Koes wrote:
 
 I've run with this configuration elsewhere without error.  I'm not certain
 what the issue is.  I have this same problem without using the
 loadbalancer worker.  I can't even get to jkstatus.  Any help is greatly
 appreciated.
 
 server.xml
 
 ?xml version='1.0' encoding='utf-8'?
 Server
   Listener
 className=org.apache.catalina.mbeans.ServerLifecycleListener/
   Listener
 className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener/
   GlobalNamingResources
 Environment name=simpleValue type=java.lang.Integer value=30/
 Resource auth=Container description=User database that can be
 updated and saved name=UserDatabase
 type=org.apache.catalina.UserDatabase/
 ResourceParams name=UserDatabase
   parameter
 namefactory/name
 valueorg.apache.catalina.users.MemoryUserDatabaseFactory/value
   /parameter
   parameter
 namepathname/name
 valueconf/tomcat-users.xml/value
   /parameter
 /ResourceParams
   /GlobalNamingResources
   Service name=Catalina
 Connector URIEncoding=UTF-8 acceptCount=100
 connectionTimeout=2 disableUploadTimeout=true port=8080
 redirectPort=8443
 /Connector
 Connector URIEncoding=UTF-8 port=8009 protocol=AJP/1.3
 protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler
 disableUploadTimeout=true maxProcessors=0 redirectPort=8443
 debug=9
 /Connector
 Engine defaultHost=localhost jvmRoute=djk name=Catalina
   Host appBase=webapps name=localhost
 Logger className=org.apache.catalina.logger.FileLogger
 prefix=localhost_log. suffix=.txt timestamp=true/
   /Host
   Logger className=org.apache.catalina.logger.FileLogger
 prefix=catalina_log. suffix=.txt timestamp=true/
   Realm className=org.apache.catalina.realm.UserDatabaseRealm/
 /Engine
   /Service
 /Server
 
 workers.properties
 
 # +++ BEGIN CONFIGURATION
 ++
 # 
 # http://jakarta.apache.org/tomcat/connectors-doc/config/workers.html
 #
 # The following configuration file describes a JK installation
 # which does round-robin, session-aware load balancing across all
 # defined workers.  Having a single worker will balance the load on
 # that worker.  This is the default, even if you don't spell it out,
 # but it is spelled out here for clarity.  @TODO indicates a 
 # configuration must be made here.  @OPTIONAL indicates an optional
 # customization may be made.
 #
 # workers.properties -
 #
 #   Copyright 1999-2004 The Apache Software Foundation
 # 
 #   Licensed under the Apache License, Version 2.0 (the License);
 #   you may not use this file except in compliance with the License.
 #   You may obtain a copy of the License at
 # 
 #   http://www.apache.org/licenses/LICENSE-2.0
 # 
 #   Unless required by applicable law or agreed to in writing, software
 #   distributed under the License is distributed on an AS IS BASIS,
 #   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
 implied.
 #   See the License for the specific language governing permissions and
 #   limitations under the License.
 #
 #
 # This file provides jk derived plugins with the needed information to
 # connect to the different tomcat workers.  Note that the distributed
 # version of this file requires modification before it is usable by a
 # plugin.
 #
 # As a general note, the characters $( and ) are used internally to define
 # macros. Do not use them in your own configuration!!!
 #
 # Whenever you see a set of lines such as:
 # x=value
 # y=$(x)\something
 #
 # the final value for y will be value\something
 #
 # Normaly all you will need to do is un-comment and modify the first three
 # properties, i.e. workers.tomcat_home, workers.java_home and ps.
 # Most of the configuration is derived from these.
 #
 # When you are done