tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jordan Michaels <jor...@viviotech.net>
Subject Re: Hosts Created in Tomcat 7 Host-Manager Don't Process JSP
Date Wed, 16 Nov 2011 20:15:42 GMT
Figured this out.

For anyone who is curious or who is experiencing the same problem, I was 
able to get things working with two changes:

1) Make sure "Deploy at startup" option is checked in when you create 
the host in the Host Manager.

2) Create the ROOT.xml file for the context in 
conf/Catalina/host.com/ROOT.xml directory. In my case, I added the 
following to the xml file:

<Context docBase="[path]">
     <WatchedResource>WEB-INF/web.xml</WatchedResource>
</Context>

and everything works nicely now. =)

Hope this helps someone.

Warm Regards,
Jordan Michaels

On 11/14/2011 02:50 PM, Jordan Michaels wrote:
> Running some tests with the Tomcat 7 Host-Manager and it appears as
> though hosts created via the Host Manager don't process JSP.
>
> In my tests, I created a "fred.com" test site with a root directory of
> "/www/fred.com/", and put a simple "hello world" index.jsp file in it. I
> then created the "fred.com" site in the Tomcat 7 Host Manager (7.0.22 -
> downloaded just this morning). The host was created without issue.
>
> I then checked the host with Telnet:
>
> ---------------
> jordan@jordan-M61P-S3 /opt/tomcat/conf $ telnet localhost 8080
> Trying 127.0.0.1...
> Connected to localhost.
> Escape character is '^]'.
> GET /index.jsp HTTP/1.1
> HOST: fred.com
>
> HTTP/1.1 404 Not Found
> Server: Apache-Coyote/1.1
> Content-Length: 0
> Date: Mon, 14 Nov 2011 21:59:45 GMT
>
> Connection closed by foreign host.
> jordan@jordan-M61P-S3 /opt/tomcat/conf $
> ---------------
>
> Looking at the logs, I found this in the catalina.out file:
>
> ---------------
> INFO: Deploying configuration descriptor manager.xml from
> /opt/tomcat/conf/Catalina/fred.com
> ---------------
>
> So, I went and looked at the manager.xml file, and this is what it
> contained...
>
> ---------------
> <Context docBase="${catalina.home}/webapps/manager"
> privileged="true" antiResourceLocking="false" antiJARLocking="false">
> </Context>
> ---------------
>
> Am I missing something? Is there something I should be doing that I'm
> not doing? Can anyone confirm they can run JSP on hosts created in the
> Tomcat 7 Host Manager?
>
> Thanks for any help!
>
> Warm Regards,
> Jordan Michaels
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message