Hi all, I trying to understand under what conditions destroySubContext fails in tomcat..? I'm trying to destroy Context which I had created, because of which I'm unable to createContext the next time I start the service. My code is below :
private Context srvCtx; public void init(ServletConfig servletconfig) throws ServletException { Context initCtx = new InitialContext(); srvCtx = initCtx.createSubcontext("myapp"); } public void destroy() { try { if (srvCtx != null) { srvCtx.destroySubcontext(GS_CTX_NAME); srvCtx.close(); } } catch(NamingException e) { log_.error(new LogQueueMessageStructure("Couldn't unbind the context",3016),e); } } What is wrong with my code and also how can I debug this issue..? Please help me out..!! Regards, Ravikiran N