SlideShare uma empresa Scribd logo
1 de 40
An  Introduction to  Java Web Technology (Java Servlet) Presented At: JECRC, Faculty of E&T, Jodhpur National University, Jodhpur, Rajasthan India -342001
HTTP   ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
HTTP METHODS Uploads a representation of the specified resource. PUT Converts the request connection to a transparent TCP/IP tunnel, usually to facilitate SSL-encrypted communication (HTTPS) through an unencrypted HTTP proxy. [3] CONNECT Returns the HTTP methods that the server supports for specified URL. This can be used to check the functionality of a web server by requesting '*' instead of a specific resource. OPTIONS Echoes back the received request, so that a client can see what intermediate servers are adding or changing in the request. TRACE Deletes the specified resource. DELETE Submits data to be processed (e.g., from an HTML form) to the identified resource. The data is included in the body of the request. POST means retrieve whatever data is identified by the URI GET Asks for the response identical to the one that would correspond to a GET request, but without the response body. This is useful for retrieving meta-information written in response headers, without having to transport the entire content. HEAD DESCRIPTION METHOD
HTTP METHODS HTTP servers are required to implement at least the GET and HEAD methods [4] and, whenever possible, also the OPTIONS method  Safe methods Some methods (for example, HEAD, GET, OPTIONS and TRACE) are defined as  safe , which means they are intended only for information retrieval and should not change the state of the server. Idempotent methods Some http methods are defined to be idempotent, meaning that multiple identical requests should have the same effect as a single request. Methods PUT, DELETE, GET, HEAD, OPTIONS and TRACE, being prescribed as safe, should also be idempotent. HTTP is a stateless protocol. By contrast, the POST method is not necessarily idempotent, and therefore sending an identical POST request multiple times may further affect state or cause further side effects.(like updating inserting records in database multiple times).
DIFFERENCE BETWEEN GET AND POST ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
WHAT IS WEB CONTAINER? ,[object Object],[object Object]
WHAT IS JAVA SERVLET? ,[object Object],[object Object]
STRUCTURE OF A WEB APPLICATION ,[object Object],[object Object],[object Object],[object Object],[object Object]
WEB-INF DIRECTORY ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
SERVLET LIFE CYCLE ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
SERVLET LIFE CYCLE - STEPS ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
SERVLET LIFE CYCLE - STEPS ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
SETTING UP SERVLET DEVELOPMENT ENVIRONMENT ,[object Object],[object Object],[object Object],[object Object],[object Object]
SETTING UP SERVLET DEVELOPMENT ENVIRONMENT ,[object Object],[object Object]
SETTING UP SERVLET DEVELOPMENT ENVIRONMENT
SETTING UP SERVLET DEVELOPMENT ENVIRONMENT In the variable name filed, enter JAVA_HOME. Specify the path to root directory of JAVA installation in variable value field and click OK button. Now JAVA_HOME will appear under user variables.  Next you need to add bin directory under the root directory of JAVA installation in PATH environment variable.Select the PATH variable from System variables and click on Edit button.  Add: ;%JAVA_HOME%in; at the end of variable value field and click OK button.
INSTALLING TOMCAT Tomcat is an opensource web container. it is also web container reference implementation.  Download the latest version of tomcat from this  URL  . Download the jakarta-tomcat-5.0.28.tar.gz and extract it to the directory of your choice.  Note: This directory is referred as TOMCAT_HOME in other tutorials.   That’s all, tomcat is installed. Starting and shutting down Tomcat To start the tomcat server, open the command prompt, change the directory to TOMCAT HOME/bin and run the startup.bat file. It will start the server.  >startup To shut down the tomcat server, run the shutdown.bat file. It will stop the server.  >shutdown  Verifying Tomcat installation To verify that tomcat is installed properly, start the server as explained above, open the web browser and access the following URL.  http://localhost:8080/index.jsp  It should show the tomcat welcome page, if tomcat is installed properly and server is running.
INSTALLING TOMCAT Setting up the CLASSPATH Now you need to create a new environment variable CLASSPATH if it is not already set. We need to add the servlet-api.jar into the CLASSPATH to compile the Servlets. Follow the same steps as you did to create the JAVA_HOME variable. Create a new variable CLASSPATH under system variables. Add TOMCAT_HOME/lib/servlet-api.jar in variable value field.  Note: here TOMCAT_HOME refers to the tomcat installation directory.
SERVLET API CLASSES AND INTERFACES ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
SERVLET API CLASSES AND INTERFACES ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
SERVLET API CLASSES AND INTERFACES ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
SERVLET API CLASSES AND INTERFACES ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
SERVLET API CLASSES AND INTERFACES ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
SERVLET API CLASSES AND INTERFACES ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Understanding the GenericServlet class ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Understanding the GenericServlet class ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Understanding the GenericServlet class ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
GenericServlet Example ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
GenericServlet Example ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
A VERY SIMPLE SERVLET EXAMPLE ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
A VERY SIMPLE SERVLET EXAMPLE ,[object Object],[object Object],[object Object],[object Object]
A VERY SIMPLE SERVLET EXAMPLE ,[object Object],[object Object],[object Object]
A VERY SIMPLE SERVLET EXAMPLE ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
A VERY SIMPLE SERVLET EXAMPLE ,[object Object],[object Object],[object Object],[object Object]
A VERY SIMPLE SERVLET EXAMPLE ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
A VERY SIMPLE SERVLET EXAMPLE ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
A VERY SIMPLE SERVLET EXAMPLE
A VERY SIMPLE SERVLET EXAMPLE
A VERY SIMPLE SERVLET EXAMPLE ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Thank You!! Please don’t forget to write your review comments on   http://slideshare.net/vikramsingh.v85

