Advanced java

17
ADVANCED JAVA Presented by Sandeep Kumar Prasad Roll no-1150980 Submitted to: Department of CSE RIMT-IET ,Mandi Gobindgarh punjab

Transcript of Advanced java

Page 1: Advanced java

ADVANCED JAVA

Presented bySandeep Kumar Prasad

Roll no-1150980

Submitted to:Department of CSERIMT-IET ,Mandi Gobindgarh punjab

Page 2: Advanced java

JEE(java enterprise edition)

• It is not a installable software.• It is a set of software specifications to develop

web server/application server.• Working with JEE module is nothing but working

with web server or application server.• In Advanced java software training we study

one JSE technology(JDBC) and two JEE technology(SERVLET, JSP).

Page 3: Advanced java

Java Web Servers in IT market

• Tomcat- From Apache.• Resin- From Resin soft.• JWS(java web server)-From Sun MS.• Jetty-From Adobe.

Page 4: Advanced java

Java Application Servers

• Weblogic-From BEA(Oracle).• Websphere-From IBM• Glassfish-From Oracle Corp.• Oracle 10g AS-From Oracle Corp.• Jboss- Initially from Apache but now under Red

Hat.• Jrun-From Adobe.• PAS- It is developed by Indian vendor company

called Pramathi software solution,Hyderabad.

Page 5: Advanced java

JDBC• It is a JSE persistence technology can be used to

write persistence logic performing persistence operation on persistence data of persistence store. Its latest version is

4.x.• Jdbc 4.x important api package are: java.sql javax.sql javax.sql.rowset

Page 6: Advanced java

Sun microsystems Jdbc technology contains rules and guidelines to develop JDBC drivers

JDBC driver for Oracle

JDBC driver for mysql

JDBC driver for postgresql

Page 7: Advanced java

Servlet

• Servlet is a java web technology that allows to develop single instance multiple thread based server side web components in java web application.

• Servlet is JEE technology given by sun microsystems having set of rules and guidelines to develop container.

• Servlet is used to develop enterprise application that means web application and distributed application.

Page 8: Advanced java

Servlet API 3.0 important packages

• java.servlet• javax.servlet.http• javax.servlet.annotation• javax.servlet.jsp

Page 9: Advanced java

Web deployment directoryExampleTestApp(web application) WEB-INF test.html classes Test.jsp TestSrv.java web.xml com.rimt TestSrv.class

Page 10: Advanced java

• To send “hyper text” from browser to server and server to browser we use protocol http.

• The text that allows non-sequential access is called hyper text.

• The latest version of protocol http is 1.1.

Protocol Http

Page 11: Advanced java

The Data carries along with request(taken as hhpp)

h-http request method(GET,POST etc).h-http request header(user- agent, accept

etc).

p-path of resource(/TestApp/test.html).p-request params (sno=101&sname=raja).

Page 12: Advanced java

The Data carries along with response(taken as SCH)

S-http response status code(100-599).C-response content(the message of

pw.println(-)method)H-response hesders(refresh, contextType

etc).

Page 13: Advanced java

Http request with detailed data

• Post• /TestApp/test.html Misc Info

• Accept: text/html, text/xml

Host: www.rimt.ac.inuser-agent: mozilaAccept-language: un-usAccept-encoding: gzip Request HeadersKeep-alive:300Connection: keep-alive<<<<<<<<<<<<<<<blank line

<<<<<<<<<<<<<<<<<<<<<<<<<<user=raja & pwd= hyd request body/payload/form

data

Page 14: Advanced java

JSP

• It is a Sun microsystems supplied java based web technology that allows to develop tag based web resource in java web application having capability to generate dynamic web pages.

• Now days in real time project JSP is used to write view layer presentation logic

Page 15: Advanced java

• Internally for every jsp an equivalent JES(jsp equivalent servlet) class will be generated by jsp page compiler and the container JASPER uses the support of servlet container CATALINA to execute the JES class.

Jsp Life Cycle Convenience • jspInit(): for instantiation event• _jspService(-,-): for request arrival event• jspDestroy(): fro destruction event

JSP Internals

Page 16: Advanced java

Conclusion

In Real time MVC 2 Based enterprise application

• JSP is used as presentation logic(view layer)

• Servlet is used for controller logic(controller layer)

• JDBC is used for persistence logic using the help of java class.(model layer)

Page 17: Advanced java

Thank you!