I'm being a bad boy by top-posting the final result here, because it
turned out that none of the suggestions that Chris so kindly made after
reading my long OP was the actual answer, but it pointed me to the
problem which is now fixed and everything works.
I had upgraded the TC version from 5 to 6 to 7 over the course of the
last year or so, and the last upgrade was long enough ago that I had
forgotten about it when I wrote the OP. When Chris mentioned copying
web.xml from _HOME to _BASE, that got me to looking more closely at what
I had copied over, and at that point noticed that I still had old stuff
in _BASE\conf and that _BASE\shared existed and _BASE\lib did not.
Copying those two directories over from _HOME got things working.
Thanks for your patience, Chris - it got me to the answer even though it
was in a roundabout way. As I thought it might, a 2nd set of eyes
brought up some points that put me on the right track.
Dave
P.S. If you want to review the details of my answers to Chris'
questions, they are in-line below. I was checking things and answering
the questions as I went along, so had most of them answered when I
finally got things running.
On 3/22/2012 3:48 PM, Christopher Schultz wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
David,
On 3/22/12 11:21 AM, David kerber wrote:
[I] can't get my opening page to load from:
http://localhost:81/SiteData/Login.jsp
Catalina_home is defined in tomcat7w as: -Dcatalina.home=C:\Program
Files\Apache Software Foundation\Tomcat 7.0
Catalina_base is -Dcatalina.base=c:\TomcatClients\Pelican
The application I'm testing is loaded from SiteData.war, which is
located in catalina.base\webapps. The other one that is loading
below is failing too.
So you have C:\TomcatClients\Pelican\webapps\SiteData.war?
Yes
I have put a context.xml file in several different places:
catalina.base\webapps\SiteData\META-INF,
If you have a WAR file, it should be inside there in META-INF/context.xml.
Ok, I haven't tried that. I eventually need to deploy this same app as
a different context path, so I probably won't put the context.xml in the
.war file.
catalina.home\conf\Catalina\localhost
I don't think you want anything at all in catalina.home.
This amounted to throwing things against the wall and seeing what stuck.
So far nothing has.
catalina.base\conf\Catalina\localhost
If you put it there, it should be called SiteData.xml. You have to
understand that this will trump the one in the WAR file unless you
undeploy and re-deploy.
It is; I forgot to specify that.
It contains:
<Context docBase="c:\TomcatClients\Pelican\webapps\SiteData"
reloadable="true" crossContext="false"</Context>
If it's in your WAR file, you don't need docBase and should remove it.
Ok.
I initially had
path="/SiteData"
in the context entry, but reading the docs told me I needed to
remove it.
Good. It's never needed and may only confuse things.
<Connector port="81" protocol="HTTP/1.1" connectionTimeout="20000"
redirectPort="8443" /> <Connector port="8009" protocol="AJP/1.3"
redirectPort="8443" />
So you have an HTTP connector and an AJP connector. Your URL above
shows that you are trying to access the file using port :81 and so are
trying to hit Tomcat directly, right?
Yes, that's correct. I'm not actually using the AJP connector AFAIK,
but left it there since that's the default. I have now removed it, just
to clean things up a bit more.
Log files:
localhost_access_log.<date>: 127.0.0.1 - - [22/Mar/2012:10:57:59
-0400] "GET /SiteData/Login.jsp HTTP/1.1" 404 952
Is this log file from Tomcat or httpd?
Tomcat. No httpd on this system.
catalina.<date>.log (note the "INFO: No global web.xml found"; is
that a problem?); the stderr log has the exact same info.
INFO: Deploying configuration descriptor
C:\TomcatClients\Pelican\conf\Catalina\localhost\SiteData.xml
Tomcat is certainly trying to deploy your webapp:
Mar 22, 2012 11:12:20 AM org.apache.catalina.startup.ContextConfig
getDefaultWebXmlFragment INFO: No global web.xml found
That probably is a problem. Is there a web.xml file in either of these
locations?
C:\TomcatClients\Pelican\conf\web.xml
C:\Program Files\Apache Software Foundation\Tomcat 7.0\conf\web.xml
There was in CATALINA_HOME\conf, but not CATALINA_BASE\conf, so I copied
it there.
When I use CATALINA_BASE, I always make sure that I copy
CATALINA_HOME/conf/web.xml to CATALINA_BASE/conf/web.xml -- I'm not
sure if Tomcat will properly fall-back from CATALINA_BASE to
CATALINA_HOME but this is how we've been doing things for years... the
behavior may have changed.
If you don't have a global web.xml, then you won't have the JSPServlet
configured. I would have expected you to get JSP source sent to the
client in that case, but that's not what you are observing. Instead,
you're getting a 404.
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk9rghAACgkQ9CaO5/Lv0PBEogCgqV8RU6WfCGHEH7pk6/Khjzai
NQEAoIEMt2zXeP5dzlr8TCBGKiUYIRXa
=c7X5
-----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