2

I implemented a Opefire plugin.All is working but i want to use my servlet without login just like we can access PresentStatusServelt (Which is in presence plugin by "http://localhost:9090/plugins/presence/status") without login.

my init() method code of servlet is:

@Override

        public void init(ServletConfig servletConfig) throws ServletException {

            super.init(servletConfig);

           // Exclude this servlet from requiring the user to login

        AuthCheckFilter.addExclude("myplugin/upload");

    }

so why AuthCheckFilter.addExclude("myplugin/upload"); this method is not working for me. When i directly hit my servlet without login ,I am always redirected for login page then after login I come to my desired page..But I want to access my servlet withot login..Am I missing something..

4

1 回答 1

2

你重写了destroy()方法吗?通过这样做,您无需登录即可访问您的 servlet。

@Override
public void destroy() {
        super.destroy();
           // Release the excluded URL
        AuthCheckFilter.removeExclude("presence/status");
    }
于 2013-08-14T07:46:47.170 回答