Tomcat server access restriction cause that Websocket doesn't connect -
when config tomcat server user command access, chat client based on websocket can't connect server, rest of components of page run correctly. know how create websocket work configuration? i've configured command access changing tomcat-users.xml file ( adding "tomcat-users" username, password , rol) , changing web.xml file adding:
<security-constraint> <web-resource-collection> <url-pattern>/*</url-pattern> </web-resource-collection> <auth-constraint> <role-name>user</role-name> </auth-constraint> </security-constraint> and
<login-config> <auth-method>basic</auth-method> <realm-name> access command </realm-name> </login-config> the page including chat websocket run without command access, moment need implement restriction on server.
after long time looking reply in internet, have found many comments indicating implementation of http authentication method not compatible websocket. authentication must done other methods.
link1
link2
tomcat websocket
No comments:
Post a Comment