Java uses HttpSessionListener and filter in jetty9
•
Java
Java uses HttpSessionListener and filter in jetty9
HttpSessionListener
Called when a session is created or destroyed
Example code:
Registration method:
Note: if session is not used in the whole request, it will not be generated and listener will not be called
Filter
Called when the client requests data
Example code:
Registration method:
Note: if the requested path is wrong, the filter will not be triggered
Thank you for reading, hope to help you, thank you for your support to this site!
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码