You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by java programmer <ja...@yahoo.com> on 2001/12/05 15:59:16 UTC
server.xml - Part II
First off, I'd like to reply to an earlier post
and the I'll talk about a weird finding
regarding server.xml with Tomcat 3.3 on Linux 2.4.x
with Java 1.3.x.
> We're the main european hub for bioinformatics
> research and resources,
> the fact that webapps exist and can be packaged is
> incredibly useful to
> us.
Hmm. I stand somewhat corrected. I still believe
that the "webapp" complexity is not applicable to
many people, who simply want Apache + an engine
to run servlets/JSP, probably talking to mySQL
in the backend. For that kind of use, you don't
need more than one context, i.e., the default "/"
context hanging off the docroot (htdocs) of
the *web* *server*.
> > And the kicker is the gratuitous, idiotic
> > use of XML for _configuration_. For you to say:
>
> [..]
> if you're configuring a system that is intrinsically
> hierarchical,
> doesn't it make sense to use a configuration
> mechanism that shared this
> property?
Again, agreed. However, consider the fact that this
heirarchy is relatively flat, 2-3 levels deep in
most places. Isn't it simpler to use a file of
the format:
level1.level2.prop1=value
context.foocontext.simplemapper=foo.class
context.foocontext.simplemapper.listings=false
... and so on ...
This approach has a lot of precedent and works
very well (for shallow depths). Also, it's
simpler to have a default case of one config
file only, with a *special case* option of
more files if needed. Apache does this too for a
reason. Also why expose the module map at all ?
(modules.xml). Most end-users are not going to
write and swap in their own modules and most
hackers are just going to hack the tomcat source
directly.
Now for a bit on my environment. I have several
SMP boxes that I am planning to run Tomcat+mySQL
+Apache on. Apache and mySQL are now running quite
smoothly but Tomcat is still not up yet. I keep
getting a funny exception when I say:
shell> tomcat.sh start debug -10
The relevant part of this exception looks like:
-----------------------------------------------
EmbededTomcat: exception initializing ContextManager
java.lang.NullPointerException
at
org.apache.tomcat.facade.JspInterceptor.addContext(Unknown
Source)
-----------------------------------------------
After tearing my hair out for several (many) hours,
I have made a startling finding.
My ending of my server.xml looks like:
[..stuff ...]
<JspInterceptor keepGenerated="true"
largeFile="false"
useJspServlet="false" debug="10" />
<WorkDirSetup cleanWorkDir="false" />
</ContextManager>
</Server>
If the ONLY change I make is moving the JSPInterceptor
tag _below_ the WorkDirSetup Tag, the exception
disappears and tomcat starts up fine ! No other
file is touched, this is the only change I make.
And it works. Now if that is not insane, my
definition of insanity needs some serious rework.
Try this in reverse in your server.xml, folks, and
see what happens !
Oh yeah, I only have 1 apps file (apps.xml) and
it says:
<?xml version="1.0" encoding="ISO-8859-1"?>
<Server>
<Host name="www.mysitehere.com">
<Context path="" docBase="/web/sites/mysitehere/docs"
/>
</Host>
</Server>
Do note that this problem with server.xml is
independent
of the apps.xml file and this file has not been
changed at all. The problem is also independent
of the fact that I am using mod_jk (apache). Seems
like
there is a coding bug in JSPInterceptor.
If anyone here concurs, I suggest forwarding this
email to an Apache developer.
Best regards,
javadesigner@yahoo.com
__________________________________________________
Do You Yahoo!?
Buy the perfect holiday gifts at Yahoo! Shopping.
http://shopping.yahoo.com
--
To unsubscribe: <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>