Re: Site down for maintenance senario

2014-03-17 Thread John Smith
> Deploy a ROOT web application whose 404 page says "Down for
> maintenance". You could even customize this kind of thing to only
> respond to certain URL-prefixes (like [ROOT]/mywebapp/*).
>
> What will you do while Tomcat is restarting, though, if you have to
> restart?
>
>
Restarts take about a second or two, it's an acceptable downtime. Custom
404's are a good idea -- the only content I need in the directory is the
404 maintenance page itself. I can just swap the names of the actual webapp
and 'maintenence' webapp directories (they're exploded).

Thanks to everyone for the other good suggestions.


Re: Site down for maintenance senario

2014-03-13 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Jeff,

On 3/13/14, 3:08 PM, Jeffrey Janner wrote:
>> -Original Message- From: Christopher Schultz
>> [mailto:ch...@christopherschultz.net] Sent: Thursday, March 13,
>> 2014 10:40 AM To: Tomcat Users List Subject: Re: Site down for
>> maintenance senario
>> 
>> -BEGIN PGP SIGNED MESSAGE- Hash: SHA256
>> 
>> John,
>> 
>> On 3/12/14, 2:28 PM, John Smith wrote:
>>> Is there a straightforward way to toggle or add something in
>>> Tomcat, in the event a webapp is intentionally taken 'offline
>>> for maintenance"? The user would receive the same single
>>> notification
>> page
>>> saying as much, for any and all requests.
>>> 
>>> Tomcat 7.0.42
>> 
>> Deploy a ROOT web application whose 404 page says "Down for 
>> maintenance". You could even customize this kind of thing to
>> only respond to certain URL-prefixes (like [ROOT]/mywebapp/*).
>> 
>> What will you do while Tomcat is restarting, though, if you have
>> to restart?
>> 
> 
> This kind of requirement is where fronting with HTTPD comes in
> handy. Of course, if you're restarting HTTPD, you still won't get
> an error message.

Of course, I'm aware of the usefulness of a fronting web server. I was
asking a thought-provoking question of the OP, who doesn't seem to
have come back for an answer ;)

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJTIhI5AAoJEBzwKT+lPKRYy9kP/0zRlzSZXys4XRbSIi6llUTV
jNUEPzbcXsK1fiujWHdOQ6CpLMw8NEqq0487XMX88lUwO4h2i1kwhYmUkh45eSN4
hpt1p4qDkHHOlVa5IEI7KiL6ZwlAmvjPUNb9R15ngaIkQBNoHuPcr9SWNj4WaOQL
svyKZ8aaqCBGdW2IahgsI9BaOV8+Dek39FaZw9CmjGGy4LVwfnBghZO9supIcZyh
tYxbzYwlyl9cODJ59sQEKCM/JPhZuWglnR4qK7UepPaRORSz90wxS88cBUl0s+IF
iAytqhhRXrv5jQCzuYV7p7Y30Z6Ill2KYeMEgy5YHZRggBke6nRAS7l2jUdGPFMq
XvIfSsh0lIH52zE/gEOGIq7Ymegj4SRPiM1cFeLPPHkbUk36lNDlbElE2hjLvJTJ
g+x5BnpeXrfN39/UaqlXxja7DTAR5m5OQK1EISg9BJPL/qQS3Qv8gpwD82ydZ0Lh
tXIcsJaSskpX3FJMqiBFZJrRbyPSs0RR0HpRe0xtCGZFLY/RkhGeDYsOdD+Jln4m
ukV7mhPyMFjws5ELFCr2svU1dLXHz9bUcBQPV+eRxTwSbFN2RK+OGAicnXWsKoRx
xbO6U/5pmACrk7U0M1ff95wI+RjDfTwfBCOLVvEY+yAYzjeucLQzVbHkFP5BEBCN
aPSsDt6WqL7ENTpZD2Ii
=doXU
-END PGP SIGNATURE-

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



RE: Site down for maintenance senario

2014-03-13 Thread Jeffrey Janner
> -Original Message-
> From: Christopher Schultz [mailto:ch...@christopherschultz.net]
> Sent: Thursday, March 13, 2014 10:40 AM
> To: Tomcat Users List
> Subject: Re: Site down for maintenance senario
> 
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA256
> 
> John,
> 
> On 3/12/14, 2:28 PM, John Smith wrote:
> > Is there a straightforward way to toggle or add something in Tomcat,
> > in the event a webapp is intentionally taken 'offline for
> > maintenance"? The user would receive the same single notification
> page
> > saying as much, for any and all requests.
> >
> > Tomcat 7.0.42
> 
> Deploy a ROOT web application whose 404 page says "Down for
> maintenance". You could even customize this kind of thing to only
> respond to certain URL-prefixes (like [ROOT]/mywebapp/*).
> 
> What will you do while Tomcat is restarting, though, if you have to
> restart?
> 

This kind of requirement is where fronting with HTTPD comes in handy.
Of course, if you're restarting HTTPD, you still won't get an error message.


Re: Site down for maintenance senario

2014-03-13 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

John,

On 3/12/14, 2:28 PM, John Smith wrote:
> Is there a straightforward way to toggle or add something in
> Tomcat, in the event a webapp is intentionally taken 'offline for
> maintenance"? The user would receive the same single notification
> page saying as much, for any and all requests.
> 
> Tomcat 7.0.42

Deploy a ROOT web application whose 404 page says "Down for
maintenance". You could even customize this kind of thing to only
respond to certain URL-prefixes (like [ROOT]/mywebapp/*).

What will you do while Tomcat is restarting, though, if you have to
restart?

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJTIdFkAAoJEBzwKT+lPKRYSJQP/11vkStGCqxDjhqQDXfGype5
nGeEDk+8/FDI6rUdo91VRxSLK8pb8l8yo1RtJsOL7C9fUtDO85k0fddN4hM0u5oR
0foguz3jFHsoC336duDdYq75mbXJ2hW9MatDQitYGCCy70F/aER9o0eDRu16XZ5d
KZ55i7Eu8vcqL6uzeLU8IDcanm0BvhPRGLCccL51ZbpG8C7zgi6ZKRDEx7/mYpZB
5sNPEiKpYSBbVD95Xkx7qAN22IJW+WWUTeiJqPlcliRX9Qj5aR4DZK6Jrw+7oO/t
MooE2z5a8TBSRp/aNW6JPUUcS/psui2EFUshne9bOPXeDPBotRFIdeGgNflJpD3S
/0TD/9BFmpk+S3jXK/Ut0HirLrI40Ulq90uumXDe+DfZwGgtnFQQS69BbFxuzJJU
92MuubotRTWq9a2r//+N8pbQTgqsMRw38slJGuxTiR+xlMUpUVdgdRZJf4p18yiC
VpZ4LSu/XDotw+I3EPDhdaxw4KmVFaICjDheqfF3mGVmDO1QIK4J6Z8SrprWdW/A
DSSTjsh1WTXhIn0n7EjTgetKVpumoru+SZltSOmsRzcfZoVGpbSx1wANlU1BqIi1
OiWEZZlDJEXHm1AFUEIkUpm+IPBKwltWHXzgcJzj6oe7FJFmQMgfw80RhzNz5YvH
yCeJu12avdklRUkxJ4xj
=ViRn
-END PGP SIGNATURE-

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



Re: Site down for maintenance senario

2014-03-12 Thread Leo Donahue
On Mar 12, 2014 2:15 PM, "André Warnier"  wrote:
>
> I was going to suggest to replace the normal myApp.war by one named
similarly, but returning a "on maintenance" page.
> But the solution above is cleverer.
> Bonus points.

Thanks.  I've never had bonus points before. ;)


Re: Site down for maintenance senario

2014-03-12 Thread André Warnier

Leo Donahue wrote:

On Wed, Mar 12, 2014 at 11:58 AM, Leo Donahue  wrote:


On Wed, Mar 12, 2014 at 11:51 AM, Leo Donahue  wrote:


On Wed, Mar 12, 2014 at 11:28 AM, John Smith wrote:


Is there a straightforward way to toggle or add something in Tomcat, in
the
event a webapp is intentionally taken 'offline for maintenance"? The user
would receive the same single notification page saying as much, for any
and
all requests.

Tomcat 7.0.42


What would respond to the user's request if the web app they asked for is
down?  All you are going to get is a not found error which will be handled
by your ROOT web application.


I wonder if parallel deployment is an option for you?  Maybe someone else
will have a better idea.

webapp#1.war could be your notice web app, while webapp#2.war could be
your normal site.

Deleting webapp#2.war would make requests fall back to your web app that
notifies the user the site is down.

Redeploying an updated webapp#2 would then override the the other one.



Redeeming myself

Use two # symbols.  webapp.war  would be an earlier version of webapp##1.war

Read this:
http://tomcat.apache.org/tomcat-7.0-doc/config/context.html#Parallel_deployment



I was going to suggest to replace the normal myApp.war by one named similarly, but 
returning a "on maintenance" page.

But the solution above is cleverer.
Bonus points.



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



Re: Site down for maintenance senario

2014-03-12 Thread Leo Donahue
On Wed, Mar 12, 2014 at 11:58 AM, Leo Donahue  wrote:

> On Wed, Mar 12, 2014 at 11:51 AM, Leo Donahue  wrote:
>
>> On Wed, Mar 12, 2014 at 11:28 AM, John Smith wrote:
>>
>>> Is there a straightforward way to toggle or add something in Tomcat, in
>>> the
>>> event a webapp is intentionally taken 'offline for maintenance"? The user
>>> would receive the same single notification page saying as much, for any
>>> and
>>> all requests.
>>>
>>> Tomcat 7.0.42
>>>
>>
>> What would respond to the user's request if the web app they asked for is
>> down?  All you are going to get is a not found error which will be handled
>> by your ROOT web application.
>>
>
> I wonder if parallel deployment is an option for you?  Maybe someone else
> will have a better idea.
>
> webapp#1.war could be your notice web app, while webapp#2.war could be
> your normal site.
>
> Deleting webapp#2.war would make requests fall back to your web app that
> notifies the user the site is down.
>
> Redeploying an updated webapp#2 would then override the the other one.
>

Redeeming myself

Use two # symbols.  webapp.war  would be an earlier version of webapp##1.war

Read this:
http://tomcat.apache.org/tomcat-7.0-doc/config/context.html#Parallel_deployment


Re: Site down for maintenance senario

2014-03-12 Thread Leo Donahue
On Wed, Mar 12, 2014 at 11:51 AM, Leo Donahue  wrote:

> On Wed, Mar 12, 2014 at 11:28 AM, John Smith wrote:
>
>> Is there a straightforward way to toggle or add something in Tomcat, in
>> the
>> event a webapp is intentionally taken 'offline for maintenance"? The user
>> would receive the same single notification page saying as much, for any
>> and
>> all requests.
>>
>> Tomcat 7.0.42
>>
>
> What would respond to the user's request if the web app they asked for is
> down?  All you are going to get is a not found error which will be handled
> by your ROOT web application.
>

I wonder if parallel deployment is an option for you?  Maybe someone else
will have a better idea.

webapp#1.war could be your notice web app, while webapp#2.war could be your
normal site.

Deleting webapp#2.war would make requests fall back to your web app that
notifies the user the site is down.

Redeploying an updated webapp#2 would then override the the other one.


Re: Site down for maintenance senario

2014-03-12 Thread Leo Donahue
On Wed, Mar 12, 2014 at 11:28 AM, John Smith wrote:

> Is there a straightforward way to toggle or add something in Tomcat, in the
> event a webapp is intentionally taken 'offline for maintenance"? The user
> would receive the same single notification page saying as much, for any and
> all requests.
>
> Tomcat 7.0.42
>

What would respond to the user's request if the web app they asked for is
down?  All you are going to get is a not found error which will be handled
by your ROOT web application.


Site down for maintenance senario

2014-03-12 Thread John Smith
Is there a straightforward way to toggle or add something in Tomcat, in the
event a webapp is intentionally taken 'offline for maintenance"? The user
would receive the same single notification page saying as much, for any and
all requests.

Tomcat 7.0.42