thread « Variable « JSP-Servlet Q&A





1. JSP variables and Thread problem    coderanch.com

2. Servlets, Variables, and Threads    coderanch.com

I have a question regarding threads and servlets. Say I have a servlet called TheServlet that uses non-servlet class named TheDatabase, whose job it is to query a database and return a String based on some query. Something like this: public class TheServlet extends HttpServlet{ //instance variable TheDatabase theDatabase = new TheDataBase(); public void doPost(HttpServletRequest req, HttpServletResponse resp) throws IOException, ServletException{ ...