of Tomcat 4.1 and 5 will also allow a Loader to be
nested inside the DefaultContext.
- my class itself goes into $CATALINA_HOME/server/lib
Yes, or in $CATALINA_HOME/common/lib
the docs don't make it clear what the mechanics should be
thanks again
bammi
-Original Message-
From: Glenn
I have done this but I started by extending org.apache.catalina.loader.WebappLoader,
then overriding anything I needed to customize.
Regards,
Glenn
Jwahar Bammi wrote:
I want to write my own custom web application class loader, for Tomcat 4.1*
(and hopefully it will continue to work for Tomcat
[October 11, 2003]
The Tomcat team is pleased to announce the release of version 1.2.5 of the Apache
Tomcat mod_jk web server connector.
Tomcat is the reference implementation of a web application server which implements
the Java Servlet and JavaServer Pages specifications.
mod_jk is a connector
Sergio Juan wrote:
Hi.
I'm currently working in a complex web application. In a stage of development, we
wanted to control access to files
from the users, and we got all the logic in a SecurityManager of its own. As we were
not very familiar with all the
capacities of the Security Manager, we
The Tomcat team has released version 1.2.4 of the Tomcat mod_jk web server connector.
This version fixes a number of minor bugs and ports all features from the Apache 1.3
version
to the Apache 2 version of mod_jk 1.2.
See the file CHANGES.txt in the source distribution for a complete list of
It looks like you have mod_jk 1.2 installed in Apache but have
JK2 configured in Tomcat. These two are not compatible.
Posting your apache mod_jk config and the connector portion of your
tomcat server.xml would make it much easier to answer your question.
I would also recommend upgrading apache
Your second Host config sets the appBase to a war file, this is not valid,
it has to be a directory.
Glenn
Andoni wrote:
Hello,
I have two configurations: 1st one works 2nd doesn't. I want to get the 2nd
to work though as it stops .war files unpacking. Can anyone tell me how to
make the 2nd
If you are using mod_jk 1.2 for Apache your Connector on the Tomcat side
needs to be Ajp13 instead of Coyote. Here is an example:
Connector className=org.apache.ajp.tomcat4.Ajp13Connector
port=8009 minProcessors=5 maxProcessors=75
acceptCount=10
Run Tomcat with the Java SecurityManager (-security startup option) and only
grant the minimum permissions necessary to your webapp. See the Security
Manager HOWTO in the Tomcat docs.
Glenn
Anderson, M. Paul wrote:
I am preparing to launch my first web site utilizing an Apache/Tomcat
In Tomcat 4.0 the URL used for the codeBase for jar files located in
/WEB-INF/lib starts with jar:file:..., your grant below starts
with file: Those are two different codeBases! The SecurityManager
is very picky about where code comes from when granting permissions,
the URL must start with
Start tomcat with the property javax.security.debug=access,failure so that
you can capture debug information for the SecurityManager. Also read the
SecurityManager-HOWTO that comes with tomcat.
Glenn
Mok Swee Loong wrote:
Dear all,
Just started with tomcat 4.1.2, i am trying to run things a
So you can edit the tomcat.policy file but not specify what properties are
set when Tomcat is started? What a trusting app hosting service.
By default Tomcat will grant a file read permission to the root of
your web application context, in this case /home/.sites/5/site513/web/.
But all of the
Regarding sessions, by default a JSP page creates a session.
All your JSP pages which don't require a session should have
the attribute session=false set in the page directive.
The number of threads being used is not related to session management.
To troubleshoot problems running out of
I have the following in production:
Tomcat 4.1, JDK 1.3.1, and MySQL on a Dual CPU Sun 250 app server and Apache
using mod_jk 1.2 on a separate server. We are now getting 4 weeks continuous uptime.
I stop and restart Tomcat once each month because the minimum memory the java heap
uses over time
Mr. Tomcat wrote:
Is there a way to turn off tag object pooling? Object pooling was a
cool performance technique in earlier versions of Java, but now object
creation is very fast, so it no longer serves a performance function,
and it introduces extra complexity into tag object design. Is this
SecurityManager permission problems are much easier to debug if you start tomcat
with the -Djava.security.debug=access,failure property defined, then
check your logs for the string denied. Then review the stack trace
and the ProtectionDomain which failed.
Regards,
Glenn
[EMAIL PROTECTED]
Luiz Ricardo wrote:
Hello,
I can not access an web application deployed in a war archive. I am using
Apache 1.3 + mod_jk and in my server.xml the attribute unpackWARs is false,
in my mod_jk.conf I use JkAutoAlias. Does anyone knows if JkAutoAlias and
unpackWARs=false work?
No they do not.
Glenn Nielsen
[EMAIL PROTECTED]To: Tomcat Users List [EMAIL
Make sure you configure apache to forbid access to any
/WEB-INF/ and /META-INF/ directories. You also may want
to forbid access to *.war files in your DocumentRoot.
If you use the lastest version of mod_jk 1.2 it will do this
for you automatically if you use the JkAutoAlias config directive.
If it keeps looping your index.jsp may be doing a jsp:forward to itself.
Renato wrote:
Hi all,
I'm using Tomcat 4.0.6 and I found the following message that is looping and filling up my log:
)
at java.security.AccessController.doPrivileged(Native Method)
at
DBCP logging and removal of abandoned connections works for me.
Check all your logs, the stack traces should be there.
If you don't find any stack traces post your DBCP xml config after
obfuscating any sensitive data like passwords of course.
Glenn
[EMAIL PROTECTED] wrote:
Hello,
Ive
Check your catalina.policy and see if the following 4 permissions are
granted in the default policy:
// Required for sevlets and JSP's
permission java.lang.RuntimePermission accessClassInPackage.org.apache.catalina.util;
permission java.lang.RuntimePermission
loads timing out on them? That doesn't seem to be happening.
Does this indicate a fault in apache or is it normal for apache to send
partial requests without closing the connection?
Any further guidance?
Thanks,
Lindsay
Glenn Nielsen wrote:
One way to start debugging this type of problem
Did you ever try running tomcat with the property -Djava.security.debug=access,failure
set? The debug output from that can usually help you track down the source of a
security policy configuration problem.
Regards,
Glenn
Andrew Cheng wrote:
I am using tomcat version 4.0. I have tried adding
One way to start debugging this type of problem is to tell the java
process running Tomcat to do a Thread Stacktrace Dump.
kill -QUIT java processid
Then analyze the stack traces for all threads.
Regards,
Glenn
Lindsay Patten wrote:
Hi,
I thought I would take a different tack on my problem
For applications which require root permissions we do the following:
Apache mod_jk (non root) -AJP- Tomcat (non root) -SSL- Tomcat SOAP server (root)
Any business logic which requires root permission is implemented as a
SOAP web service in the SOAP server which runs as root. That SOAP
server is
-user-help;jakarta.apache.org
--
--
Glenn Nielsen [EMAIL PROTECTED] | /* Spelin donut madder|
MOREnet System Programming | * if iz ina coment. |
Missouri Research and Education Network
For Apache 1.3, mod_jk 1.2, and Tomcat 4.1 I use the following generic config
on a per virtual host basis. In my case I set the server.xml Host appBase for
each virtual host to their Apache Document root.
VirtualHost xxx.xxx.xxx.xxx:80
DocumentRoot /path/to/apache/document/root/for/host
If you have the develop init paramter for the JspServlet in $CATALINA_HOME/conf/web.xml
set to false JSP page recompiles happen in the background no more frequently than
the time set in the JspServlet init paramter checkInterval.
The Context/Host reloadable flag is only for performing class
Johann Uhrmann wrote:
Hi,
is there a known problem / bug with defining resources in the
DefaultContext?
Not that I know of. I use the DefaultContext for defining a DataSource
which is then available to all web applications. Check your DefaultContext
config. Make sure it is located
Put the properties file in the /WEB-INF/classes directory and
use ResourceBundle.getBundle(foo); The name of the properties
file without .properties.
Regards,
Glenn
Niaz Habib wrote:
Justin,
I am facing the same problem. Your approach seems to be an elegent one.
Would you mind
JkAutoAlias and JkRequestLogFormat are only implemented in mod_jk 1.2 for Apache 1.3.
Matt Raible wrote:
I'm trying to use the JkAutoAlias directive as documented at:
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk/aphowto.html#mod_
jk%20Directives
Here's is my snippet from
xalan.jar, but I am using the latest 1.x release
of xerces. AShould I use the 2.x versions of xerces?
I was going with the recommended version the docs say to, which is 1.4.4
I beleive.
??
-Chuck
Glenn Nielsen wrote:
Check the version of xalan and xerces being used by Ant.
I had
This sounds like the bug I fixed in Tomcat 4.1.x where infrequently I saw
a POST request put Tomcat into an infinite loop. We run Apache and Tomcat
on different servers. I had noticed the increased CPU usage on the Tomcat
server but hadn't noticed the increased CPU usage on the Apache server.
I
Check the version of xalan and xerces being used by Ant.
I had similar problems with some older versions of these.
I have no problem with the latest releases of both of the above.
Chuck Carson wrote:
Does anyone run into this problem when building on Solaris.
About 75% into the build
For a medium to high volume site using Apache to serve static
content (static html, images, css, etc.) is:
1. Faster and more reliable (no pauses due to JVM garbage collection, etc.)
2. Takes that load off of Tomcat so it can concentrate on dynamic content.
(JSPs/Servlets)
3. Allows you to do
Craig R. McClanahan wrote:
On Sun, 29 Sep 2002 [EMAIL PROTECTED] wrote:
Kent,
I think we are on the same track , Apache was designed for that purposes
, is more robust and mature and certainly has less security related
issues.
Regarding maturity, I presume you're talking about 1.3,
You may want to start Tomcat with the java -verbose:gc arg next time.
Information about TC including how long it took will be sent to stdout.
This behaviour could be related to your JVM memory configuration/stack usage
and garbage collection.
Brandon Cruz wrote:
Mike,
Thanks for answering.
Robert L Sowders wrote:
Since most of the questions to tomcat-users list concern installation and
configuration issues it demonstrates that there is a real need for Tomcat
to have a documentation project that it's users can contribute to. Right
now most of the documentation consists of the
Have you used the java arg -verbose:gc to track JVM memory usage?
top won't tell you whether you have a memory leak because of how the JVM
manages its own memory internally. The amount of memory the JVM uses
will grow until it reaches the maximum size set for its stack.
Then it will do a
The discussion regarding Tomcat 4.1.12 was not related to its stability.
I have been using Tomcat 4.1.x in production for over 6 months
(but still with Jasper1), and recently upgraded to Jasper 2.
IMHO, Tomcat 4.1.x is a much better container for production than 4.0.x.
All of the issues raised
Brad Plies wrote:
I am not aware of all the performance implications of
this, but it should be possible to create a Thread to
run on some interval you define which just infinitely
loops a call for garbage collection (gc() right?) then
goes back to sleep until next iteration.
This is a
, Glenn Nielsen wrote:
Your config isn't configured to use DBCP. It is missing the following:
parameter
namefactory/name
valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
/parameter
That is why none of the DBCP features were working
The easiest way to track JVM garbage collection is to start java with the
-verbose:gc arg. This enables GC data output to stdout.
Regards,
Glenn
Raj Saini wrote:
I am experiencing the same problem with tomcat 4.0.3. I have my JVM memory
setting as -Xms=32 -Xmx=384 and running the tomcat on
find tomcat bugy, i might downgrade.
Amitabh
-Original Message-
From: Glenn Nielsen [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 24, 2002 11:04 PM
To: Tomcat Users List
Subject: Re: DBCP pool always increasing
In the config you posted you didn't have RemoveAbandoned
There is a clear separation for the web applications themselves.
There isn't when you allow the different virtual hosts to use the
manager to deploy web applications.
I would configure a different appBase for each Host, that way each
host has a separate directory where their webapps are located
What do you mean by your pool is increasing in size? That the number of open
connections to the db is increaing? What is the indicator that this
is happening? The more specific you can be the better chance that someone
can answer your question.
Glenn
Amitabh Dubey wrote:
Hello All,
I
abandones was set to true and the timeout value was 5 secs. But these
values seem to be ignored. So the only sure way out is to close everything
explictly.
Amitabh
-Original Message-
From: Glenn Nielsen [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 24, 2002 7:22 PM
To: Tomcat
A patch to fix the JDBCStore null pointer bug has been committed to CVS.
It was too late to make it into the Tomcat 4.1.11 release done this morning.
But will be available in the next nightly build or you can wait for the
Tomcat 4.1.12 release.
Regards,
Glenn
Ronald Klop wrote:
-BEGIN PGP
)
at
org.apache.jasper.JspCompilationContext.load(JspCompilationContext.java:496)
--
To unsubscribe, e-mail: mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]
--
--
Glenn Nielsen
I also use mod_jk 1.2 with virtual hosting and allow the appBase
for Tomcat to be the document root for apache.
I use JkAutoAlias. It will automatically serve static files for
any webapp and return a 403 error if someone tries to access
a webapps /WEB-INF or /META-INF directories.
See the docs
[EMAIL PROTECTED] wrote:
Hello,
I would like to use Jikes with Tomcat.
There is in the documentation of Tomcat:
If you wish to use Jikes to compile JSP pages:
Download and install jikes.
Set the init parameter compiler to jikes.
Define the property -Dbuild.compiler.emacs=true
Create the directory temp in your CATALINA_HOME if it doesn't exist.
Miguel Angel Mulero Martinez wrote:
I just have joining to he list, and I have searched in the old messages but
I haven't found this:
I have installed the new Tomcat 4.1.10, under Win2000. My problem is that if
I execute
Craig R. McClanahan wrote:
Tomcat 3.2 used CLASSPATH the way you are asking for. It resulted in
CLASSPATH problems being the second largest catecategory of user problems
(behind configuring web connectors, but only barely).
Tomcat 3.3 and 4.x ignore CLASSPATH, and this category of user
Use Object Relational Bridge:
http://jakarta.apache.org/ojb/
You can run it on a seperate system and use it to persist objects
for all three instance of Tomcat.
Regards,
Glenn
Santosh Kulkarni wrote:
Hi,
I have multiple instances of Tomcat4.0.3, say, TC1,
TC2, TC3 running on different
Hah! Back many months ago the problem you are reporting would cause
an infinite loop in the Processor. So I fixed the infinite loop bug
and added code to report when these POST problems occur. I don't know
what the source of the problem is, perhaps the remote client is aborting
the connection
) = 4
Was this completely because tomcat connector only?
Regards,
Rossen
-Original Message-
From: Glenn Nielsen [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 11, 2002 11:06 AM
To: Tomcat Users List
Subject: Re: POST request processing failure
Hah
It would help if you also set debug=10 or so for your Tomcat Connector in server.xml.
And captured the Connector debug output.
Regards,
Glenn
Habibak haAlbek wrote:
Hello,
I have installed and configured Apache 1.3.26 with modssl and openssl + tomcat 4.0.4
with the corresponding Apache
The JVM will grow to as much memory as you configure for its max, you can set this with
the java arg -Xmx.
Then the JVM manages its heap internally.
Add this arg to java when you start Tomcat -verbose:gc, this will cause
information about garbage collection to be output. And show you data
The permission denied can be generated one of two ways.
First, the catalina.policy file must grant the correct FilePermission.
Even if the correct FilePermission is granted in catalina.policy, you
still have to comply with normal unix file ownership/permissions.
If it is a catalina.policy
the
compiler init paramter and set it to jikes.
Regards,
Glenn
Glenn Nielsen wrote:
Tomcat 4.1 uses Jasper 2.
Jasper 2 was changed to use Ant to compile JSP pages and no longer supports
the config below for using Jikes.
But you can tell Ant to use jikes for compiling by defining the following
Brian Millett wrote:
On Sun, 2002-09-08 at 08:39, Glenn Nielsen wrote:
I found a few problems using jikes with Jasper 2. These have been fixed
and should be in the new nightly build and will be in the next Tomcat 4.1.x
release. Refer to the comments in conf/web.xml for configuring jikes
Tomcat 4.1 uses Jasper 2.
Jasper 2 was changed to use Ant to compile JSP pages and no longer supports
the config below for using Jikes.
But you can tell Ant to use jikes for compiling by defining the following
property to java when starting Tomcat:
-Dbuild.compiler=jikes
Regards,
Glenn
Nicholas Orr wrote:
Well is there a way to isolate it to a context??
Reason I'm asking is in IIS it lets you specify a script timeout value, I
was just wondering if there is a similar feature in Tomcat.
NO
Nicholas Orr
-Original Message-
From: Glenn Nielsen [mailto:[EMAIL
++61 7 38338042
**
--
To unsubscribe, e-mail: mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]
--
--
Glenn Nielsen
If you are using mod_jk 1.2 you can use the JkAutoAlias directive to
tell Apache to automatically serve static content for all webapps.
pUse the mod_jk JkAutoAlias directive to map all web application context
directories into Apache's document space. Attempts to access the codeWEB-INF/code
or
A good way to debug these types of problems is to tell the JVM to do a
Thread stack dump. By reviewing the stack for each processor you can
get an idea of what may be causing a problem. On unix you send the
JMV a -QUIT signal. On Windows I think you use CTRL-D in the console
for Tomcat.
this to work?
Thanks
-Original Message-
From: Glenn Nielsen [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 28, 2002 4:46 AM
To: Tomcat Users List
Subject: Re: jkmount possibilities
If you are using mod_jk 1.2 you can use the JkAutoAlias directive to
tell Apache
I had this same problem, appending ?autoReconnect=true to your connect URL does work.
Regards,
Glenn
Paul Phillips wrote:
Hello
I would suggest trying either of the following:
parameter
nameautoReconnect/name
valuetrue/value
/parameter
I know that the above does
The advantage of letting the container (Tomcat) setup a JNDI DataSource
is abstraction. It abstracts out the source of data from the web application.
You no longer have to configure somewhere within your web application the
db connection, user, password, etc.
This allows you to have a
java.util.ResourceBundle.getBundle() uses the current ClassLoader to load
your resource bundle. That means that your properties have to either be
located with a jar file in /WEB-INF/lib or in your /WEB-INF/classess directory.
This isn't a limitation of Tomcat, this is how resource bundles work.
properties db in WEB-INF/config ?
-Message d'origine-
De : Glenn Nielsen [mailto:[EMAIL PROTECTED]]
Envoyé : mardi 27 août 2002 15:32
À : Tomcat Users List
Objet : Re: Loading properties files
java.util.ResourceBundle.getBundle() uses the current
ClassLoader to load
your resource bundle
if i keep a xml file, with all the
parameters for database connection in it, and keep it
in web-inf of the application, and load it while
starting the application from a startup servlet.
so if i change the app server, i dont have to worry
about setting JNDI in that app server,
Ashish
--- Glenn
Yes, I do this. Apache, webspace, and webapps are located on one server.
Tomcat is running on its own dedicated server which can access the webapps
via NFS.
Regards,
Glenn
Marc-Henri PAMISEUX wrote:
Hi,
Is it possible to use Tomcat with a Webapp on a network share (with NFS
or SMB) ?
Hmm, this example code should get added to the Tomcat JNDI-DataSource-HOWTO. :-)
Craig R. McClanahan wrote:
On Tue, 27 Aug 2002, Short, Dave wrote:
Date: Tue, 27 Aug 2002 09:08:58 -0700
From: Short, Dave [EMAIL PROTECTED]
Reply-To: Tomcat Users List [EMAIL PROTECTED]
To: 'Tomcat Users
Per the javax.sql javadocs...
When a Connection is closed it closes any open Statements.
When a Statement is closed, it closes any open ResultSets.
If you just dereference a connection (non connection pool) when the
Connection is GC'd it is closed.
If you use DBCP 1.0 as your connection pool
What connection pool are you using, DBCP?
Rick Reumann wrote:
I have connection pooling set up on Tomcat. In my server.xml file I
have added to the ResourceParams:
parameter
namevalidationQuery/name
valueSELECT 'CRAP' FROM DUAL/value
/parameter
The connection pooling seems to
That article is for using mod_webapp as the connector between
Tomcat 4 and Apache. I wouldn't necessarily consider that
a best practice. I have found mod_jk 1.2 a better solution
for my needs.
With mod_jk 1.2 I use the Apache mod_jk config directive JkAutoAlias.
This automatically maps Apache
When using a pooled db connection you should always set your connection object = NULL
after closing the connection. In a connection pool, calling close() returns the
connection
back to the pool so that it can be reused. It could get reused immediately by another
request.
Here is the sequence
I have also seen this with the following setup.
Solaris 8 on Sun Sparc
Java 1.3.1_04
Tomcat 4.1.8/Jasper 1
mm.mysql 2.0.14
Apache 1.3.26 with mod_jk and Ajp13 connector.
DBCP
In my case from reviewing all of the tomcat logs I found that the
Communication link failure looks like a symptom of
It is done for security reasons so that the JVM instance for Tomcat isn't
using the same temp directory as other applicaitons on the system.
Also so that there is a common temp directory path that is system neutral.
This is more secure when you lock down Tomcat with the SecurityManager and
a
Richard Smith wrote:
Hi All,
Just wondering if you could help me clarify a few questions I have about
tomcat
and catalina.policy. Im running tomcat 4.0.4 (w/ security manager) with
mod_jk
on solaris with about 300+ users, all of whom can deploy jsp/servlets
from their public_html
Do not remove this temp directory. This is the temporary
directory configured in the Tomcat startup with
-Djava.io.tmpdir. This temp directory is used by the JVM
for internal things like jar files, etc.
Regards,
Glenn
Eddie Ruvinsky wrote:
I don't believe this is the case. According to the
For mod_jk 1.2 you can use JkAutoAlias to automatically server static
pages for any web application context, even new ones which get added.
Here is an example for the apache httpd.conf:
JkAutoAlias /usr/local/tomcat/webapps
JkMount /*.jsp ajp13
JkMount /*/servlet/ ajp13
Regards,
Glenn
David
I have done alot of work with Apache 1.3/Tomcat 4.1.X setting up virtual hosting
in a web hosting environment. Please see my attached document.
Regards,
Glenn
Hans Kaiser wrote:
Hi,
nobody knows how to solve it, or is it too simple for an answer?
best regards,
Hans
Hello all!
Is
work by using CVS repositories
and setting up Ant to build the applicaiton.
This is a wierd one.
Thanks for any help!
Joe
--
--
Glenn Nielsen [EMAIL PROTECTED] | /* Spelin donut madder|
MOREnet System
file for details about
the changes included in this release.
Craig McClanahan
--
--
Glenn Nielsen [EMAIL PROTECTED] | /* Spelin donut madder|
MOREnet System Programming | * if iz ina coment
application.
In case you have questions in the future, you may want to refer to the
presentation I did on Tomcat Server and Application Security at ApacheCon
2001.
http://www.more.net/events/apachecon2001/
Regards,
Glenn
--
Glenn
88 matches
Mail list logo