本文整理匯總了Java中com.jcabi.manifests.ServletMfs類的典型用法代碼示例。如果您正苦於以下問題:Java ServletMfs類的具體用法?Java ServletMfs怎麽用?Java ServletMfs使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
ServletMfs類屬於com.jcabi.manifests包,在下文中一共展示了ServletMfs類的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: contextInitialized
import com.jcabi.manifests.ServletMfs; //導入依賴的package包/類
@Override
public void contextInitialized(final ServletContextEvent event) {
try {
Manifests.DEFAULT.append(new ServletMfs(event.getServletContext()));
event.getServletContext().setAttribute(
Base.class.getName(),
new CdBase(
new DyBase(
this.dynamo(),
this.sttc().counters().get("bib-quote")
)
)
);
} catch (final IOException ex) {
throw new IllegalStateException(ex);
}
}
示例2: init
import com.jcabi.manifests.ServletMfs; //導入依賴的package包/類
/**
* {@inheritDoc}
* @checkstyle RedundantThrows (4 lines)
*/
@Override
public void init(@NotNull final FilterConfig config)
throws ServletException {
this.tfactory = TransformerFactory.newInstance();
if (this.tfactory == null) {
throw new ServletException(
"failed to make a new instance of TransformerFactory"
);
}
if (!"net.sf.saxon.TransformerFactoryImpl"
.equals(this.tfactory.getClass().getName())) {
Logger.warn(
this,
// @checkstyle LineLength (1 line)
"Be aware that Saxon implementation of %s is replaced with %s, which may lead to unexpected problems",
this.tfactory, TransformerFactory.class.getName()
);
}
final ServletContext context = config.getServletContext();
this.tfactory.setURIResolver(new ContextResourceResolver(context));
try {
Manifests.DEFAULT.append(new ServletMfs(context));
} catch (final IOException ex) {
throw new IllegalStateException(ex);
}
}