final AsyncContext actx = req.startAsync();
actx.setTimeout(Long.MAX_VALUE);
Runnable run = new Runnable() {
+ @Override
public void run() {
try {
req.setAttribute("dispatch", Boolean.TRUE);
final AsyncContext actx = req.startAsync();
actx.setTimeout(30*1000);
Runnable run = new Runnable() {
+ @Override
public void run() {
try {
String path = "/jsp/async/async1.jsp";
final AsyncContext actx = req.startAsync();
actx.setTimeout(30*1000);
Runnable run = new Runnable() {
+ @Override
public void run() {
try {
Thread.currentThread().setName("Async2-Thread");
}
}
+ @Override
public void run() {
try {
* @throws IOException
* @throws ServletException
*/
+ @Override
public void event(CometEvent event)
throws IOException, ServletException {
* The background thread that listens for incoming TCP/IP connections and
* hands them off to an appropriate processor.
*/
+ @Override
public void run() {
// Loop until we receive a shutdown command
* @param filterConfig The filter configuration object
*/
+ @Override
public void init(FilterConfig filterConfig) {
config = filterConfig;
/**
* Take this filter out of service.
*/
+ @Override
public void destroy() {
this.config = null;
* (<code>chain.doFilter()</code>), <br>
**/
+ @Override
public void doFilter ( ServletRequest request, ServletResponse response,
FilterChain chain ) throws IOException, ServletException {
/**
* Take this filter out of service.
*/
+ @Override
public void destroy() {
this.attribute = null;
* @exception IOException if an input/output error occurs
* @exception ServletException if a servlet error occurs
*/
+ @Override
public void doFilter(ServletRequest request, ServletResponse response,
FilterChain chain)
throws IOException, ServletException {
*
* @param fConfig The filter configuration object
*/
+ @Override
public void init(FilterConfig fConfig) throws ServletException {
this.filterConfig = fConfig;
/**
* Take this filter out of service.
*/
+ @Override
public void destroy() {
this.encoding = null;
* @exception IOException if an input/output error occurs
* @exception ServletException if a servlet error occurs
*/
+ @Override
public void doFilter(ServletRequest request, ServletResponse response,
FilterChain chain)
throws IOException, ServletException {
*
* @param fConfig The filter configuration object
*/
+ @Override
public void init(FilterConfig fConfig) throws ServletException {
this.filterConfig = fConfig;
}
}
+ @Override
public void setDynamicAttribute( String uri, String localName,
Object value )
throws JspException
*
* @param event The servlet context attribute event
*/
+ @Override
public void attributeAdded(ServletContextAttributeEvent event) {
log("attributeAdded('" + event.getName() + "', '" +
*
* @param event The servlet context attribute event
*/
+ @Override
public void attributeRemoved(ServletContextAttributeEvent event) {
log("attributeRemoved('" + event.getName() + "', '" +
*
* @param event The servlet context attribute event
*/
+ @Override
public void attributeReplaced(ServletContextAttributeEvent event) {
log("attributeReplaced('" + event.getName() + "', '" +
*
* @param event The servlet context event
*/
+ @Override
public void contextDestroyed(ServletContextEvent event) {
log("contextDestroyed()");
*
* @param event The servlet context event
*/
+ @Override
public void contextInitialized(ServletContextEvent event) {
this.context = event.getServletContext();
* @param event
* The session attribute event
*/
+ @Override
public void attributeAdded(HttpSessionBindingEvent event) {
log("attributeAdded('" + event.getSession().getId() + "', '"
* @param event
* The session attribute event
*/
+ @Override
public void attributeRemoved(HttpSessionBindingEvent event) {
log("attributeRemoved('" + event.getSession().getId() + "', '"
* @param event
* The session attribute event
*/
+ @Override
public void attributeReplaced(HttpSessionBindingEvent event) {
log("attributeReplaced('" + event.getSession().getId() + "', '"
* @param event
* The servlet context event
*/
+ @Override
public void contextDestroyed(ServletContextEvent event) {
log("contextDestroyed()");
* @param event
* The servlet context event
*/
+ @Override
public void contextInitialized(ServletContextEvent event) {
this.context = event.getServletContext();
* @param event
* The session event
*/
+ @Override
public void sessionCreated(HttpSessionEvent event) {
log("sessionCreated('" + event.getSession().getId() + "')");
* @param event
* The session event
*/
+ @Override
public void sessionDestroyed(HttpSessionEvent event) {
log("sessionDestroyed('" + event.getSession().getId() + "')");