What is the risk of having instance variables in a servlet?
- Instance variables are mandatory in servlets.
- Instance variables can be accessed by multiple threads concurrently, leading to potential threading issues.
- Instance variables increase servlet performance.
- There is no risk.
The risk of having instance variables in a servlet is that they can be accessed by multiple threads concurrently, potentially causing threading issues.
Loading...
Related Quiz
- What is the key difference between Stored XSS and Reflected XSS attacks?
- Why is it important to close resources like database connections in servlets?
- How should an HTTP servlet respond to a request with an If-Modified-Since header older than the content's last modification date?
- A transaction's property ensuring that either all its operations are completed successfully, or none are, is known as _________.
- How can a filter access initialization parameters set in the web.xml file?