Something will eventually call bin/startup.sh (or bin/catalina.sh).
Changing bin/startup.sh (or bin/catalina.sh) is typically a bad idea.
Whatever is calling that should export JAVA_OPTS first.
For example:
export JAVA_OPTS='-Xmx256m'
- or -
export JAVA_OPTS='-Xmx256m -Djava.awt.headless=true'
You probably want to implement your own DirContext. See FileDirContext
and WARDirContext - which is how Tomcat serves Files from disk or WAR
files. Of course this solution makes your webapp tomcat dependent and
you'll need to place new classes/jars into the server classloader.
-Tim
gerv...@po
My first inclination is that this a bug or enhancement request.
From a user point of view, if I have an app (which is not the root
webapp) and I stop it, then all requests should then go to the root
webapp. Of course doing this might introduce bad side effects during the
course of an applicati
to make. (Too lazy to
look up the bug report)
[Personally - I'd rather stick apache in front let apache trap the
condition during the outage window and not worry about the rest.]
-Tim
Caldarale, Charles R wrote:
From: Tim Funk [mailto:funk...@apache.org]
Subject: Re: Custom 404 page
I am assuming loader is an instance of a classloader. The classloader
doesn't see the conf directory. (But as your noticed - it does see the
common directory)
Your "easiest" (but tomcat specific) solution is to do something like this:
File confDir = new File(System.properties("catalina.home"),
Since there is manual intervention to stop the app. There can be manual
intervention to tell apache not to forward requests to tomcat, for example:
- change the apache config and graceful restart (but it does require a
restart)
- Use mod_rewrite to look for some marker (file existence or rewrite
Put this in a JSP all by itself - you should get an error (or at least -
I did):
<%request.setAttribute("aList", new java.util.ArrayList());%>
${aList.a}
Not sure why yours did not produce an erro - a more complete snippet
would be needed.
-Tim
David Balažic wrote:
versions: Tomcat 5.5.28
http://wiki.apache.org/tomcat/FAQ/Linux_Unix
-Tim
method8 wrote:
Dear all,
I'm using the iText library to generate pdfs from a database on the fly.
Whenever I use some
of it's features that require simple things like java.awt.Color, I get an
java.lang.UnsatisfiedLinkError as shown:
---
s ago). Of
course - since you are using iText - this shouldn't be an issue.
-Tim
Michael Ludwig wrote:
Tim Funk schrieb:
http://wiki.apache.org/tomcat/FAQ/Linux_Unix
You're probably alluding to:
How do I run without an X server and still get graphics?
You either need to run
jvmRoute needs to be unique across all the tomcat instances.
server1:
server2:
To test - tail the access logs on each tomcat and see what appears.
-Tim
given.shiri...@sita.co.za wrote:
Hi Guyz.
I got two linux servers machine running,in both of them,I have tomcat 5 running i.e
server
I thought the Oracle JDBC driver allowed for all the nodes to be placed
into the connect string and the driver was smart enough to detect
failover. [So its a configuration exercise on the connection string.]
-Tim
Ognjen Blagojevic wrote:
This is interesting topic.
IANA-failover-expert, but o
There are too many unknown constraints to answer - but I'll try.
In app B - use an init parameter which is a filename where test.xml is
located.
myfile
/usr/local/more/cowbell/test.xml
Then when app b needs to write the file;
File f = new File(servletContext.getInitPa
mp
directory. I set cachingAllowed to false, but it doesn't work for me.
Do you have any idea ?
Regards
On Wed, Sep 2, 2009 at 1:01 PM, Tim Funk wrote:
There are too many unknown constraints to answer - but I'll try.
In app B - use an init parameter which is a filename
you have a config issue. I bet you have 250 apache workers (per server)
and 250 tomcat workers(per server).
But there are 500 apache workers (250 * 2). So in the worst case - you
need tomcat to handle 500 connections.
-Tim
keeplearning wrote:
I am running a load test with 2 web (apache) and
At this point, no one on the list will have a clue since we don't know
1) apache version
2) tomcat version
3) type of connector used, mod_proxy_ajp, mod_jk, or mod_proxy_http
But if tomcat is saying All threads (250) are currently busy, waiting. -
that means it is only configured to handle 250 w
This worked fine for me conf/tomcat-users.xml - make sure this is the
full XML file:
(and then restart tomcat)
-Tim
Bruce Nourish wrote:
Hi,
I have a 6.0.20 Tomcat binary distribution downloaded and untarred
directly from the Tomcat site. My system is Ubuntu 8.04 with Java
version 1.5.0
There is no way.
But you can alter the format property to log the Via header which does
have the ip address. (But it will also have more text in it too)
The javadocs for AccessLogValve have all the variables you can use.
-Tim
Angelo Chen wrote:
Hi,
I run tomcat behind an Apache server, Apac
See 13.8.1 of the servlet spec.
The result in is unioning all the constraints together for one that passes
It might be easier to write a filter to implement the restriction that
only GET/POST/HEAD is allowed.
-Tim
Peter Holcomb wrote:
We have a situation where we recently introduced a new s
My bad - I was quoting the servlet 3.0 spec (usually the headings align)
I need to reread but it might be a bug. (I dont have the spec in front
of me) but IIRC it said something to the effect of using the url + the
HTTP method to get all applicable constraints. And then unioning them
together.
Don't - there are other apache projects which can do that much better
than Tomcat.
-Tim
Sergio Bello wrote:
Hi all,
I'm trying to figure out how to use tomcat as a TCP server. The basic
idea is to receive tcp connections, through a given port, process them
and return a response. Has anyone d
http://mina.apache.org/
-Tim
Sergio Bello wrote:
Tim Funk escribió:
I was thinking on tomcat to take advantage of several features (request
and thread management, etc) that I know have been tested for years, but
I'm not tied to the use of tomcat.
If you know another project (java/opens
If you use JSP tags where the JSP body does not directly stream but
needs buffered for the tag to finish processing it (using BodyContent) -
then tomcat will allocate and reuse these. If you are creating pages
with large body contents - this can take *A LOT* of memory. The rational
is to reuse
Context filters are executed before webapp filters. I believe (but not
confirmed) that valves execute before the filters.
-Tim
Christopher Schultz wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Mark,
On 10/2/2009 5:55 AM, Mark Thomas wrote:
Elli Albek wrote:
A few reasons why not to
My bad - by context filter I meant to say the web.xml as found in
$CATALINA_HOME/conf/web.xml
There is nothing contexty about it
-Tim
Caldarale, Charles R wrote:
From: Tim Funk [mailto:funk...@apache.org]
Subject: Re: Cannot set remote address in valve (Tomcat 5.5)
Context filters are
For Servlets - as long as
Servlet.service(ServletRequest,ServletResponse) is implemented - you
wont see the 501.
So thats why you see the 501 for your servlet.
JSP's are "funny" since there is nothing in the spec which restricts the
request method. So service(...) is overridden by all JSP's s
In practice, I've found the easiest way is to do this:
- Create index.jsp
- Add a one line /index.jsp which does a forward to your home page like
this:
-Tim
mitalub wrote:
Hi,
I've tried searching around for this, but I can't find a clear answer, so am
starting to think it's not possible.
The custom way would be to write a startup listener that its only goal
is to load a prop file and promote its properties into the System
environment.
It could look somethng like this:
package cowbell;
import org.apache.catalina.Lifecycle;
import org.apache.catalina.LifecycleEvent;
import org.ap
IIRC, HttpServletRequest.getQueryString() should provide the query
string you desire.
-Tim
Bill Higgins wrote:
On Tue, Apr 28, 2009 at 3:19 AM, Mark Thomas wrote:
Bill Higgins wrote:
We have a servlet that acts as a proxy to other URLs from different
origins. E.g. via your web app you could
No spec violation - the default servlet only use getServletPath() to
figure out what to get. By using a url pattern other than / - the url is
actually split between getServletPath and getPathInfo. (and default
servlet barfs)
The simple workaround is to use a filter mapped to
/resources/css/* w
Simpler version ... (Writing this without enough coffee in my system so
the spirit is right, the logic might be iffy) - but in a nutshell
- You don't need to map to forward, error, include - just the incoming
request
- You should be able to check the response type
doFilter(req, resp, chain) {
I would create a custom tag to replace the image jsp tag. Then at
configuration time, the custom image tag would write out the full url
with whatever hostname you need so you can split your requests across
domains.
Splitting requests across domains may speed up the requests on "legacy
browser
Add this to your footer?
SESSION ID: ${pageContext.session.id}
-Tim
Chetan Chheda wrote:
All,
In our production environment we load balance across 4 tomcats that are split among 2 physical servers. This is a high traffic website and we get calls from users for a number of support issues
Worrying is good. Making sure you have metrics is better. You can cache
lots of different items such as
- stuff from the database
- parts of a rendered page
- the entire page
- any combination of above
But it really depends on where the bottlenecks are as you scale. Even if
the DB has a few mil
The snippet I post was the snippet. (if you are using jsp) But it can
have security side effects. A safer snippet might be this:
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions"; prefix="fn" %>
${(fn:split(pageContext.session.id,
'.')[fn:length(fn:split(pageContext.session.id, '.'))-1]
Already answered in this thread here:
http://www.nabble.com/Re%3A-User-tracking-monitoring-p23792941.html
-Tim
Chetan Chheda wrote:
I had to add
<%= request.getSession().getId()%>
for it to display the sessionId.
Tim,
Can you elaborate on what the side effects would be to display the f
A better fit is Velocity or Freemarker for templating outside of a web
environment.
-Tim
Mitch Claborn wrote:
I'm looking for a good general purpose template engine to use with
various Java projects, not just web projects. Is it possible to use
Jasper outside of a servlet engine?
-
Looking at the history of the thread - here are some guesses
You have a connector on port 81 (http) and a connector on 8011 (ajp) and
commented out connector for 443.
The port 81 connector and commented out connector are set to 600 - which
means absolutely nothing if apache is talking to
AccessLogValve cannot log until the request is "done". Done meaning that
the Servlet is done writing its content.
So AccessLogValve can execute once the Servlet is done writing. It may
(or may not) mean the client has yet received all the content since the
OS might do some buffering. The outpu
Odd
Personally - I would do the following:
Make all calls to the servlet and the servlet does this:
1) Sanity check the incoming path
2) Check for the existence of the image (using
ServletContext.getResource(path)
3) If not exists - load the image from the db and store to disk
4) forward to i
is 1 linux apache2 server with 4 linux tomcat servers and each
tomcat server has 4 sepearte tomcat instances. So we have a total of 16 tomcat
instances across 4 servers.
Yes, there is a firewall between the web sever and the app(tomcat)/db(mysql)
server.
KJ
-Original Message-
From
See |caseSensitive| here
http://tomcat.apache.org/tomcat-6.0-doc/config/context.html
But doing so makes your installation VERY insecure in a windows
environment. (Since ACL's can be bypassed since most ACL rules are case
sensitive)
I performance is of no concern - you could go crazy and forc
http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html
3.6.1
All HTTP/1.1 applications MUST be able to receive and decode the
"chunked" transfer-coding, and MUST ignore chunk-extension extensions
they do not understand.
So you have to jump through big hoops to not use chunked encoding
[IIRC -
Its there "for convenience" (and been there "forever") - but it is a
great big security whole if we ignore case (Try asking for
/web-INF/wEb.xml - or even more evil "/web-INF/wEb.xm%6c")
-Tim
André Warnier wrote:
Even that wouldn't work.
Since the filesystem is case-sensitive, it may well h
correction: The double checked idiom was "fixed" in java5. The variable
which is checked needs to be declared as volatile. The link states that
at the bottom.
-Tim
Christopher Schultz wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
David,
On 6/14/2009 5:43 PM, David Blevins wrote:
While useful ... I would conjecture that things like this eventually undergo
feature creep and over time would turn into
http://www.tuckey.org/urlrewrite/
-Tim
On Wed, Aug 24, 2011 at 11:14 AM, Mattmann, Chris A (388J) <
chris.a.mattm...@jpl.nasa.gov> wrote:
> Thanks for your reply Chuck.
>
> I
yes - this is the pattern we use and trivial to put in your own webapp
For completeness ...
in web.xml
*.jsp
/WEB-INF/prelude1.jspf
prelude1.jspf contents: <%@page session='false' %>
-Tim
On Mon, Apr 23, 2012 at 5:06 PM, Konstantin Kolinko
wrote:
> 2012/4/24 Christopher Schult
No "coding" needed if you use Url Rewrite Filter ...
http://urlrewritefilter.googlecode.com
.*
P3P code here
-Tim
On 1/17/2011 8:11 AM, Joseph Morgan wrote:
You know what... I need to learn to read what I write... you are correct, it
needs to be added to every respo
Or it could be in the world of outsourcing you have a giant pool of 1st,
2nd, and 3rd level support who are offshore which need "access" to
perform basic trouble shooting before escalation. And 90% of them have
no idea they have access but getting them access when they would need it
becomes a g
I've loathed this issue too. There are 2 major cases to deal with
- Libraries changing (like dojo, prototype, etc)
- Your external files changing
The first is "easy" to change .. in that you create a /scripts/ dir and
all 3rd party libraries go into their own directory with version number.
New
This looks looks like a nice time to look at your existing traffic and get
actuals of
1) Hits per second
2) Bandwidth usage
Then use your access logs (or if you have a test suite - use that ...
guessing owning 8 weblogic instances probably means there was a budget to
own a test suite) to determin
Your "easiest" workaround is to use a filter.
So
1) have the default servlet map to /* (which is the default)
2) keep the invoker declared
3) And make your filter do this ...
doFilter(..) {
if (request.getServletPath().matches(regex-here)) {
servletContext.getNamedDispatcher("invoker").for
No - images will be served by the default servlet so nothing needs to be
done for images.
The filter is used as a way to let the invoker work and be a tiny bit more
secure. So the filter is mapped to /* and will forward anything to the
invoker serllet if the requested path *looks like one of your
If your images are in the correct directory then tomcat will serve them for
you with its DefaultServlet. There should be nothing to do.
Then to serve resources via the invoker - this is where the filter is handy.
You declare the invoker servlet - but you do not map it. The servlet api
allows you t
yes - that would be a problem. The invoker doesn't know how to serve static
resources.
-Tim
On Wed, Jun 8, 2011 at 1:44 PM, wrote:
> I agree with you.
>
> The static resources where never a problem to me, but since I messed with
> the web.xml they started to behave oddly.
>
> Maybe this line i
**
Observations ...
1) If relying on native - it might be easiest to place the
System.loadLibrary() and its classes in the common classloader. Then use a
Valve to call System.loadLibrary() so it's only called once. Hack, yes ...
also very simple to do. This might allow webapps to be reloaded witho
Apache = Apache Software Foundation. This is the legal organization which
has all the wonderful bureaucracy in setting up rules for
software development and making sure projects adhere to various countries
laws.
Tomcat - Actually Apache Tomcat - the implementation of the servlet spec. A
project in
Looks like this is the root cause from DefaultServlet ...
While the ISE is caught ... since the mimetype for js was changed - it
doesn't match the fallback method
try {
ostream = response.getOutputStream();
} catch (IllegalStateException e) {
Use pattern="combined" to see the querystring
-Tim
On 10/12/2010 12:21 PM, Leo Donahue - PLANDEVX wrote:
I am currently using the common pattern to log all requests using the Access
Log Valve.
-
To unsubscribe, e
Its the time the Valve starts processing until the valve has finished
processing.
Vague heh?
So this means that Tomcat will need to do the following first before
timing starts
- Accept the connection
- Receive the 1st line of the request, and probably the headers such as Host
- From there - T
Ideally - you would do this as a servlet filter and configured as part
of the webapp. So when the filter is destroyed - it unregisters the object.
-Tim
On 11/2/2010 2:53 PM, Leo Donahue - PLANDEVX wrote:
http://j-integra.intrinsyc.com/support/com/doc/gc/index.html
#4 com.linar.jintegra.Cleane
Check all the files in the log dir. There should be an exception there
with ContextLoaderListener throwing some exception. (Probably a
SaxException)
-Tim
On 11/3/2010 12:14 AM, Will Sumekar wrote:
Hi
When I put these lines:
org.springframework.web.context.ContextLoaderList
While I like the idea of using web-fragment.xml for precompiled jsp's -
it would require the "meta-data complete" flag to be set to false which
may as a side effect allow other artifacts to be loaded too.
Hopefully jsp-precompile is part of the webapp build/deploy process so a
developer can ig
An enhancement bug has been entered for those with the itch. It appears
the existing JspC task still writes out 2.3 when it writes a new web.xml.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50234
-Tim
On 11/8/2010 5:45 AM, Ronald Klop wrote:
+1 Precompiled jsp's with annotations in a
See RemoteIpValve
http://tomcat.apache.org/tomcat-6.0-doc/config/valve.html#Remote_IP_Valve
-Tim
On 11/9/2010 1:34 PM, Ari King wrote:
Hi all,
I have an httpd proxy in front of my tomcat servers/instances, and I'd
like to restrict access to those tomcat servers/instances to be
through the htt
Doh - too fast in copy paste - I pasted the wrong name.
You want *RemoteAddrValve* - you do NOT want RemoteIpValve
-Tim
On 11/9/2010 3:18 PM, Tim Funk wrote:
See RemoteIpValve
http://tomcat.apache.org/tomcat-6.0-doc/config/valve.html#Remote_IP_Valve
-Tim
On 11/9/2010 1:34 PM, Ari King
Has anyone successfully used (or experimented with) either of these?
-XX:OnError=";"
-XX:OnOutOfMemoryError=";
-Tim
-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@to
If you have Apr available ... you might be able to use this ...
org.apache.tomcat.jni.Stdlib.getpid()
// public static native int getpid();
-Tim
On 11/18/2010 6:10 AM, Pid wrote:
On 18/11/2010 10:47, André Warnier wrote:
The justification according to which a PID is not
necessarily available
I'm late to the party. But how about trying the following ...
1) Add a filter which runs first and logs the request. This WILL have a
performance impact - but a non-running application is a tad bit slower
than writing each request to disk. With luck - this may call out a class
of (or single) u
Depending on how you look at it - use the HTTP spec and look at the Date
response header
http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.18
The above technique doesn't require shell access and is an "easy" way to
get the date of ANY webserver. (read the spec for caveats)
On Wed,
Its a best practice to keep your jsp's inside of WEB-INF. Since WEB-INF/ is
not allowed to be requested by the browser - its a simple enforcement
mechanism to prevent users from direct access to calling jsps. (Since it
may be common to have jsp's as snippets for header / footers etc -- and
there fo
+1 Awesome! Welcome!
-Tim
On Fri, Sep 19, 2014 at 3:49 AM, Rainer Jung wrote:
> On behalf of the Tomcat committers I am pleased to announce that
> Felix Schumacher (fschumacher) has been voted in as a new Tomcat committer.
>
> Please join me in welcoming him.
>
> Regards,
>
> Rainer
>
>
[resend ... I just realized my email settings were borked for sending]
It might be easier (and much more efficient) for your operating system to
do this for you:
For example:
http://unix.stackexchange.com/questions/139285/limit-max-connections-per-ip-address-and-new-connections-per-second-with-i
On Mon, Dec 8, 2014 at 4:39 PM, Mark Thomas wrote:
>
> The call for papers is currently open for ApacheCon North America in
> April 2015. While I could submit some talks on what ever Tomcat related
> subject I fancy talking about, I'd prefer to talk about what you want to
> hear.
>
> So, with that
Personally. I rely on a daily cron with a find by time and the -delete
flag. Where the time to keeps is based on policy.
-Tim
On Tue, Mar 18, 2025 at 9:52 AM Nguyen, Quoc A. (QUANTUM MANAGEMENT, LLC)
wrote:
> Hello,
>
> Tomcat server version: 9.0.98.
>
> server.xml configuration for AccessLogVa
Nothing built in to move them. But the same advice applies. The find
command chained with mv or mv+gzip could be a solution
Or if your backup policy is good enough. Doing nothing and relying on
backups to retrieve old logs would work too.
But all of this depends on use case for need of retrieval.
Wild guess. Does this library use tmp to extract binaries to run native
code?
If so, it might be a version collision of those tmp binaries?
On Sat, Apr 12, 2025 at 4:23 PM Thad Humphries
wrote:
> I have a problem that appears to be one webapp in Tomcat 9 having a portion
> of its classpath ma
This is a good cleanup. I one question for confirmation, let's say
we have this config:
index.html
index.do
index.htm
With
-- request = /foo/
-- AND file exists of = /foo/index.htm
Since index.htm exists, we'd process as /foo/index.htm despite it being
"3rd" in the welcome file list since welcome
401 - 477 of 477 matches
Mail list logo