You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by daniel joyce <da...@gmail.com> on 2009/02/11 04:00:00 UTC

Best way to implement a "This website is undergoing maintenance" page?

I'm working a simple out of the box community website system using
Tapestry, H2 and JDO ( Data Nucleus ). I want to provide a way for the
admin to click a button and have all subsequent requests for content
come up "This website is undergoing maintenance, please try again
later".

There is a lot of magic in the tapestry framework ( specially named
classes for setting up services, etc ), and talks about command
chains, and other things. The documentation provides a basic overview,
but I can't find any info on how these things are built, or how to
inject my own behaviour.

I think I need to inject a custom Dispatcher in the Master Dispatcher
Service, but I can't find any docs on how to do this. My plan is this
dispatcher would check to see if this flag were active, and if so,
redirect all requests to the "undergoing maintenance" page.

Very nice framework, just trying to figure out where all the magic is.

-Daniel

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


Re: Best way to implement a "This website is undergoing maintenance" page?

Posted by Howard Lewis Ship <hl...@gmail.com>.
Chances are you are doing port forwarding from Apache into your
servlet container (Tomcat or Jetty).

For example (this is from tapestry.formos.com).

httpd.conf:

ProxyPass /bamboo http://localhost:8085/bamboo
ProxyPassReverse /bamboo http://localhost:8085/bamboo

Change this configuration to forward to a different location;
alternatey, disable this configuration so that the real /bamboo folder
is exposed, complete with a "We're fixing things!" message page,
styled to look like your application.  Meanwhile, bounce Tomcat or
do whatever.

I'd say that if your application is so unstable that you need to have
a "we're upgrading" page, then you probably want to subtract a few
layers (Tomcat, Tapestry, your app) from the equation.



On Tue, Feb 10, 2009 at 7:00 PM, daniel joyce <da...@gmail.com> wrote:
> I'm working a simple out of the box community website system using
> Tapestry, H2 and JDO ( Data Nucleus ). I want to provide a way for the
> admin to click a button and have all subsequent requests for content
> come up "This website is undergoing maintenance, please try again
> later".
>
> There is a lot of magic in the tapestry framework ( specially named
> classes for setting up services, etc ), and talks about command
> chains, and other things. The documentation provides a basic overview,
> but I can't find any info on how these things are built, or how to
> inject my own behaviour.
>
> I think I need to inject a custom Dispatcher in the Master Dispatcher
> Service, but I can't find any docs on how to do this. My plan is this
> dispatcher would check to see if this flag were active, and if so,
> redirect all requests to the "undergoing maintenance" page.
>
> Very nice framework, just trying to figure out where all the magic is.
>
> -Daniel
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: dev-help@tapestry.apache.org
>
>



-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


Re: Best way to implement a "This website is undergoing maintenance" page?

Posted by Howard Lewis Ship <hl...@gmail.com>.
On Wed, Feb 11, 2009 at 2:53 AM, Filip S. Adamsen <fs...@fsadev.com> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hello there!
>
> That sounds like the approach I would take if I were you. The code on
> the page you found would be a good starting point, I don't think much of
> it - if anything - has changed. And if it has, it's most likely very
> easy to figure out.
>
> That said, this list is about the development of Tapestry itself - you
> should use the users list for questions like this. There are a lot more
> people on there, so your questions have a better chance of being
> answered. :)
>
> /Filip
>
> On 2009-02-11 04:01, daniel joyce wrote:
>> Okay, I found a page:
>>
>> Tapestry5HowToCreateADispatcher
>>
>> But I know a lot has changed since 2007. Any updates I need to be aware of?
>>
>> On Tue, Feb 10, 2009 at 7:00 PM, daniel joyce <da...@gmail.com> wrote:
>>> I'm working a simple out of the box community website system using
>>> Tapestry, H2 and JDO ( Data Nucleus ). I want to provide a way for the
>>> admin to click a button and have all subsequent requests for content
>>> come up "This website is undergoing maintenance, please try again
>>> later".
>>>
>>> There is a lot of magic in the tapestry framework ( specially named
>>> classes for setting up services, etc ), and talks about command
>>> chains, and other things. The documentation provides a basic overview,
>>> but I can't find any info on how these things are built, or how to
>>> inject my own behaviour.
>>>
>>> I think I need to inject a custom Dispatcher in the Master Dispatcher
>>> Service, but I can't find any docs on how to do this. My plan is this
>>> dispatcher would check to see if this flag were active, and if so,
>>> redirect all requests to the "undergoing maintenance" page.
>>>

You're on the right track; there's less documentation about this
because a) all the configuration of services falls into the few same
patterns (thanks to the IoC layer)
and b) the Tapestry source code is a very readable example of how to extend it.