Mais conteúdo relacionado

Mais procurados

Mais procurados (20)

Java Servlets
Java ServletsJava Servlets
Java Servlets
 
Java servlets
Java servletsJava servlets
Java servlets
 
Javascript essentials
Javascript essentialsJavascript essentials
Javascript essentials
 
Servlets
ServletsServlets
Servlets
 
HTTP request and response
HTTP request and responseHTTP request and response
HTTP request and response
 
Servlets
ServletsServlets
Servlets
 
Hibernate Presentation
Hibernate  PresentationHibernate  Presentation
Hibernate Presentation
 
Web Development Course: PHP lecture 1
Web Development Course: PHP lecture 1Web Development Course: PHP lecture 1
Web Development Course: PHP lecture 1
 
Php
PhpPhp
Php
 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.js
 
Chapter 3 servlet & jsp
Chapter 3 servlet & jspChapter 3 servlet & jsp
Chapter 3 servlet & jsp
 
Intro to HTML5 audio tag
Intro to HTML5 audio tagIntro to HTML5 audio tag
Intro to HTML5 audio tag
 
Java Servlets
Java ServletsJava Servlets
Java Servlets
 
PHP Cookies and Sessions
PHP Cookies and SessionsPHP Cookies and Sessions
PHP Cookies and Sessions
 
Dom(document object model)
Dom(document object model)Dom(document object model)
Dom(document object model)
 
Javascript arrays
Javascript arraysJavascript arrays
Javascript arrays
 
Php forms
Php formsPhp forms
Php forms
 
API for Beginners
API for BeginnersAPI for Beginners
API for Beginners
 
HTTP Request Header and HTTP Status Code
HTTP Request Header and HTTP Status CodeHTTP Request Header and HTTP Status Code
HTTP Request Header and HTTP Status Code
 
Intro to React
Intro to ReactIntro to React
Intro to React
 

Destaque

Developing Java Web Applications
Developing Java Web ApplicationsDeveloping Java Web Applications
Developing Java Web Applicationshchen1
 
Eo gaddis java_chapter_12_5e
Eo gaddis java_chapter_12_5eEo gaddis java_chapter_12_5e
Eo gaddis java_chapter_12_5eGina Bullock
 
Linux directory structure by jitu mistry
Linux directory structure by jitu mistryLinux directory structure by jitu mistry
Linux directory structure by jitu mistryJITU MISTRY
 
Web Applications and Deployment
Web Applications and DeploymentWeb Applications and Deployment
Web Applications and DeploymentBG Java EE Course
 
Linux Directory Structure
Linux Directory StructureLinux Directory Structure
Linux Directory StructureKevin OBrien
 
Seminar presentation on embedded web technology
Seminar presentation on embedded web technologySeminar presentation on embedded web technology
Seminar presentation on embedded web technologyRanol R C
 
