- I have a 'ServerThread' (one and only one server thread)
- The piece of code that serves images, upon request, is known as 'ClientThread'
- This 'ServerThread' can start N number of 'ClientThread', against N number of requests from web browser.
And YES. Good naming conventions help understand better. 'ClientThread' could better be named as 'RequestThread'.
But the problem still remains. My browser display ONE picture, sent from my server. After that ONE picture, it starts throwing said exception.
Well, as I suggested above, that is because the browser is not expecting it.
Perhaps I am having tough time understanding you. Please bear with me. To the best of my knowledge, I am sending only the images and nothing else. I also tried removing the header just before I transmit the image, even that does not help.
My problem is how do I make the tmpTutor.getId() and tmpSubject.getId() mehtod static so that I could implement in my controller ?
Cos right now, I can only insert the tutorDAOImpl when I do the preparedStatement for tutor.
When I want to do the associateTutorToSubject, I can't do it the way like yo said cos tutorDAOImpl and SubjectDAOImpl are both separate classes. And so there is no way for the controller to read the getId from the tutorDAOImpl etc.
Hi! I am learning servlet, can someone kind enough to explain where to place the username, password, address, and port to be used in connection to a MySQL database in WAMP instead of placing it in the code? So that if the address of MySql or server is changed I will not have to change the code. Take the succeding as an example, "jdbc:mysql://localhost:3306/sonoo","root","root"). I am thinking if they are written in the code and they will be changed like the password for mysql will be changed, I will have to change the code. Thus, where will I put the localhost, 3306, sonoo, root, and root so that I will not change the code everytime the address and password, etc. will change. I am using netbeans and apache tomcat. Thank you so much.