List of usage examples for javax.servlet ServletSecurityElement ServletSecurityElement
public ServletSecurityElement(ServletSecurity annotation)
From source file:org.brutusin.rpc.RpcWebInitializer.java
private RpcServlet registerRpcServlet(ServletContext ctx) { LOGGER.info("Starting HTTP RPC runtime"); RpcServlet servlet = new RpcServlet(); ServletRegistration.Dynamic regInfo = ctx.addServlet(RpcServlet.class.getName(), servlet); ServletSecurityElement sec = new ServletSecurityElement(new HttpConstraintElement()); regInfo.setServletSecurity(sec);/*from w w w . j av a 2 s . c o m*/ regInfo.setLoadOnStartup(1); regInfo.addMapping(RpcConfig.getInstance().getPath() + "/http"); return servlet; }