EMBEDDED WEB TECHNOLOGY
EMBEDDED WEB TECHNOLOGYEMBEDDED WEB TECHNOLOGY
EMBEDDED WEB TECHNOLOGYVinay Kumar
 
Java servlet life cycle - methods ppt
Java servlet life cycle - methods pptJava servlet life cycle - methods ppt
Java servlet life cycle - methods pptkamal kotecha
 
Web Design Project Report
Web Design Project ReportWeb Design Project Report
Web Design Project ReportMJ Ferdous
 
Web Service Presentation
Web Service PresentationWeb Service Presentation
Web Service Presentationguest0df6b0
 

Destaque (10)

Developing Java Web Applications
Developing Java Web ApplicationsDeveloping Java Web Applications
Developing Java Web Applications
 
Eo gaddis java_chapter_12_5e
Eo gaddis java_chapter_12_5eEo gaddis java_chapter_12_5e
Eo gaddis java_chapter_12_5e
 
Linux directory structure by jitu mistry
Linux directory structure by jitu mistryLinux directory structure by jitu mistry
Linux directory structure by jitu mistry
 
Web Applications and Deployment
Web Applications and DeploymentWeb Applications and Deployment
Web Applications and Deployment
 
Linux Directory Structure
Linux Directory StructureLinux Directory Structure
Linux Directory Structure
 
Seminar presentation on embedded web technology
Seminar presentation on embedded web technologySeminar presentation on embedded web technology
Seminar presentation on embedded web technology
 
EMBEDDED WEB TECHNOLOGY
EMBEDDED WEB TECHNOLOGYEMBEDDED WEB TECHNOLOGY
EMBEDDED WEB TECHNOLOGY
 
Java servlet life cycle - methods ppt
Java servlet life cycle - methods pptJava servlet life cycle - methods ppt
Java servlet life cycle - methods ppt
 
Web Design Project Report
Web Design Project ReportWeb Design Project Report
Web Design Project Report
 
Web Service Presentation
Web Service PresentationWeb Service Presentation
Web Service Presentation
 

Semelhante a Java Servlet Intro

Anintroductiontojavawebtechnology 090324184240-phpapp01
Anintroductiontojavawebtechnology 090324184240-phpapp01Anintroductiontojavawebtechnology 090324184240-phpapp01
Anintroductiontojavawebtechnology 090324184240-phpapp01raviIITRoorkee
 
Abhishek srivastava ppt_web_tech
Abhishek srivastava ppt_web_techAbhishek srivastava ppt_web_tech
Abhishek srivastava ppt_web_techabhishek srivastav
 
Http Server Programming in JAVA - Handling http requests and responses
Http Server Programming in JAVA - Handling http requests and responsesHttp Server Programming in JAVA - Handling http requests and responses
Http Server Programming in JAVA - Handling http requests and responsesbharathiv53
 
Web container and Apache Tomcat
Web container and Apache TomcatWeb container and Apache Tomcat
Web container and Apache TomcatAuwal Amshi
 
Java Servlet Programming under Ubuntu Linux by Tushar B Kute
Java Servlet Programming under Ubuntu Linux by Tushar B KuteJava Servlet Programming under Ubuntu Linux by Tushar B Kute
Java Servlet Programming under Ubuntu Linux by Tushar B KuteTushar B Kute
 
Servlet in java , java servlet , servlet servlet and CGI, API
Servlet in java , java servlet , servlet servlet and CGI, APIServlet in java , java servlet , servlet servlet and CGI, API
Servlet in java , java servlet , servlet servlet and CGI, APIPRIYADARSINISK
 
Ajp notes-chapter-06
Ajp notes-chapter-06Ajp notes-chapter-06
Ajp notes-chapter-06Ankit Dubey
 
UNIT-3 Servlet
UNIT-3 ServletUNIT-3 Servlet
UNIT-3 Servletssbd6985
 
java Servlet technology
java Servlet technologyjava Servlet technology
java Servlet technologyTanmoy Barman
 
Servlet
ServletServlet
ServletIshucs
 

Semelhante a Java Servlet Intro (20)

