Bug 29485 - Undeploy considered dangerous
Undeploy considered dangerous
Product: Tomcat 5
Classification: Unclassified
Component: Webapps:Manager
All All
: P3 enhancement (vote)
: ---
Assigned To: Tomcat Developers Mailing List
Depends on:
  Show dependency tree
Reported: 2004-06-09 23:19 UTC by Nils Kilden-Pedersen
Modified: 2005-06-14 09:08 UTC (History)
1 user (show)

HTMLManagerServlet (2.83 KB, patch)
2004-09-02 19:18 UTC, Vitor Buitoni
Details | Diff
LocalStrings.properties (706 bytes, patch)
2004-09-02 19:19 UTC, Vitor Buitoni
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nils Kilden-Pedersen 2004-06-09 23:19:26 UTC
I have on one occasion hit the Undeploy link, wiping out developement files.
Yes, that's my fault, but Undeploy is right next to Reload. Is it possible to
either move the Undeploy link to a separate column and/or even better, have a
confirm option? This is a very scary command that is rarely used in most scenarios.
Comment 1 Remy Maucherat 2004-06-10 06:35:44 UTC
I don't know if that kind of yes/no dialog is doable with Javascript. Maybe, so
I'm waiting for your patch :)
Comment 2 Yoav Shapira 2004-06-11 00:06:30 UTC
Undeploy is routinely used by people on the mailing list to remove the current 
version of a webapp before deploying a new one (at the same context path).
Comment 3 Igor 2004-07-09 05:30:29 UTC
Is it possible to create confirm page without JavaScript? I use manager 
application via lynx
Comment 4 Yoav Shapira 2004-07-28 21:34:22 UTC
And whoever uses the Manager webapp via Ant will not have access to any 
confirmation screen.  I don't think this will be done.  If you really want it, 
submit a patch.
Comment 5 Daniel Santos 2004-08-16 14:48:09 UTC
This javascript confirmatino should only be on the html interface so this should
not effect the ant interface (i.e., calling the undeploy command directly). 
Rather, the html interface should "intercept" the click and confirm that you
really want to do this (and you realize that it's about to delete all of your
files) before it sends the GET back to tomcat with the undeploy command.

I'll do this one (it's easy enough :)

Comment 6 Yoav Shapira 2004-08-30 20:12:05 UTC
Just a ping reminder to mark this issue as closed once you've committed the fix 
to CVS.
Comment 7 Vitor Buitoni 2004-09-02 19:18:30 UTC
Created attachment 12620 [details]
Comment 8 Vitor Buitoni 2004-09-02 19:19:06 UTC
Created attachment 12621 [details]
Comment 9 Yoav Shapira 2004-09-02 19:22:10 UTC
I've added JavaScript confirmation for manager actions.  Thanks for the patch 
Vitor, but I didn't use it.  I only saw it after committing, although it's 
pretty close (I didn't i18n the confirmation message).
Comment 10 Yann Cébron 2004-09-08 07:20:46 UTC
The Javascript-code in the manager for 5.5.1 is invalid and doesn't work in IE 
neither in Mozilla. Reason are the missing apostrophs (') around "Are you sure".

onclick="return(confirm(Are you sure?))"

onclick="return(confirm('Are you sure?'))"
Comment 11 Yoav Shapira 2004-09-08 20:15:50 UTC
That's odd: the apostrophes are there in CVS (and were for 5.5.1).
Comment 12 Yoav Shapira 2004-09-09 13:07:28 UTC

*** This bug has been marked as a duplicate of 29823 ***
Comment 13 Yoav Shapira 2004-09-09 13:07:56 UTC
Oops, marked wrong duplicate, reopening.
Comment 14 Yoav Shapira 2004-09-17 19:54:25 UTC
Fixed ;)  It turns out java.text.MessageFormat requires double-quoting of 
single quotes.
Comment 15 Daniel Santos 2005-06-14 17:08:31 UTC
Horray! I like it, thanks guys! :)