>>> Very nice framework, just trying to figure out where all the magic is.
>>>
>>> -Daniel
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iQEcBAEBAgAGBQJJkq4WAAoJEEfiH7PpjaMn8b8IAJvZVKxozXDusw5ZM/8ZMD0l
> eqoJ2LYbnqr3cfGjwBhLQehxcFZ/mEisxs8e5cJTzTxkWEDTWybjDlgLtpFtsVS3
> iUe/NsdMGUPLG9vvw8AWPVQNLKEIo8WPjtxX9n4QL5LGuVjU/ne/mAA9qI46fvIw
> EvuwRaxjCqDATx4I7CeMGW+xp4BsYbrLLuBAc2WuXuV3j0udyxEJ7q4RP70V5+RZ
> pYoknWADgkZcPAbYhOz3chzsMslzhqtlbjMI36m7IqziThFeAPy7QhzNQB+uAMK/
> rREdZpFeYsIdDRgrEL2dwXkuSGdlcQitR0GaKDp4OTy7Ez+Ge+Z7kvZYn5kD81o=
> =jNvc
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: dev-help@tapestry.apache.org
>
>



-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


Re: Best way to implement a "This website is undergoing maintenance" page?

Posted by "Filip S. Adamsen" <fs...@fsadev.com>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello there!

That sounds like the approach I would take if I were you. The code on
the page you found would be a good starting point, I don't think much of
it - if anything - has changed. And if it has, it's most likely very
easy to figure out.

That said, this list is about the development of Tapestry itself - you
should use the users list for questions like this. There are a lot more
people on there, so your questions have a better chance of being
answered. :)

/Filip

On 2009-02-11 04:01, daniel joyce wrote:
> Okay, I found a page:
> 
> Tapestry5HowToCreateADispatcher
> 
> But I know a lot has changed since 2007. Any updates I need to be aware of?
> 
> On Tue, Feb 10, 2009 at 7:00 PM, daniel joyce <da...@gmail.com> wrote:
>> I'm working a simple out of the box community website system using
>> Tapestry, H2 and JDO ( Data Nucleus ). I want to provide a way for the
>> admin to click a button and have all subsequent requests for content
>> come up "This website is undergoing maintenance, please try again
>> later".
>>
>> There is a lot of magic in the tapestry framework ( specially named
>> classes for setting up services, etc ), and talks about command
>> chains, and other things. The documentation provides a basic overview,
>> but I can't find any info on how these things are built, or how to
>> inject my own behaviour.
>>
>> I think I need to inject a custom Dispatcher in the Master Dispatcher
>> Service, but I can't find any docs on how to do this. My plan is this
>> dispatcher would check to see if this flag were active, and if so,
>> redirect all requests to the "undergoing maintenance" page.
>>
>> Very nice framework, just trying to figure out where all the magic is.
>>
>> -Daniel
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iQEcBAEBAgAGBQJJkq4WAAoJEEfiH7PpjaMn8b8IAJvZVKxozXDusw5ZM/8ZMD0l
eqoJ2LYbnqr3cfGjwBhLQehxcFZ/mEisxs8e5cJTzTxkWEDTWybjDlgLtpFtsVS3
iUe/NsdMGUPLG9vvw8AWPVQNLKEIo8WPjtxX9n4QL5LGuVjU/ne/mAA9qI46fvIw
EvuwRaxjCqDATx4I7CeMGW+xp4BsYbrLLuBAc2WuXuV3j0udyxEJ7q4RP70V5+RZ
pYoknWADgkZcPAbYhOz3chzsMslzhqtlbjMI36m7IqziThFeAPy7QhzNQB+uAMK/
rREdZpFeYsIdDRgrEL2dwXkuSGdlcQitR0GaKDp4OTy7Ez+Ge+Z7kvZYn5kD81o=
=jNvc
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


Re: Best way to implement a "This website is undergoing maintenance" page?

Posted by daniel joyce <da...@gmail.com>.
Okay, I found a page:

Tapestry5HowToCreateADispatcher

But I know a lot has changed since 2007. Any updates I need to be aware of?

On Tue, Feb 10, 2009 at 7:00 PM, daniel joyce <da...@gmail.com> wrote:
> I'm working a simple out of the box community website system using
> Tapestry, H2 and JDO ( Data Nucleus ). I want to provide a way for the
> admin to click a button and have all subsequent requests for content
> come up "This website is undergoing maintenance, please try again
> later".
>
> There is a lot of magic in the tapestry framework ( specially named
> classes for setting up services, etc ), and talks about command
> chains, and other things. The documentation provides a basic overview,
> but I can't find any info on how these things are built, or how to
> inject my own behaviour.
>
> I think I need to inject a custom Dispatcher in the Master Dispatcher
> Service, but I can't find any docs on how to do this. My plan is this
> dispatcher would check to see if this flag were active, and if so,
> redirect all requests to the "undergoing maintenance" page.
>
> Very nice framework, just trying to figure out where all the magic is.
>
> -Daniel
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org