1)
what is difference bet., jsp & servlets
though jsp r compiled into servlets
some say jsp - is component centric but even then in servlets - we can include java beans
then was the difference
2)
difference bet. simulation & emulation
Version 1: Difference between jsp and servlet is similar to the difference between asp and Internet programming thru VB...one is embedded within the html code and executed directly while another calls a html page according to the request
Contradiction : You can also embed servlet code inside a html page
<servlet>
.........
.....
</servlet>
Version 2: While a servlet is precompiled (thatz why it is in .class format) a jsp gets compiled during execution
These are several versions explaining the differences..but the main thing is a JSP is a servlet by itself which calls the servlet engine and execute the java code in it and displays the content...
There are lots of differences between servlets and Jsp. Just to name a few,
Jsp is similar to Asp. Jsp does not have a .class file wheras servlets have. Jsp are compiled by the JVM during runtime(that means when you access the jsp file). The Jsp will be compiled into and ran as a servlet.
Jsp will tend to be slow when accessing it for the first time. Due to the need for compilation. Subsequent access will be fast.
Jsp is actually html + java. This allow users that are more well-versed in HTML to be able to use Java and the other way round.
Regards,
Leon If you need additional help, you can email to me at zaoliang@hotmail.com I don't guaranty that I will be able to solve your problems but I will try my best
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.