Anintroductiontojavawebtechnology 090324184240-phpapp01
Anintroductiontojavawebtechnology 090324184240-phpapp01Anintroductiontojavawebtechnology 090324184240-phpapp01
Anintroductiontojavawebtechnology 090324184240-phpapp01
 
Servlet basics
Servlet basicsServlet basics
Servlet basics
 
Abhishek srivastava ppt_web_tech
Abhishek srivastava ppt_web_techAbhishek srivastava ppt_web_tech
Abhishek srivastava ppt_web_tech
 
Servlet by Rj
Servlet by RjServlet by Rj
Servlet by Rj
 
Marata
MarataMarata
Marata
 
Http Server Programming in JAVA - Handling http requests and responses
Http Server Programming in JAVA - Handling http requests and responsesHttp Server Programming in JAVA - Handling http requests and responses
Http Server Programming in JAVA - Handling http requests and responses
 
Web container and Apache Tomcat
Web container and Apache TomcatWeb container and Apache Tomcat
Web container and Apache Tomcat
 
Java servlets
Java servletsJava servlets
Java servlets
 
Servlet & jsp
Servlet  &  jspServlet  &  jsp
Servlet & jsp
 
Servlet
Servlet Servlet
Servlet
 
Unit5 servlets
Unit5 servletsUnit5 servlets
Unit5 servlets
 
Java Servlet Programming under Ubuntu Linux by Tushar B Kute
Java Servlet Programming under Ubuntu Linux by Tushar B KuteJava Servlet Programming under Ubuntu Linux by Tushar B Kute
Java Servlet Programming under Ubuntu Linux by Tushar B Kute
 
Servlet in java , java servlet , servlet servlet and CGI, API
Servlet in java , java servlet , servlet servlet and CGI, APIServlet in java , java servlet , servlet servlet and CGI, API
Servlet in java , java servlet , servlet servlet and CGI, API
 
Ajp notes-chapter-06
Ajp notes-chapter-06Ajp notes-chapter-06
Ajp notes-chapter-06
 
UNIT-3 Servlet
UNIT-3 ServletUNIT-3 Servlet
UNIT-3 Servlet
 
java Servlet technology
java Servlet technologyjava Servlet technology
java Servlet technology
 
Ftp servlet
Ftp servletFtp servlet
Ftp servlet
 
Servlet classnotes
Servlet classnotesServlet classnotes
Servlet classnotes
 
JAVA Servlets
JAVA ServletsJAVA Servlets
JAVA Servlets
 
Servlet
ServletServlet
Servlet
 

Mais de vikram singh

Mais de vikram singh (20)

Agile
AgileAgile
Agile
 
Enterprise java beans(ejb) Update 2
Enterprise java beans(ejb) Update 2Enterprise java beans(ejb) Update 2
Enterprise java beans(ejb) Update 2
 
Web tech importants
Web tech importantsWeb tech importants
Web tech importants
 
Enterprise Java Beans( E)
Enterprise  Java  Beans( E)Enterprise  Java  Beans( E)
Enterprise Java Beans( E)
 
Enterprise java beans(ejb) update 2
Enterprise java beans(ejb) update 2Enterprise java beans(ejb) update 2
Enterprise java beans(ejb) update 2
 
Enterprise java beans(ejb)
Enterprise java beans(ejb)Enterprise java beans(ejb)
Enterprise java beans(ejb)
 
2 4 Tree
2 4 Tree2 4 Tree
2 4 Tree
 
23 Tree Best Part
23 Tree   Best Part23 Tree   Best Part
23 Tree Best Part
 
JSP Scope variable And Data Sharing
JSP Scope variable And Data SharingJSP Scope variable And Data Sharing
JSP Scope variable And Data Sharing
 
Bean Intro
Bean IntroBean Intro
Bean Intro
 
jdbc
jdbcjdbc
jdbc
 
Sax Dom Tutorial
Sax Dom TutorialSax Dom Tutorial
Sax Dom Tutorial
 
Xml
XmlXml
Xml
 
Dtd
DtdDtd
Dtd
 
Xml Schema
Xml SchemaXml Schema
Xml Schema
 
JSP
JSPJSP
JSP
 
Request dispatching in servlet
Request dispatching in servletRequest dispatching in servlet
Request dispatching in servlet
 
