We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Map<String, ServletInfoDef> servlets = webaLoader.getServlets(); servlets.forEach((k,v)->{ ServletDef sd = v.getServlet(); ServletMappingDef smd = v.getServletMapping(); ServletRegistration sr = servletContext.addServlet(k, sd.getServletClass()); sr.addMapping(smd.getUrlPatterns().stream().toArray(String[]::new)); sr.setAsyncSupported(sd.getAsyncSupported()); sr.setInitParameters(sd.getParameterMap()); sr.setLoadOnStartup(sd.getLoadOnStartup()); sr.setRunAsRole(sd.getRunAs()); }); 这里怎么为servletContext设置其他属性呢? ServletRegistration sr = servletContext.addServlet(k, sd.getServletClass()); 感觉这样子单独拿出来设置了呼啦呼啦一通servlet属性后,却没法子将这些属性回传回去
Map<String, ServletInfoDef> servlets = webaLoader.getServlets(); servlets.forEach((k,v)->{ ServletDef sd = v.getServlet(); ServletMappingDef smd = v.getServletMapping(); ServletRegistration sr = servletContext.addServlet(k, sd.getServletClass()); sr.addMapping(smd.getUrlPatterns().stream().toArray(String[]::new)); sr.setAsyncSupported(sd.getAsyncSupported()); sr.setInitParameters(sd.getParameterMap()); sr.setLoadOnStartup(sd.getLoadOnStartup()); sr.setRunAsRole(sd.getRunAs()); });
ServletRegistration sr = servletContext.addServlet(k, sd.getServletClass());
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Map<String, ServletInfoDef> servlets = webaLoader.getServlets(); servlets.forEach((k,v)->{ ServletDef sd = v.getServlet(); ServletMappingDef smd = v.getServletMapping(); ServletRegistration sr = servletContext.addServlet(k, sd.getServletClass()); sr.addMapping(smd.getUrlPatterns().stream().toArray(String[]::new)); sr.setAsyncSupported(sd.getAsyncSupported()); sr.setInitParameters(sd.getParameterMap()); sr.setLoadOnStartup(sd.getLoadOnStartup()); sr.setRunAsRole(sd.getRunAs()); });
这里怎么为servletContext设置其他属性呢?
ServletRegistration sr = servletContext.addServlet(k, sd.getServletClass());
感觉这样子单独拿出来设置了呼啦呼啦一通servlet属性后,却没法子将这些属性回传回去
The text was updated successfully, but these errors were encountered: