I have gone through many tutorials on user authentication and authorization, most of them uses form based authentication(j_security_check) and @RolesAllowed for authorization and jdbcRealm.
So, if the authorization has to work I have to send an HTTP request from client to server. But what I want is send normal websocket request and if I am unauthorized to access the method (based on @RolesAllowed parameters) I should get an Exception.
Any help will be appreciated.