本文整理了Java中org.apache.catalina.Wrapper.findInitParameters()
方法的一些代码示例,展示了Wrapper.findInitParameters()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Wrapper.findInitParameters()
方法的具体详情如下:
包路径:org.apache.catalina.Wrapper
类名称:Wrapper
方法名:findInitParameters
[英]Return the names of all defined initialization parameters for this servlet.
[中]
代码示例来源:origin: org.apache.tomcat/tomcat-catalina
@Override
public Dynamic addJspFile(String jspName, String jspFile) {
// jspName is validated in addServlet()
if (jspFile == null || !jspFile.startsWith("/")) {
throw new IllegalArgumentException(
sm.getString("applicationContext.addJspFile.iae", jspFile));
}
String jspServletClassName = null;
Map<String,String> jspFileInitParams = new HashMap<>();
Wrapper jspServlet = (Wrapper) context.findChild("jsp");
if (jspServlet == null) {
// No JSP servlet currently defined.
// Use default JSP Servlet class name
jspServletClassName = Constants.JSP_SERVLET_CLASS;
} else {
// JSP Servlet defined.
// Use same JSP Servlet class name
jspServletClassName = jspServlet.getServletClass();
// Use same init parameters
String[] params = jspServlet.findInitParameters();
for (String param : params) {
jspFileInitParams.put(param, jspServlet.findInitParameter(param));
}
}
// Add init parameter to specify JSP file
jspFileInitParams.put("jspFile", jspFile);
return addServlet(jspName, jspServletClassName, null, jspFileInitParams);
}
代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core
@Override
public Dynamic addJspFile(String jspName, String jspFile) {
// jspName is validated in addServlet()
if (jspFile == null || !jspFile.startsWith("/")) {
throw new IllegalArgumentException(
sm.getString("applicationContext.addJspFile.iae", jspFile));
}
String jspServletClassName = null;
Map<String,String> jspFileInitParams = new HashMap<>();
Wrapper jspServlet = (Wrapper) context.findChild("jsp");
if (jspServlet == null) {
// No JSP servlet currently defined.
// Use default JSP Servlet class name
jspServletClassName = Constants.JSP_SERVLET_CLASS;
} else {
// JSP Servlet defined.
// Use same JSP Servlet class name
jspServletClassName = jspServlet.getServletClass();
// Use same init parameters
String[] params = jspServlet.findInitParameters();
for (String param : params) {
jspFileInitParams.put(param, jspServlet.findInitParameter(param));
}
}
// Add init parameter to specify JSP file
jspFileInitParams.put("jspFile", jspFile);
return addServlet(jspName, jspServletClassName, null, jspFileInitParams);
}
代码示例来源:origin: org.apache.catalina/com.springsource.org.apache.catalina
@Override
public Map<String, String> getInitParameters() {
ParameterMap<String,String> result = new ParameterMap<String,String>();
String[] parameterNames = wrapper.findInitParameters();
for (String parameterName : parameterNames) {
result.put(parameterName, wrapper.findInitParameter(parameterName));
}
result.setLocked(true);
return result;
}
代码示例来源:origin: org.apache.tomcat/tomcat-catalina
private void convertJsps(WebXml webXml) {
Map<String,String> jspInitParams;
ServletDef jspServlet = webXml.getServlets().get("jsp");
if (jspServlet == null) {
jspInitParams = new HashMap<>();
Wrapper w = (Wrapper) context.findChild("jsp");
if (w != null) {
String[] params = w.findInitParameters();
for (String param : params) {
jspInitParams.put(param, w.findInitParameter(param));
}
}
} else {
jspInitParams = jspServlet.getParameterMap();
}
for (ServletDef servletDef: webXml.getServlets().values()) {
if (servletDef.getJspFile() != null) {
convertJsp(servletDef, jspInitParams);
}
}
}
代码示例来源:origin: org.apache.tomcat/tomcat-catalina
@Override
public Map<String, String> getInitParameters() {
ParameterMap<String,String> result = new ParameterMap<>();
String[] parameterNames = wrapper.findInitParameters();
for (String parameterName : parameterNames) {
result.put(parameterName, wrapper.findInitParameter(parameterName));
}
result.setLocked(true);
return result;
}
代码示例来源:origin: org.apache.catalina/com.springsource.org.apache.catalina
private void convertJsps(WebXml webXml) {
Map<String,String> jspInitParams;
ServletDef jspServlet = webXml.getServlets().get("jsp");
if (jspServlet == null) {
jspInitParams = new HashMap<String,String>();
Wrapper w = (Wrapper) context.findChild("jsp");
if (w != null) {
String[] params = w.findInitParameters();
for (String param : params) {
jspInitParams.put(param, w.findInitParameter(param));
}
}
} else {
jspInitParams = jspServlet.getParameterMap();
}
for (ServletDef servletDef: webXml.getServlets().values()) {
if (servletDef.getJspFile() != null) {
convertJsp(servletDef, jspInitParams);
}
}
}
代码示例来源:origin: org.apache.geronimo.ext.tomcat/catalina
@Override
public Map<String, String> getInitParameters() {
ParameterMap<String,String> result = new ParameterMap<String,String>();
String[] parameterNames = wrapper.findInitParameters();
for (String parameterName : parameterNames) {
result.put(parameterName, wrapper.findInitParameter(parameterName));
}
result.setLocked(true);
return result;
}
代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9
@Override
public Map<String, String> getInitParameters() {
ParameterMap<String,String> result = new ParameterMap<String,String>();
String[] parameterNames = wrapper.findInitParameters();
for (String parameterName : parameterNames) {
result.put(parameterName, wrapper.findInitParameter(parameterName));
}
result.setLocked(true);
return result;
}
代码示例来源:origin: codefollower/Tomcat-Research
@Override
public Map<String, String> getInitParameters() {
ParameterMap<String,String> result = new ParameterMap<>();
String[] parameterNames = wrapper.findInitParameters();
for (String parameterName : parameterNames) {
result.put(parameterName, wrapper.findInitParameter(parameterName));
}
result.setLocked(true);
return result;
}
代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core
private void convertJsps(WebXml webXml) {
Map<String,String> jspInitParams;
ServletDef jspServlet = webXml.getServlets().get("jsp");
if (jspServlet == null) {
jspInitParams = new HashMap<>();
Wrapper w = (Wrapper) context.findChild("jsp");
if (w != null) {
String[] params = w.findInitParameters();
for (String param : params) {
jspInitParams.put(param, w.findInitParameter(param));
}
}
} else {
jspInitParams = jspServlet.getParameterMap();
}
for (ServletDef servletDef: webXml.getServlets().values()) {
if (servletDef.getJspFile() != null) {
convertJsp(servletDef, jspInitParams);
}
}
}
代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core
@Override
public Map<String, String> getInitParameters() {
ParameterMap<String,String> result = new ParameterMap<>();
String[] parameterNames = wrapper.findInitParameters();
for (String parameterName : parameterNames) {
result.put(parameterName, wrapper.findInitParameter(parameterName));
}
result.setLocked(true);
return result;
}
代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9
@Override
public Map<String, String> getInitParameters() {
ParameterMap<String,String> result = new ParameterMap<String,String>();
String[] parameterNames = wrapper.findInitParameters();
for (String parameterName : parameterNames) {
result.put(parameterName, wrapper.findInitParameter(parameterName));
}
result.setLocked(true);
return result;
}
代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7
@Override
public Map<String, String> getInitParameters() {
ParameterMap<String,String> result = new ParameterMap<String,String>();
String[] parameterNames = wrapper.findInitParameters();
for (String parameterName : parameterNames) {
result.put(parameterName, wrapper.findInitParameter(parameterName));
}
result.setLocked(true);
return result;
}
代码示例来源:origin: codefollower/Tomcat-Research
private void convertJsps(WebXml webXml) {
Map<String,String> jspInitParams;
ServletDef jspServlet = webXml.getServlets().get("jsp");
if (jspServlet == null) {
jspInitParams = new HashMap<>();
Wrapper w = (Wrapper) context.findChild("jsp");
if (w != null) {
String[] params = w.findInitParameters();
for (String param : params) {
jspInitParams.put(param, w.findInitParameter(param));
}
}
} else {
jspInitParams = jspServlet.getParameterMap();
}
for (ServletDef servletDef: webXml.getServlets().values()) {
if (servletDef.getJspFile() != null) {
convertJsp(servletDef, jspInitParams);
}
}
}
代码示例来源:origin: org.apache.geronimo.ext.tomcat/catalina
private void convertJsps(WebXml webXml) {
Map<String,String> jspInitParams;
ServletDef jspServlet = webXml.getServlets().get("jsp");
if (jspServlet == null) {
jspInitParams = new HashMap<String,String>();
Wrapper w = (Wrapper) context.findChild("jsp");
if (w != null) {
String[] params = w.findInitParameters();
for (String param : params) {
jspInitParams.put(param, w.findInitParameter(param));
}
}
} else {
jspInitParams = jspServlet.getParameterMap();
}
for (ServletDef servletDef: webXml.getServlets().values()) {
if (servletDef.getJspFile() != null) {
convertJsp(servletDef, jspInitParams);
}
}
}
代码示例来源:origin: org.glassfish.main.web/web-core
actualClass = jspWrapper.getServletClassName();
String paramNames[] = jspWrapper.findInitParameters();
for (String paramName : paramNames) {
if (parameters.get(paramName) == null) {
代码示例来源:origin: tomcat/catalina
actualClass = jspWrapper.getServletClass();
String paramNames[] = jspWrapper.findInitParameters();
for (int i = 0; i < paramNames.length; i++) {
if (parameters.get(paramNames[i]) == null) {
代码示例来源:origin: jboss.web/jbossweb
actualClass = jspWrapper.getServletClass();
String paramNames[] = jspWrapper.findInitParameters();
for (int i = 0; i < paramNames.length; i++) {
if (parameters.get(paramNames[i]) == null) {
代码示例来源:origin: org.jboss.web/jbossweb
actualClass = jspWrapper.getServletClass();
String paramNames[] = jspWrapper.findInitParameters();
for (int i = 0; i < paramNames.length; i++) {
if (parameters.get(paramNames[i]) == null) {
内容来源于网络,如有侵权,请联系作者删除!