tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leon Rosenberg" <rosenberg.l...@googlemail.com>
Subject Re: stopping a tomcat web application
Date Sun, 03 Sep 2006 10:56:29 GMT
Hmm,

I think it's not possible from tomcats view, but you could have a
static class, where you store your status, like
class Status{
  public static boolean continueLoading(){
  }
}


in your servlet you can check whether loading is alowed :
public class MyServlet extends HttpServlet{
  public void init(ServletConfig config){
    if(!Status.continueLoading())
      throw new Error("Loading not allowed");
  }

}

this way your webapp will maybe loaded, but not visible for anyone.

regards
Leon


On 9/3/06, asaf.lahav <asaf.lahav@gmail.com> wrote:
> Hi all,
>
>
>
> I wrote a ServletContextListener implementation in which I initialize some
> static classes and objects.
>
> I would like to know whether and how it's possible to stop the web
> application from continuing the start sequence in case something goes wrong
> in the initialize sequence?
>
>
>
> I would really appreciate any code samples or articles,
>
> Thanks in advance,
>
> Asaf
>
>
>

---------------------------------------------------------------------
To start a new topic, e-mail: users@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