本文整理了Java中org.apache.catalina.Wrapper.findMappings()
方法的一些代码示例,展示了Wrapper.findMappings()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Wrapper.findMappings()
方法的具体详情如下:
包路径:org.apache.catalina.Wrapper
类名称:Wrapper
方法名:findMappings
[英]Return the mappings associated with this wrapper.
[中]返回与此包装器关联的映射。
代码示例来源:origin: psi-probe/psi-probe
si.setLoadOnStartup(wrapper.getLoadOnStartup());
si.setRunAs(wrapper.getRunAs());
si.getMappings().addAll(Arrays.asList(wrapper.findMappings()));
if (wrapper instanceof StandardWrapper) {
StandardWrapper sw = (StandardWrapper) wrapper;
代码示例来源:origin: org.apache.tomcat/tomcat-catalina
private void prepareWrapperMappingInfo(Context context, Wrapper wrapper,
List<WrapperMappingInfo> wrappers) {
String wrapperName = wrapper.getName();
boolean resourceOnly = context.isResourceOnlyServlet(wrapperName);
String[] mappings = wrapper.findMappings();
for (String mapping : mappings) {
boolean jspWildCard = (wrapperName.equals("jsp")
&& mapping.endsWith("/*"));
wrappers.add(new WrapperMappingInfo(mapping, wrapper, jspWildCard,
resourceOnly));
}
}
代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core
private void prepareWrapperMappingInfo(Context context, Wrapper wrapper,
List<WrapperMappingInfo> wrappers) {
String wrapperName = wrapper.getName();
boolean resourceOnly = context.isResourceOnlyServlet(wrapperName);
String[] mappings = wrapper.findMappings();
for (String mapping : mappings) {
boolean jspWildCard = (wrapperName.equals("jsp")
&& mapping.endsWith("/*"));
wrappers.add(new WrapperMappingInfo(mapping, wrapper, jspWildCard,
resourceOnly));
}
}
代码示例来源:origin: org.apache.tomee/tomee-jaxrs
accept = false;
if (!"org.apache.catalina.servlets.DefaultServlet".equals(wrapper.getServletClass())) {
for (final String mapping : wrapper.findMappings()) {
if (!mapping.isEmpty() && !"/*".equals(mapping) && !"/".equals(mapping) && !mapping.startsWith("*")
&& mapping.startsWith(this.mapping)) {
代码示例来源:origin: org.jboss.jbossas/jboss-as-tomcat
/**
* Jacc Specification : Appendix
* B.19 Calling isUserInRole from JSP not mapped to a Servlet
* Checking a WebRoleRefPermission requires the name of a Servlet to
* identify the scope of the reference to role translation. The name of a
* scoping servlet has not been established for an unmapped JSP.
*
* Resolution- For every security role in the web application add a
* WebRoleRefPermission to the corresponding role. The name of all such
* permissions shall be the empty string, and the actions of each
* permission shall be the corresponding role name.
* When checking a WebRoleRefPermission from a JSP not mapped to a servlet,
* use a permission with the empty string as its name and with the argument to is
* UserInRole as its actions.
*
* @param servlet Wrapper
* @return empty string if it is for an unmapped jsp or name of the servlet for others
*/
private String getServletName(Wrapper servlet)
{
//For jsp, the mapping will be (*.jsp, *.jspx)
String[] mappings = servlet.findMappings();
if (trace)
log.trace("[getServletName:servletmappings=" + mappings + ":servlet.getName()=" + servlet.getName() + "]");
if ("jsp".equals(servlet.getName()) && (mappings != null && mappings[0].indexOf("*.jsp") > -1))
return "";
else
return servlet.getName();
}
代码示例来源:origin: codefollower/Tomcat-Research
/**
* Register wrapper.
*/
private void registerWrapper(Wrapper wrapper) {
String wrapperName = wrapper.getName();
Context context = (Context) wrapper.getParent();
String contextPath = context.getPath();
if ("/".equals(contextPath)) {
contextPath = "";
}
String version = ((Context) wrapper.getParent()).getWebappVersion();
String hostName = context.getParent().getName();
String[] mappings = wrapper.findMappings();
for (String mapping : mappings) {
boolean jspWildCard = (wrapperName.equals("jsp")
&& mapping.endsWith("/*"));
mapper.addWrapper(hostName, contextPath, version, mapping, wrapper,
jspWildCard,
context.isResourceOnlyServlet(wrapperName));
}
if(log.isDebugEnabled()) {
log.debug(sm.getString("mapperListener.registerWrapper",
wrapperName, contextPath, service));
}
}
代码示例来源:origin: org.apache.geronimo.ext.tomcat/catalina
/**
* Register wrapper.
*/
private void registerWrapper(Wrapper wrapper) {
String wrapperName = wrapper.getName();
Context context = (Context) wrapper.getParent();
String contextPath = context.getPath();
if ("/".equals(contextPath)) {
contextPath = "";
}
String version = ((Context) wrapper.getParent()).getWebappVersion();
String hostName = context.getParent().getName();
String[] mappings = wrapper.findMappings();
for (String mapping : mappings) {
boolean jspWildCard = (wrapperName.equals("jsp")
&& mapping.endsWith("/*"));
mapper.addWrapper(hostName, contextPath, version, mapping, wrapper,
jspWildCard,
context.isResourceOnlyServlet(wrapperName));
}
if(log.isDebugEnabled()) {
log.debug(sm.getString("mapperListener.registerWrapper",
wrapperName, contextPath, connector));
}
}
代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7
/**
* Register wrapper.
*/
private void registerWrapper(Wrapper wrapper) {
String wrapperName = wrapper.getName();
Context context = (Context) wrapper.getParent();
String contextPath = context.getPath();
if ("/".equals(contextPath)) {
contextPath = "";
}
String version = ((Context) wrapper.getParent()).getWebappVersion();
String hostName = context.getParent().getName();
String[] mappings = wrapper.findMappings();
for (String mapping : mappings) {
boolean jspWildCard = (wrapperName.equals("jsp")
&& mapping.endsWith("/*"));
mapper.addWrapper(hostName, contextPath, version, mapping, wrapper,
jspWildCard,
context.isResourceOnlyServlet(wrapperName));
}
if(log.isDebugEnabled()) {
log.debug(sm.getString("mapperListener.registerWrapper",
wrapperName, contextPath, connector));
}
}
代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9
/**
* Register wrapper.
*/
private void registerWrapper(Wrapper wrapper) {
String wrapperName = wrapper.getName();
Context context = (Context) wrapper.getParent();
String contextPath = context.getPath();
if ("/".equals(contextPath)) {
contextPath = "";
}
String version = ((Context) wrapper.getParent()).getWebappVersion();
String hostName = context.getParent().getName();
String[] mappings = wrapper.findMappings();
for (String mapping : mappings) {
boolean jspWildCard = (wrapperName.equals("jsp")
&& mapping.endsWith("/*"));
mapper.addWrapper(hostName, contextPath, version, mapping, wrapper,
jspWildCard,
context.isResourceOnlyServlet(wrapperName));
}
if(log.isDebugEnabled()) {
log.debug(sm.getString("mapperListener.registerWrapper",
wrapperName, contextPath, connector));
}
}
代码示例来源:origin: jboss.web/jbossweb
protected void addContext(Context context) {
mapper.addContext(context.getParent().getName(), context.getName(), context,
context.findWelcomeFiles(), context.getResources());
// Add all wrappers
for (Container child : context.findChildren()) {
Wrapper wrapper = (Wrapper) child;
if (wrapper.getEnabled()) {
for (String mapping : wrapper.findMappings()) {
boolean jspWildCard = ("jsp".equals(wrapper.getName())
&& mapping.endsWith("/*"));
mapper.addWrapper(context.getParent().getName(), context.getName(),
mapping, wrapper, jspWildCard);
}
}
}
}
代码示例来源:origin: org.apache.catalina/com.springsource.org.apache.catalina
/**
* Register wrapper.
*/
private void registerWrapper(Wrapper wrapper) {
String wrapperName = wrapper.getName();
Context context = (Context) wrapper.getParent();
String contextPath = context.getPath();
if ("/".equals(contextPath)) {
contextPath = "";
}
String version = ((Context) wrapper.getParent()).getWebappVersion();
String hostName = context.getParent().getName();
String[] mappings = wrapper.findMappings();
for (String mapping : mappings) {
boolean jspWildCard = (wrapperName.equals("jsp")
&& mapping.endsWith("/*"));
mapper.addWrapper(hostName, contextPath, version, mapping, wrapper,
jspWildCard,
context.isResourceOnlyServlet(wrapperName));
}
if(log.isDebugEnabled()) {
log.debug(sm.getString("mapperListener.registerWrapper",
wrapperName, contextPath, connector));
}
}
代码示例来源:origin: org.jboss.web/jbossweb
protected void addContext(Context context) {
mapper.addContext(context.getParent().getName(), context.getName(), context,
context.findWelcomeFiles(), context.getResources());
// Add all wrappers
for (Container child : context.findChildren()) {
Wrapper wrapper = (Wrapper) child;
if (wrapper.getEnabled()) {
for (String mapping : wrapper.findMappings()) {
boolean jspWildCard = ("jsp".equals(wrapper.getName())
&& mapping.endsWith("/*"));
mapper.addWrapper(context.getParent().getName(), context.getName(),
mapping, wrapper, jspWildCard);
}
}
}
}
代码示例来源:origin: org.apache.tomcat/tomcat-catalina
/**
* Unregister wrapper.
*/
private void unregisterWrapper(Wrapper wrapper) {
Context context = ((Context) wrapper.getParent());
String contextPath = context.getPath();
String wrapperName = wrapper.getName();
if ("/".equals(contextPath)) {
contextPath = "";
}
String version = context.getWebappVersion();
String hostName = context.getParent().getName();
String[] mappings = wrapper.findMappings();
for (String mapping : mappings) {
mapper.removeWrapper(hostName, contextPath, version, mapping);
}
if(log.isDebugEnabled()) {
log.debug(sm.getString("mapperListener.unregisterWrapper",
wrapperName, contextPath, service));
}
}
代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core
/**
* Unregister wrapper.
*/
private void unregisterWrapper(Wrapper wrapper) {
Context context = ((Context) wrapper.getParent());
String contextPath = context.getPath();
String wrapperName = wrapper.getName();
if ("/".equals(contextPath)) {
contextPath = "";
}
String version = context.getWebappVersion();
String hostName = context.getParent().getName();
String[] mappings = wrapper.findMappings();
for (String mapping : mappings) {
mapper.removeWrapper(hostName, contextPath, version, mapping);
}
if(log.isDebugEnabled()) {
log.debug(sm.getString("mapperListener.unregisterWrapper",
wrapperName, contextPath, service));
}
}
代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9
/**
* Unregister wrapper.
*/
private void unregisterWrapper(Wrapper wrapper) {
String contextPath = ((Context) wrapper.getParent()).getPath();
String wrapperName = wrapper.getName();
if ("/".equals(contextPath)) {
contextPath = "";
}
String version = ((Context) wrapper.getParent()).getWebappVersion();
String hostName = wrapper.getParent().getParent().getName();
String[] mappings = wrapper.findMappings();
for (String mapping : mappings) {
mapper.removeWrapper(hostName, contextPath, version, mapping);
}
if(log.isDebugEnabled()) {
log.debug(sm.getString("mapperListener.unregisterWrapper",
wrapperName, contextPath, connector));
}
}
代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7
/**
* Unregister wrapper.
*/
private void unregisterWrapper(Wrapper wrapper) {
String contextPath = ((Context) wrapper.getParent()).getPath();
String wrapperName = wrapper.getName();
if ("/".equals(contextPath)) {
contextPath = "";
}
String version = ((Context) wrapper.getParent()).getWebappVersion();
String hostName = wrapper.getParent().getParent().getName();
String[] mappings = wrapper.findMappings();
for (String mapping : mappings) {
mapper.removeWrapper(hostName, contextPath, version, mapping);
}
if(log.isDebugEnabled()) {
log.debug(sm.getString("mapperListener.unregisterWrapper",
wrapperName, contextPath, connector));
}
}
代码示例来源:origin: org.apache.catalina/com.springsource.org.apache.catalina
/**
* Unregister wrapper.
*/
private void unregisterWrapper(Wrapper wrapper) {
String contextPath = ((Context) wrapper.getParent()).getPath();
String wrapperName = wrapper.getName();
if ("/".equals(contextPath)) {
contextPath = "";
}
String version = ((Context) wrapper.getParent()).getWebappVersion();
String hostName = wrapper.getParent().getParent().getName();
String[] mappings = wrapper.findMappings();
for (String mapping : mappings) {
mapper.removeWrapper(hostName, contextPath, version, mapping);
}
if(log.isDebugEnabled()) {
log.debug(sm.getString("mapperListener.unregisterWrapper",
wrapperName, contextPath, connector));
}
}
代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9
/**
* Unregister wrapper.
*/
private void unregisterWrapper(Wrapper wrapper) {
String contextPath = ((Context) wrapper.getParent()).getPath();
String wrapperName = wrapper.getName();
if ("/".equals(contextPath)) {
contextPath = "";
}
String version = ((Context) wrapper.getParent()).getWebappVersion();
String hostName = wrapper.getParent().getParent().getName();
String[] mappings = wrapper.findMappings();
for (String mapping : mappings) {
mapper.removeWrapper(hostName, contextPath, version, mapping);
}
if(log.isDebugEnabled()) {
log.debug(sm.getString("mapperListener.unregisterWrapper",
wrapperName, contextPath, connector));
}
}
代码示例来源:origin: codefollower/Tomcat-Research
/**
* Unregister wrapper.
*/
private void unregisterWrapper(Wrapper wrapper) {
String contextPath = ((Context) wrapper.getParent()).getPath();
String wrapperName = wrapper.getName();
if ("/".equals(contextPath)) {
contextPath = "";
}
String version = ((Context) wrapper.getParent()).getWebappVersion();
String hostName = wrapper.getParent().getParent().getName();
String[] mappings = wrapper.findMappings();
for (String mapping : mappings) {
mapper.removeWrapper(hostName, contextPath, version, mapping);
}
if(log.isDebugEnabled()) {
log.debug(sm.getString("mapperListener.unregisterWrapper",
wrapperName, contextPath, service));
}
}
代码示例来源:origin: org.apache.geronimo.ext.tomcat/catalina
/**
* Unregister wrapper.
*/
private void unregisterWrapper(Wrapper wrapper) {
String contextPath = ((Context) wrapper.getParent()).getPath();
String wrapperName = wrapper.getName();
if ("/".equals(contextPath)) {
contextPath = "";
}
String version = ((Context) wrapper.getParent()).getWebappVersion();
String hostName = wrapper.getParent().getParent().getName();
String[] mappings = wrapper.findMappings();
for (String mapping : mappings) {
mapper.removeWrapper(hostName, contextPath, version, mapping);
}
if(log.isDebugEnabled()) {
log.debug(sm.getString("mapperListener.unregisterWrapper",
wrapperName, contextPath, connector));
}
}
内容来源于网络,如有侵权,请联系作者删除!