本文整理了Java中org.mortbay.jetty.webapp.WebAppContext.isStarted()
方法的一些代码示例,展示了WebAppContext.isStarted()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebAppContext.isStarted()
方法的具体详情如下:
包路径:org.mortbay.jetty.webapp.WebAppContext
类名称:WebAppContext
方法名:isStarted
暂无
代码示例来源:origin: feroult/yawp
@Override
public void fileAdded(String filename) throws Exception {
if (!webapp.isStarted()) {
return;
}
logger.log(Level.INFO, filename + " updated, reloading the webapp!");
restart(webapp);
}
代码示例来源:origin: com.github.albfernandez.test-jsf/jsf-test-jetty
@Override
public ServletContext getContext() {
if (!webAppContext.isStarted()) {
throw new IllegalStateException("Server should be started before getContext() can be called!");
}
return webAppContext.getServletContext();
}
代码示例来源:origin: org.mortbay.jetty/com.springsource.org.mortbay.jetty.server
/** Set temporary directory for context.
* The javax.servlet.context.tempdir attribute is also set.
* @param dir Writable temporary directory.
*/
public void setTempDirectory(File dir)
{
if (isStarted())
throw new IllegalStateException("Started");
if (dir!=null)
{
try{dir=new File(dir.getCanonicalPath());}
catch (IOException e){Log.warn(Log.EXCEPTION,e);}
}
if (dir!=null && !dir.exists())
{
dir.mkdir();
dir.deleteOnExit();
}
else if (dir != null)
_isExistingTmpDir = true;
if (dir!=null && ( !dir.exists() || !dir.isDirectory() || !dir.canWrite()))
throw new IllegalArgumentException("Bad temp directory: "+dir);
_tmpDir=dir;
setAttribute(ServletHandler.__J_S_CONTEXT_TEMPDIR,_tmpDir);
}
代码示例来源:origin: org.mortbay.jetty/com.springsource.org.mortbay.jetty.server
public void configureDefaults() throws Exception
{
//cannot configure if the context is already started
if (_context.isStarted())
{
if (Log.isDebugEnabled()){Log.debug("Cannot configure webapp after it is started");}
return;
}
String defaultsDescriptor=getWebAppContext().getDefaultsDescriptor();
if(defaultsDescriptor!=null&&defaultsDescriptor.length()>0)
{
Resource dftResource=Resource.newSystemResource(defaultsDescriptor);
if(dftResource==null)
dftResource=Resource.newResource(defaultsDescriptor);
configure(dftResource.getURL().toString());
_defaultWelcomeFileList=_welcomeFiles!=null;
}
}
代码示例来源:origin: org.mortbay.jetty/com.springsource.org.mortbay.jetty.server
public void configureWebApp() throws Exception
{
//cannot configure if the context is already started
if (_context.isStarted())
{
if (Log.isDebugEnabled())
Log.debug("Cannot configure webapp after it is started");
return;
}
URL webxml=findWebXml();
if (webxml!=null)
configure(webxml.toString());
String overrideDescriptor=getWebAppContext().getOverrideDescriptor();
if(overrideDescriptor!=null&&overrideDescriptor.length()>0)
{
Resource orideResource=Resource.newSystemResource(overrideDescriptor);
if(orideResource==null)
orideResource=Resource.newResource(overrideDescriptor);
_xmlParser.setValidating(false);
configure(orideResource.getURL().toString());
}
}
代码示例来源:origin: org.mortbay.jetty/com.springsource.org.mortbay.jetty.server
if (_context.isStarted())
代码示例来源:origin: org.mortbay.jetty/com.springsource.org.mortbay.jetty.server
if (_context.isStarted())
内容来源于网络,如有侵权,请联系作者删除!