本文整理了Java中org.apache.catalina.Wrapper.setServlet()
方法的一些代码示例,展示了Wrapper.setServlet()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Wrapper.setServlet()
方法的具体详情如下:
包路径:org.apache.catalina.Wrapper
类名称:Wrapper
方法名:setServlet
[英]Set the associated servlet instance
[中]设置关联的servlet实例
代码示例来源:origin: pippo-java/pippo
wrapper.setServlet(pippoServlet);
context.addChild(wrapper);
context.addServletMapping(pippoFilterPath, name);
代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9
} else {
wrapper.setServletClass(servlet.getClass().getName());
wrapper.setServlet(servlet);
代码示例来源:origin: codefollower/Tomcat-Research
} else {
wrapper.setServletClass(servlet.getClass().getName());
wrapper.setServlet(servlet);
代码示例来源:origin: com.github.skjolber.mockito-rest-spring/tomcat
defaultServlet.setLoadOnStartup(1);
defaultServlet.setOverridable(true);
defaultServlet.setServlet(servlet);
代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9
} else {
wrapper.setServletClass(servlet.getClass().getName());
wrapper.setServlet(servlet);
代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7
} else {
wrapper.setServletClass(servlet.getClass().getName());
wrapper.setServlet(servlet);
代码示例来源:origin: org.apache.catalina/com.springsource.org.apache.catalina
} else {
wrapper.setServletClass(servlet.getClass().getName());
wrapper.setServlet(servlet);
代码示例来源:origin: org.apache.tomcat/tomcat-catalina
wrapper.setServlet(servlet);
if (context.wasCreatedDynamicServlet(servlet)) {
annotation = servlet.getClass().getAnnotation(ServletSecurity.class);
代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core
wrapper.setServlet(servlet);
if (context.wasCreatedDynamicServlet(servlet)) {
annotation = servlet.getClass().getAnnotation(ServletSecurity.class);
代码示例来源:origin: org.apache.geronimo.ext.tomcat/catalina
} else {
wrapper.setServletClass(servlet.getClass().getName());
wrapper.setServlet(servlet);
代码示例来源:origin: jboss.web/jbossweb
public ServletRegistration.Dynamic addServlet(String servletName, Servlet servlet) {
if (restricted) {
throw new UnsupportedOperationException(sm.getString("applicationContext.restricted"));
}
if (!context.isStarting()) {
throw new IllegalStateException(sm.getString("applicationContext.alreadyInitialized",
getContextPath()));
}
if (context.findChild(servletName) != null) {
return null;
}
// Servlet instance unicity
for (Container container : context.getParent().findChildren()) {
for (Container wrapper : container.findChildren()) {
if (((Wrapper) wrapper).getServlet() == servlet) {
return null;
}
}
}
Wrapper wrapper = context.createWrapper();
wrapper.setDynamic(true);
wrapper.setName(servletName);
wrapper.setServletClass(servlet.getClass().getName());
wrapper.setServlet(servlet);
context.addChild(wrapper);
return (ServletRegistration.Dynamic) wrapper.getFacade();
}
代码示例来源:origin: org.jboss.as/jboss-as-webservices-server-integration
final Wrapper wsfsWrapper = context.createWrapper();
wsfsWrapper.setName(servletName);
wsfsWrapper.setServlet((Servlet) clazz.newInstance());
wsfsWrapper.setServletClass(servletClass);
context.addChild(wsfsWrapper);
代码示例来源:origin: org.jboss.as/jboss-as-webservices-server-integration
private static void addServlets(JBossWebMetaData jbwebMD, StandardContext context) {
for (JBossServletMetaData smd : jbwebMD.getServlets()) {
final String sc = smd.getServletClass();
if (sc.equals(WSFServlet.class.getName())) {
final String servletName = smd.getServletName();
List<ParamValueMetaData> params = smd.getInitParam();
List<String> urlPatterns = null;
for (ServletMappingMetaData smmd : jbwebMD.getServletMappings()) {
if (smmd.getServletName().equals(servletName)) {
urlPatterns = smmd.getUrlPatterns();
break;
}
}
WSFServlet wsfs = new WSFServlet();
Wrapper wsfsWrapper = context.createWrapper();
wsfsWrapper.setName(servletName);
wsfsWrapper.setServlet(wsfs);
wsfsWrapper.setServletClass(WSFServlet.class.getName());
for (ParamValueMetaData param : params) {
wsfsWrapper.addInitParameter(param.getParamName(), param.getParamValue());
}
context.addChild(wsfsWrapper);
for (String urlPattern : urlPatterns) {
context.addServletMapping(urlPattern, servletName);
}
}
}
}
代码示例来源:origin: jboss-switchyard/release
wrapper.setName(SERVLET_NAME);
wrapper.setServletClass(HttpGatewayServlet.class.getName());
wrapper.setServlet(new HttpGatewayServlet());
wrapper.setLoadOnStartup(1);
serverContext.addChild(wrapper);
代码示例来源:origin: org.switchyard/switchyard-deploy-jboss-as7
wrapper.setName(SERVLET_NAME);
wrapper.setServletClass(HttpGatewayServlet.class.getName());
wrapper.setServlet(new HttpGatewayServlet());
wrapper.setLoadOnStartup(1);
serverContext.addChild(wrapper);
代码示例来源:origin: org.jboss.web/jbossweb
wrapper.setName(servletName);
wrapper.setServletClass(servlet.getClass().getName());
wrapper.setServlet(servlet);
context.addChild(wrapper);
return (ServletRegistration.Dynamic) wrapper.getFacade();
代码示例来源:origin: org.jboss.as/jboss-as-osgi-http
Wrapper wrapper = ctx.createWrapper();
wrapper.setName(wrapperName);
wrapper.setServlet(new SecurityServletWrapper(servlet, httpContext));
wrapper.setServletClass(servlet.getClass().getName());
内容来源于网络,如有侵权,请联系作者删除!