Servlet Part 2
Servlet Part 2Servlet Part 2
Servlet Part 2
 
Tutorial Solution
Tutorial SolutionTutorial Solution
Tutorial Solution
 
Java Script Language Tutorial
Java Script Language TutorialJava Script Language Tutorial
Java Script Language Tutorial
 

Último

Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 

Último (20)

Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 

Java Servlet Intro

  • 1. An Introduction to Java Web Technology (Java Servlet) Presented At: JECRC, Faculty of E&T, Jodhpur National University, Jodhpur, Rajasthan India -342001
  • 2.
  • 3. HTTP METHODS Uploads a representation of the specified resource. PUT Converts the request connection to a transparent TCP/IP tunnel, usually to facilitate SSL-encrypted communication (HTTPS) through an unencrypted HTTP proxy. [3] CONNECT Returns the HTTP methods that the server supports for specified URL. This can be used to check the functionality of a web server by requesting '*' instead of a specific resource. OPTIONS Echoes back the received request, so that a client can see what intermediate servers are adding or changing in the request. TRACE Deletes the specified resource. DELETE Submits data to be processed (e.g., from an HTML form) to the identified resource. The data is included in the body of the request. POST means retrieve whatever data is identified by the URI GET Asks for the response identical to the one that would correspond to a GET request, but without the response body. This is useful for retrieving meta-information written in response headers, without having to transport the entire content. HEAD DESCRIPTION METHOD
  • 4. HTTP METHODS HTTP servers are required to implement at least the GET and HEAD methods [4] and, whenever possible, also the OPTIONS method Safe methods Some methods (for example, HEAD, GET, OPTIONS and TRACE) are defined as safe , which means they are intended only for information retrieval and should not change the state of the server. Idempotent methods Some http methods are defined to be idempotent, meaning that multiple identical requests should have the same effect as a single request. Methods PUT, DELETE, GET, HEAD, OPTIONS and TRACE, being prescribed as safe, should also be idempotent. HTTP is a stateless protocol. By contrast, the POST method is not necessarily idempotent, and therefore sending an identical POST request multiple times may further affect state or cause further side effects.(like updating inserting records in database multiple times).
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15. SETTING UP SERVLET DEVELOPMENT ENVIRONMENT
  • 16. SETTING UP SERVLET DEVELOPMENT ENVIRONMENT In the variable name filed, enter JAVA_HOME. Specify the path to root directory of JAVA installation in variable value field and click OK button. Now JAVA_HOME will appear under user variables. Next you need to add bin directory under the root directory of JAVA installation in PATH environment variable.Select the PATH variable from System variables and click on Edit button. Add: ;%JAVA_HOME%in; at the end of variable value field and click OK button.
  • 17. INSTALLING TOMCAT Tomcat is an opensource web container. it is also web container reference implementation. Download the latest version of tomcat from this URL . Download the jakarta-tomcat-5.0.28.tar.gz and extract it to the directory of your choice. Note: This directory is referred as TOMCAT_HOME in other tutorials. That’s all, tomcat is installed. Starting and shutting down Tomcat To start the tomcat server, open the command prompt, change the directory to TOMCAT HOME/bin and run the startup.bat file. It will start the server. >startup To shut down the tomcat server, run the shutdown.bat file. It will stop the server. >shutdown Verifying Tomcat installation To verify that tomcat is installed properly, start the server as explained above, open the web browser and access the following URL. http://localhost:8080/index.jsp It should show the tomcat welcome page, if tomcat is installed properly and server is running.
  • 18. INSTALLING TOMCAT Setting up the CLASSPATH Now you need to create a new environment variable CLASSPATH if it is not already set. We need to add the servlet-api.jar into the CLASSPATH to compile the Servlets. Follow the same steps as you did to create the JAVA_HOME variable. Create a new variable CLASSPATH under system variables. Add TOMCAT_HOME/lib/servlet-api.jar in variable value field. Note: here TOMCAT_HOME refers to the tomcat installation directory.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.
  • 34.
  • 35.
  • 36.
  • 37. A VERY SIMPLE SERVLET EXAMPLE
  • 38. A VERY SIMPLE SERVLET EXAMPLE
  • 39.
  • 40. Thank You!! Please don’t forget to write your review comments on http://slideshare.net/vikramsingh.v85