Unless you've configured your container to do otherwise, it will do nothing (as Ulf said) until you touch the JSP file; at which time, your modified Java file will be overwritten with a new version of the generated servlet code and that will be compiled into a servlet class.
Hi, If you modify only servlet code(.java) without compiling manually,nothing will happend. Because based on the jsp timestamp and .class timestamp the latest will get executted. But if you compile the code then your modified class will execute irrespective of jsp(If you dont touch jsp).If you modify the jsp then your class file will overite by jspcompiler.
Joined: Mar 22, 2005
Originally posted by chinna reddy: But if you compile the code then your modified class will execute irrespective of jsp(If you dont touch jsp).
Are you sure about that? I would have assumed that the container reloads the class if the JSP has changed. Since nobody but the container should mess with the .java and .class files, there's little point in checking modification times on those.
1) You started the server the jsp got translated and then compiled to class file let say Test_jsp.class with output result of "Hello World". 2) Now you taken the Test_jsp.java file and changed the message to "Hello Wrold! I have done it." and compiled and and replace the .class file. 3) Try to run the file. 4) Is jsp changed? no. 5) Class rebuild required? No. 6) Output "Hello Wrold! I have done it."