E-MARKETING E-ZONE PPT Using ADVANCED JAVA

24
application Based on J2EE

Transcript of E-MARKETING E-ZONE PPT Using ADVANCED JAVA

Page 1: E-MARKETING E-ZONE PPT Using ADVANCED JAVA

application

Based on J2EE

Page 2: E-MARKETING E-ZONE PPT Using ADVANCED JAVA

Why Use

E-Commerce

…….?

Page 3: E-MARKETING E-ZONE PPT Using ADVANCED JAVA

LOW ENTRY COST REDUCES TRANSACTION COSTSACCESS TO THE GLOBAL MARKET SECURE MARKET SHARE

Page 4: E-MARKETING E-ZONE PPT Using ADVANCED JAVA

SERVLET Used to create web application. Resides at server side and generates

dynamic web page. Extends capabilities of the servers and

respond to the incoming request.

Page 5: E-MARKETING E-ZONE PPT Using ADVANCED JAVA

ADVANTAGES OF SERVLET Overcome the disadvantages of CGI. Better Performance. Portability. Robust. Secure.

Page 6: E-MARKETING E-ZONE PPT Using ADVANCED JAVA

REQUESTDISPATCHER IN SERVLET The RequestDispatcher interface provides the

facility of dispatching the request to another resource it may be html, servlet or jsp.

getRequestDispatcher() method of ServletRequest returns the object of RequestDispatcher.

Example of using getRequestDispatcher method RequestDispatcher rd=request.getRequestDispatcher("servlet2");  //servlet2 is the url-pattern of the second servlet rd.forward(request, response);//method may be include or forward

Page 7: E-MARKETING E-ZONE PPT Using ADVANCED JAVA

JAVA SERVER PAGES(JSP)

Used to create web application just like Servlet technology.

A JSP page consists of HTML tags and JSP tags.

Page 8: E-MARKETING E-ZONE PPT Using ADVANCED JAVA

ADVANTAGE OF JSP OVER SERVLET

Extension to Servlet.

Easy to maintain.

Fast Development: No need to recompile and redeploy.

Less code than Servlet.

Needs no compilation.

Page 9: E-MARKETING E-ZONE PPT Using ADVANCED JAVA

CREATING A SIMPLE JSP PAGE

index.jsp

<html>  <body>  <% out.print(“Hello AOT”); %>  </body>  </html>  

It will print Hello AOT on the browser.

Page 10: E-MARKETING E-ZONE PPT Using ADVANCED JAVA

GET AND POST

Features of GET requests are It can be bookmarked. It have length restrictions. It can be cached. It remains in the browser history.

Features of POST requests are This requests cannot be bookmarked. This requests have no restrictions on length of data. This requests are never cached. This requests do not remains in the browser history.

Page 11: E-MARKETING E-ZONE PPT Using ADVANCED JAVA

The doGet() Method :A GET request results from a normal request for a URL or from an HTML form that has no METHOD specified and it should be handled by doGet() method. public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // Servlet code } The doPost() Method :A POST request results from an HTML form that specifically lists POST as the METHOD and it should be handled by doPost() method.public void do(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // Servlet code }

Page 12: E-MARKETING E-ZONE PPT Using ADVANCED JAVA

JAVA DATABASE CONNECTIVITY

Why use JDBC?

Before JDBC, ODBC API was the database API to connect and execute query with the database. But, ODBC API uses ODBC driver which is written in C language (i.e. platform dependent and unsecured). That is why Java has defined its own API (JDBC API) that uses JDBC drivers (written in Java language).

Page 13: E-MARKETING E-ZONE PPT Using ADVANCED JAVA

Java JDBC is a java API to connect and execute query with the database. JDBC API uses jdbc drivers to connect with the database.

Page 14: E-MARKETING E-ZONE PPT Using ADVANCED JAVA

5 Steps to connect to the database in java

Register the driver class.

Creating conection.

Creating statement.

Executing queries.

Closing connection.

Page 15: E-MARKETING E-ZONE PPT Using ADVANCED JAVA

HOME PAGE

Page 16: E-MARKETING E-ZONE PPT Using ADVANCED JAVA

ADMIN LOGIN PAGE

Page 17: E-MARKETING E-ZONE PPT Using ADVANCED JAVA

DATA INPUT PAGE

Page 18: E-MARKETING E-ZONE PPT Using ADVANCED JAVA

INVALID ACCESS

Page 19: E-MARKETING E-ZONE PPT Using ADVANCED JAVA

CATALOG PAGE

Page 20: E-MARKETING E-ZONE PPT Using ADVANCED JAVA

PROS

Page 21: E-MARKETING E-ZONE PPT Using ADVANCED JAVA

No checkout queues

Reduce prices

You can shop anywhere in the world

Easy access 24 hours a day

Wide selection to cater for all consumers

Page 22: E-MARKETING E-ZONE PPT Using ADVANCED JAVA

CONS

Page 23: E-MARKETING E-ZONE PPT Using ADVANCED JAVA

Unable to examine products personally

Not everyone is connected to the Internet

There is the possibility of credit card number theft

On average only 1/9th of stock is available on the net

Page 24: E-MARKETING E-ZONE PPT Using ADVANCED JAVA

108- Sudhanshu Kumar Sah117- Swarup Kumar Ghosh119- Tarun Prasad