Session Tracking using J2EE

后端 未结 3 699
醉话见心
醉话见心 2021-01-27 18:25

I\'m trying to implement session tracking on my website. Basically I want the users to be able to login in my website using their username and their password, pass throw my webs

3条回答
  •  有刺的猬
    2021-01-27 18:50

    I am confused with term session tracking, but I understand that you want to allow users to access protected resources.

    What you need is to define roles, authentication provider and mapping for secured resources. Then you can combine it in web.xml:

    
             SecurityConstraint
            
                  WRCollection
                 /*
         
            
                  TutorialUser
            
            
                CONFIDENTIAL
            
       
      
            FORM
         
                  /loginform.html
                 /loginerror.html
          
     
     
        TutorialUser
    
    

    See http://docs.oracle.com/cd/E19226-01/820-7627/bncby/index.html for details. This is JEE standard way.

提交回复
热议问题