Peter,
On Fri, 2003-03-28 at 15:19, Peter Reynolds wrote:
Hi William,
I've removed the JkMount lines from mod_jk.log and added the following
to within the Virtual Hosts tags of httpd.conf
JkMount examples/*.jsp ajp13
JkMount examples/servlet/* ajp13
Restarting gives the same result. .jsp pages in examples are still
being correctly passed now to Tomcat but many of them have errors:
I thought it would not matter, but a shot was worth a try.
However it seems as if some things are working and some aren't?
I've added this inside site1/web/WEB-INF; and the error in the log goes
away. However errors on some .jsps are still given.
Works: http://www.r-hosts.com/examples/jsp/snp/snoop.jsp
Doesn't work: http://www.r-hosts.com/examples/jsp/simpletag/foo.jsp
Most likely a problem with the jsp page itself not the env.
Do you think perhaps it's not seeing the other web.xml within the
site1/web/examples/WEB-INF directory and hence also not seeing all the
classes within that directory, since the server.xml specifies site1/web
as the web application home directory?
That's very possible. To the best of my knowledge you can only have one
WEB-INF folder and etc. without creating new context bases in the
server.xml file.
Example
<Host name="www.r-hosts.com">
<Context path=""
docBase="/home/sites/site1/web"
crossContext="true"
debug="0"
reloadable="false"
trusted="false" >
</Context>
</Host>
<Host name="www.r-hosts.com">
<Context path="/examples"
docBase="/home/sites/site1/web/examples"
crossContext="true"
debug="0"
reloadable="false"
trusted="false" >
</Context>
</Host>
Or at least something along those lines. My syntax may be incorrect but
you should get the idea. Then Tomcat will recognize the other WEB-INF
folders.
Indeed this would seem to fit. All the servlets are broken (since the
new web.xml is empty) and any .jsp that relies on special classes that
would be in site1/web/examples/WEB-INF/classes also breaks.
You may be able to configure the web.xml to provide support for the
inner ones in the other WEB-INF folders. Possibly, that you will have to
look into.
I could copy all the classes and web.xml from web/examples/WEB-INF into
web/WEB-INF but my web applications are all quite self contained and I
want to be able to run several from the site1/web directory.
Separate can be good or bad. I tend to think that all applications under
a domain should be together. Otherwise form sub.domains.
www.mydomain.com
app1.mydomain.com
app2.mydomain.com
If you want true separation. Otherwise you should be able to proceed
with some additional configuration steps. Although that is more specific
to Tomcat, than Tomcat on a Cobalt. For those type of issues you may
want to hit up a Tomcat users newsgroup.
I mean once you have Tomcat working with Apache, and etc. Getting tomcat
to properly deal with jsp pages, servlets, multiple WEB-INF folders and
etc. is really outside of the scope of this list.
I think I need to modify the docBase in server.xml to point directly to
the web application folders rather than one level above. What do you
think? If this is the case I'm not at all sure quite how to do this.
Yes, I provided an example above. It's at least worth a try and some
research.
Along with the additional entires in the server.xml file you will most
likely have to do additional mapping in your httpd.conf for apache.
That you may have already done.
Let me know how it goes.