hi , i am making an portal in servlet i am using global variable,like for example ----------------------------------------------------- import javax.servlet.*; import javax.servlet.http.*; import java.io.*; import java.util.*; import java.lang.*; import javax.naming.*; import java.sql.*; import java.net.*; import cpool.*; public class AdminSearch extends HttpServlet { String login; String password; String userType;
If you have global variables in Servlets and don't implement the SingleThreadModel you get 'unforseen errors'. Have a read of this at jguru or this at the same place, which describes how to make a srevlet thread safe and the life cycle of a servlet. Enjoy, Dave.
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.