本文整理汇总了Java中io.undertow.servlet.ServletExtension类的典型用法代码示例。如果您正苦于以下问题:Java ServletExtension类的具体用法?Java ServletExtension怎么用?Java ServletExtension使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ServletExtension类属于io.undertow.servlet包,在下文中一共展示了ServletExtension类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: addFaviconExceptionHandler
import io.undertow.servlet.ServletExtension; //导入依赖的package包/类
/**
* Add the default WildFly Swarm {@code favicon.ico} handler.
*
* @return This archive.
*/
@SuppressWarnings("unchecked")
default T addFaviconExceptionHandler() throws IOException {
// Add FaviconServletExtension
String path = "WEB-INF/classes/" + FaviconServletExtension.EXTENSION_NAME.replace('.', '/') + ".class";
byte[] generatedExtension;
generatedExtension = FaviconFactory.createFaviconServletExtension(FaviconServletExtension.EXTENSION_NAME);
add(new ByteArrayAsset(generatedExtension), path);
// Add FaviconErrorHandler
path = "WEB-INF/classes/" + FaviconServletExtension.HANDLER_NAME.replace('.', '/') + ".class";
byte[] generatedHandler;
generatedHandler = FaviconFactory.createFaviconErrorHandler(FaviconServletExtension.HANDLER_NAME);
add(new ByteArrayAsset(generatedHandler), path);
// Add services entry for FaviconServletExtension
this.addAsServiceProvider(ServletExtension.class.getName(), FaviconServletExtension.EXTENSION_NAME);
return (T) this;
}
开发者ID:wildfly-swarm,项目名称:wildfly-swarm,代码行数:25,代码来源:WebXmlContainer.java
示例2: getServletExtensions
import io.undertow.servlet.ServletExtension; //导入依赖的package包/类
public List<ServletExtension> getServletExtensions() {
return servletExtensions;
}
开发者ID:lamsfoundation,项目名称:lams,代码行数:4,代码来源:DeploymentInfo.java
示例3: addServletExtension
import io.undertow.servlet.ServletExtension; //导入依赖的package包/类
/**
* Adds an additional servlet extension to the deployment. Servlet extensions are generally discovered
* using META-INF/services entries, however this may not be practical in all environments.
* @param servletExtension The servlet extension
* @return this
*/
public DeploymentInfo addServletExtension(final ServletExtension servletExtension) {
this.servletExtensions.add(servletExtension);
return this;
}
开发者ID:lamsfoundation,项目名称:lams,代码行数:11,代码来源:DeploymentInfo.java
注:本文中的io.undertow.servlet.ServletExtension类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论