tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: Question about config and correct start-up
Date Thu, 17 Jan 2013 17:55:29 GMT
Hash: SHA256


On 1/16/13 11:43 PM, Alan Findly wrote:
> The recommended context "ELEMENT" caused the following warning:
> Jan 16, 2013 9:10:37 AM org.apache.tomcat.util.digester.Digester
> endElement WARNING:   No rules found matching 'Context/Context'.

That error suggests that you have something like:


If you are modifying your configuration trying to get something to
work, don't just say "I did it and it still doesn't work". Re-post
your current configuration. *sigh*

> So I changed the "ELEMENT" to this --as below-- and voila ..... the
> warning went away.

Below ... where?

> My thread seems out of context(no pun intended) because I made the 
> unwarranted assumption that the original thread would be included
> in every reply & it should be....otherwise I have
> to re-iterate the problem, ie. thread...every time.

Or you could use a threaded mail-reader. Anyhow, top-posting is
discouraged. You can feel free to ignore that advice but you will
irritate many of the folks on this list (myself included) who may see
your refusal to help us help you as annoying enough to ignore your
questions. YMMV.

> The problem I'm trying to solve is making tomcat do cgi, and the 
> Apache.tomcat documentation says to do basically 3 tasks: (1)
> Uncomment the cgi servlet in the conf/web.xm file.

Right. It seems you have done that.

> (2) In same file uncomment the cgi servlet mapping.

That, too.

> (3)  Add the context "ELEMENT" to the context.xml file.

No, it says that your context needs to be marked as "privileged". The
way to do that is to add privileged="true" to your <Context> element
which should have already been in your WEB-INF/context.xml file. If
you didn't have such a file, you'll need to create one that looks like

<?xml version="1.0" ?>
<Context privileged="true" />

You may wish to have other configuration in there as well -- only you
know your own webapp's requirements. Please exercise due diligence
when merging the above configuration into your own: don't simply
copy/paste that onto the end of whatever you had there already.

> So, now, as already covered in the previous parts of this
> problem's thread, the cgi functionality is still not working--at
> least not for perl--cgi files, which are all I've tested since this
> is my focus.

As per the documentation[1], "perl" is the default. If you expect that
the URL always contains the full script name and the scripts are
directly executable (not likely on WinXP), you can change that. Also
note that if perl.exe isn't in the PATH for the Tomcat user, you may
have to set the full path in the "executable" init-param of the CGI

> Question; do I need a Tomcat/lib/servlet-cgi.jar file?

No, you do not.

> Previous versions did -- well, version 5.  I am working with
> version 7.0.34 and there is no such jar file in the downloaded tar.
> Now the servlet in conf/web.xml could be "it" instead of a jar
> file.

It sounds like you have no idea what you are talking about. Rest
assured, Tomcat includes the CGI servlet and you don't need to
mess-around with any JAR files. You are only configuring it in

> However, what has me questioning -- there is also an api servlet in
> conf/web.xml--as well as a lib/servlet-api.jar file.

No, there isn't an "api servlet" in conf/web.xml. The letters "api" do
not appear in conf/web.xml. The servlet-api.jar file exists to provide
... the servlet API classes to the whole container.

> I'm thinking now that the REAL problem is Windows XP.....always
> been a dog....I think it has something missing to purposely lock
> out cgi. I'm thinking i should just throw it away & migrate to a
> Linux box.

While that may be good advice in general, WinXP is not intentionally
thwarting your attempts to get CGIs running. Everything you are doing
here will need to be done on Linux, too (except that there you can
actually have executable scripts which simplifies one small part of
the configuration).

If things still aren't working, please re-post all current, relevant
parts of your configuration: don't expect anyone to go back through
the list of messages applying verbal diffs to things to guess at what
your files look like. Also, be specific. If you say "it doesn't work"
say what you expected and what actually happened. Also look for
anything relevant in log files: they can tell you a lot and we're
going to ask, anyway, so just save us all some time and check them
first. If they are empty, say they are empty (and say which files you
looked at).

- -chris
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools -
Comment: Using GnuPG with Thunderbird -


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message