Bug 32777 - ManagerServlet returns OK also when deploy fails
Summary: ManagerServlet returns OK also when deploy fails
Alias: None
Product: Tomcat 5
Classification: Unclassified
Component: Catalina (show other bugs)
Version: 5.5.6
Hardware: PC Windows XP
: P2 normal (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
Depends on:
Reported: 2004-12-20 14:03 UTC by Gabriele Garuglieri
Modified: 2005-01-03 08:10 UTC (History)
0 users

ManagerServlet patch (2.70 KB, patch)
2004-12-20 14:07 UTC, Gabriele Garuglieri
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gabriele Garuglieri 2004-12-20 14:03:13 UTC
ManagerServlet after processing of /deploy command only check for the existence
of context, but if you deploy a misconfigured application, for example with
errors in web.xml or context.xml, the context is created and ManagerServlet
returns OK, but the deploy is not succesfull because the application contains
errors and cannot be started.

Here i submit a small patch to ManagerServlet to have it check
Context.getConfigured() before returning OK.
Comment 1 Gabriele Garuglieri 2004-12-20 14:07:24 UTC
Created attachment 13799 [details]
ManagerServlet patch

I didn't exaustively tested it, but for the most common cases it looks to be
working. I hope it won't have collateral effects i don foresee, but for sure
you know it.
Comment 2 Gabriele Garuglieri 2004-12-20 15:55:51 UTC
I forgot to mention that this patch should solve also the problem that cause the
message "Cannot find message associated with key managerServlet.deployFailed"
that pops out when ManagerServlet finds an error during deploy command processing.
(only for English, i don't know how to translate the message in Spanish, German,
Japanese etc.)
Comment 3 Remy Maucherat 2004-12-24 18:40:49 UTC
This seems like a solution (maybe incomplete though). It could be better to
check other things.
Comment 4 Remy Maucherat 2005-01-03 17:10:45 UTC
I have applied your patch, thanks.