Professional Documents
Culture Documents
TH
TH
TH
JDK<JRE<JVM<JIT
1)JDK(library):
JVM : Bytecode validation,memory allocation,interpretation,bytecode verification
Source code--->(Compile)JIT--->Bytecode--->JVM-->Output
JVM : java.lang.System
println
1)ClassLoader :
2)Bytecode Verifier : code legality
Compiler--Interpreter
1-
2-
3-
4-
5-
6-
7-
8-
9-
10-
JDK
JRE : JVM
Compilation (JIT)--->JRE-->Execution(JVM)
Software Application :
Request :
Static :
VISIT-->Login
Dynamic :
HTML
addition : 2 + 3
2)Server : JRE
1)responding static request
HTML based
3)Container :
process the data : memory allocation,validation,casting
3.1)ServletContainer : .java to process the servlet files
3.2)JspContainer : .jsp to process JSP files
Servlet :
1).java file
2)web-based java environment : Container
3)combination of business logic and presentation logic
4)extending HttpServlet class
1.doGet() 2.doPost()
Response : HTML(JAVA)--->browser-->output
Application :
s1
s2
s3
s4
s5
s6
s7.....s100
Request-->Server-->static or dynamic
web.xml(deployment descriptor) : mapping file
<servlet>
<servlet-name>Process</servlet-name>
<servlet-class>com.niit.Demo</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Process</servlet-name>
<url-pattern>s99</url-pattern>
</servlet-mapping>
main thread :
worker thread : never destroyed(ThreadPool)
10
s1
Worker Thread
Servlet Lifecycle :
1)init() : Initialization :
ServletConfig (Interface) :
instance server :
binding of thread with the servlet
2)doGet() || doPost()
processing
3)destroy():unbinding of thread from the servlet
username
password
www.facebook.com/Login?username=xyz&password=admin
get
1)appending data on URL
2)data is visible
3)not secure
4)255 character
www.facebook.com/Login
30 minutes :
ns.com-->home-->
post
1)data is hidden in method body
2)secure
3)data is not visible
4)infinite data can travel
Error 404 : Page not found
packages :
p1
10
1
Login--->yes--->profile
Login(error): combination of login+error
URL :
class :
HTML