SlideShare a Scribd company logo
1 of 17
Presented By :- Deepak Sheogan
Mobile number :- 7385553173
Email id:- sheogandeepak@gmail.com
 Jsp stands for java server pages.
 Java Server Pages (JSP) is a technology that
helps software
developers create dynamically generated
web pages based on HTML, XML, or other
document types.
 JSP have access to the entire family of Java
APIs, including the JDBC API to access
enterprise databases.
 Presentation purpose used.
 Because jsp work as view and Servlet work as
controller.
 Simple to write code.
 Whenever we are developing one jsp page
must and should we need to save extension is
.jsp
 After developing jsp page we need to place
inside the application scope where is WEB-
INF
Scripting elements
 Declarations.
Example :- <%! Int i=1; %>
 Scriptlet( any business logic in jsp )
Example :-<% logic code %>
 Expression
Example :- <%= expression %>
Continue…….
Directive in jsp elements
 A JSP directive affects the overall structure of the
servlet class
 <%@ page ... %>
Defines page-dependent attributes, such as scripting
language, error page, and buffering requirements.
 <%@ include ... %>
Includes a file during the translation phase.
<%@ include file="header.jsp" %> <center> <p>Thanks for
visiting my page.</p> </center> <%@ include
file="footer.jsp" %><%@ include file="header.jsp" %>
<center> <p>Thanks for visiting my page.</p>
</center> <%@ include file="footer.jsp" %>
 <%@ taglib ... %>
Declares a tag library, containing custom actions, used
in the page
Continue….
Actions jsp elemets
•Forword action tag
•Include action tag
•Param action tag
•Usebean action tag
1. Setproperty action tag
2. Getpropetry action tag
Example :- https://www.tutorialspoint.com/jsp/jsp_actions.htm
 Request :- java.servlet.http.servletrequest
 Response :-java.servlet.http.servletresponse
 Config :- java.servlet.http.servletconfig
 Exception :- java.io.exception
 Out :- java.io.printwriter
 Page :- java.lang.object
 Session :- java.servlet.httpsession
 When a browser requests for a web page, it
sends lot of information to the web server
which can not be read directly because this
information travel as a part of header of
HTTP request.
 int getServerPort()
 Cookie[] getCookies()
 HttpSession getSession()
 Example:-
https://www.tutorialspoint.com/jsp/jsp_clie
nt_request.htm
 When a Web server responds to a HTTP
request to the browser, the response
typically consists of a status line, some
response headers, a blank line, and the
document.
 void sendRedirect(String location)
 Sends a temporary redirect response to the
client using the specified redirect location
URL.
 void setIntHeader(String name, int value)
 Sets a response header with the given name
and integer value.
 GET method:
1. The GET method sends the encoded user
information appended to the page request.
2. www.test.com/hello?key1=value1&key2=value2
 POST method:
1. A generally more reliable method of passing
information to a backend program is the POST
method
 getParameter():
 getParameterValues(): for checkbox value
 HTTP is a "stateless" protocol which means
each time a client retrieves a Web page, the
client opens a separate connection to the
Web server and the server automatically
does not keep any record of previous client
request.
1. Cookies:
2. Hidden Form Fields:
3. URL Rewriting
4. Session
 Cookies are text files stored on the client
computer and they are kept for various
information tracking purpose. JSP
transparently supports HTTP cookies using
underlying servlet technology.
 Browser stores this information on local
machine for future use.
 Cookie cookie = new Cookie("key","value");
 response.addCookie(cookie);
 public int getMaxAge() [ for set time]
 Example:-
 Hidden Form Fields:-
• A web server can send a hidden HTML form field
along with a unique session ID
• Example :- <input type="hidden"
name="sessionid" value="12345">
 URL Rewriting:
You can append some extra data on the end of
each URL that identifies the session, and the
server can associate that session entifier with
data it has stored about that session.
http://tutorialspoint.com/file.htm;sessionid=12
345
https://www.tutorialspoint.com/jsp/jsp_session
_tracking.htm
 A JSP can be used with an HTML form tag to
allow users to upload files to the server. An
uploaded file could be a text file or binary or
image file or any document.
 <form action="UploadServlet" method="post"
enctype="multipart/form-data">
 Page redirect:-we need to send the client to
this new location or may be because of load
balancing, or for simple randomization.
 Auto refresh:-
response.setIntHeader("Refresh", 5);
Jsp

More Related Content

What's hot

Asp Net Advance Topics
Asp Net Advance TopicsAsp Net Advance Topics
Asp Net Advance TopicsAli Taki
 
DYNAMIC CONTENT TECHNOLOGIES ASP(ACTIVE SERVER PAGES)
DYNAMIC CONTENT TECHNOLOGIES ASP(ACTIVE SERVER PAGES)DYNAMIC CONTENT TECHNOLOGIES ASP(ACTIVE SERVER PAGES)
DYNAMIC CONTENT TECHNOLOGIES ASP(ACTIVE SERVER PAGES)Prof Ansari
 
Session 33 - Session Management using other Techniques
Session 33 - Session Management using other TechniquesSession 33 - Session Management using other Techniques
Session 33 - Session Management using other TechniquesPawanMM
 
Session 34 - JDBC Best Practices, Introduction to Design Patterns
Session 34 - JDBC Best Practices, Introduction to Design PatternsSession 34 - JDBC Best Practices, Introduction to Design Patterns
Session 34 - JDBC Best Practices, Introduction to Design PatternsPawanMM
 
The War on ActionView with Russian Doll Caching
The War on ActionView with Russian Doll CachingThe War on ActionView with Russian Doll Caching
The War on ActionView with Russian Doll CachingPeter Giacomo Lombardo
 
Session 31 - Session Management, Best Practices, Design Patterns in Web Apps
Session 31 - Session Management, Best Practices, Design Patterns in Web AppsSession 31 - Session Management, Best Practices, Design Patterns in Web Apps
Session 31 - Session Management, Best Practices, Design Patterns in Web AppsPawanMM
 
Session 30 - Servlets - Part 6
Session 30 - Servlets - Part 6Session 30 - Servlets - Part 6
Session 30 - Servlets - Part 6PawanMM
 
Web Application Introduction
Web Application  IntroductionWeb Application  Introduction
Web Application Introductionshaojung
 
New microsoft office power point presentation
New microsoft office power point presentationNew microsoft office power point presentation
New microsoft office power point presentationteach4uin
 
Server Side Programming
Server Side Programming Server Side Programming
Server Side Programming Zac Gordon
 
JSP Scope variable And Data Sharing
JSP Scope variable And Data SharingJSP Scope variable And Data Sharing
JSP Scope variable And Data Sharingvikram singh
 
Session 39 - Hibernate - Part 1
Session 39 - Hibernate - Part 1Session 39 - Hibernate - Part 1
Session 39 - Hibernate - Part 1PawanMM
 

What's hot (20)

Asp Net Advance Topics
Asp Net Advance TopicsAsp Net Advance Topics
Asp Net Advance Topics
 
Introduction to asp
Introduction to aspIntroduction to asp
Introduction to asp
 
DYNAMIC CONTENT TECHNOLOGIES ASP(ACTIVE SERVER PAGES)
DYNAMIC CONTENT TECHNOLOGIES ASP(ACTIVE SERVER PAGES)DYNAMIC CONTENT TECHNOLOGIES ASP(ACTIVE SERVER PAGES)
DYNAMIC CONTENT TECHNOLOGIES ASP(ACTIVE SERVER PAGES)
 
Introduction ASP
Introduction ASPIntroduction ASP
Introduction ASP
 
Session 33 - Session Management using other Techniques
Session 33 - Session Management using other TechniquesSession 33 - Session Management using other Techniques
Session 33 - Session Management using other Techniques
 
Session 34 - JDBC Best Practices, Introduction to Design Patterns
Session 34 - JDBC Best Practices, Introduction to Design PatternsSession 34 - JDBC Best Practices, Introduction to Design Patterns
Session 34 - JDBC Best Practices, Introduction to Design Patterns
 
The War on ActionView with Russian Doll Caching
The War on ActionView with Russian Doll CachingThe War on ActionView with Russian Doll Caching
The War on ActionView with Russian Doll Caching
 
Session 31 - Session Management, Best Practices, Design Patterns in Web Apps
Session 31 - Session Management, Best Practices, Design Patterns in Web AppsSession 31 - Session Management, Best Practices, Design Patterns in Web Apps
Session 31 - Session Management, Best Practices, Design Patterns in Web Apps
 
Learn ASP
Learn ASPLearn ASP
Learn ASP
 
Session 30 - Servlets - Part 6
Session 30 - Servlets - Part 6Session 30 - Servlets - Part 6
Session 30 - Servlets - Part 6
 
ASP
ASPASP
ASP
 
Jsp
JspJsp
Jsp
 
Web Application Introduction
Web Application  IntroductionWeb Application  Introduction
Web Application Introduction
 
New microsoft office power point presentation
New microsoft office power point presentationNew microsoft office power point presentation
New microsoft office power point presentation
 
Server Side Programming
Server Side Programming Server Side Programming
Server Side Programming
 
JSP Scope variable And Data Sharing
JSP Scope variable And Data SharingJSP Scope variable And Data Sharing
JSP Scope variable And Data Sharing
 
ASP.NET Lecture 1
ASP.NET Lecture 1ASP.NET Lecture 1
ASP.NET Lecture 1
 
Session 39 - Hibernate - Part 1
Session 39 - Hibernate - Part 1Session 39 - Hibernate - Part 1
Session 39 - Hibernate - Part 1
 
Lecture1
Lecture1Lecture1
Lecture1
 
Jsp(java server pages)
Jsp(java server pages)Jsp(java server pages)
Jsp(java server pages)
 

Viewers also liked (7)

Jsp slides
Jsp slidesJsp slides
Jsp slides
 
08052917365603
0805291736560308052917365603
08052917365603
 
W3 C11
W3 C11W3 C11
W3 C11
 
Jsp
JspJsp
Jsp
 
Jsp Slides
Jsp SlidesJsp Slides
Jsp Slides
 
29 Jsp
29 Jsp29 Jsp
29 Jsp
 
Jsf 2 slideshare
Jsf 2 slideshareJsf 2 slideshare
Jsf 2 slideshare
 

Similar to Jsp

Server side programming bt0083
Server side programming bt0083Server side programming bt0083
Server side programming bt0083Divyam Pateriya
 
JSP - Java Server Page
JSP - Java Server PageJSP - Java Server Page
JSP - Java Server PageVipin Yadav
 
Servlet and jsp interview questions
Servlet and jsp interview questionsServlet and jsp interview questions
Servlet and jsp interview questionsSujata Regoti
 
JAVA SERVER PAGES
JAVA SERVER PAGESJAVA SERVER PAGES
JAVA SERVER PAGESKalpana T
 
PPT on javascript ajax and css and some points related to server
PPT on javascript ajax and css and some points related to serverPPT on javascript ajax and css and some points related to server
PPT on javascript ajax and css and some points related to servershivanichourasia01
 
Servlets and jsp pages best practices
Servlets and jsp pages best practicesServlets and jsp pages best practices
Servlets and jsp pages best practicesejjavies
 
Internet and Web Technology (CLASS-14) [JSP] | NIC/NIELIT Web Technology
Internet and Web Technology (CLASS-14) [JSP] | NIC/NIELIT Web Technology Internet and Web Technology (CLASS-14) [JSP] | NIC/NIELIT Web Technology
Internet and Web Technology (CLASS-14) [JSP] | NIC/NIELIT Web Technology Ayes Chinmay
 
Atul & shubha goswami jsp
Atul & shubha goswami jspAtul & shubha goswami jsp
Atul & shubha goswami jspAtul Giri
 
JSP Components and Directives.pdf
JSP Components and Directives.pdfJSP Components and Directives.pdf
JSP Components and Directives.pdfArumugam90
 
JSP- JAVA SERVER PAGES
JSP- JAVA SERVER PAGESJSP- JAVA SERVER PAGES
JSP- JAVA SERVER PAGESYoga Raja
 
Web container and Apache Tomcat
Web container and Apache TomcatWeb container and Apache Tomcat
Web container and Apache TomcatAuwal Amshi
 

Similar to Jsp (20)

Jsp
JspJsp
Jsp
 
4. jsp
4. jsp4. jsp
4. jsp
 
Server side programming bt0083
Server side programming bt0083Server side programming bt0083
Server side programming bt0083
 
WEB TECHNOLOGIES JSP
WEB TECHNOLOGIES  JSPWEB TECHNOLOGIES  JSP
WEB TECHNOLOGIES JSP
 
JSP - Java Server Page
JSP - Java Server PageJSP - Java Server Page
JSP - Java Server Page
 
Servlet and jsp interview questions
Servlet and jsp interview questionsServlet and jsp interview questions
Servlet and jsp interview questions
 
JAVA SERVER PAGES
JAVA SERVER PAGESJAVA SERVER PAGES
JAVA SERVER PAGES
 
PPT on javascript ajax and css and some points related to server
PPT on javascript ajax and css and some points related to serverPPT on javascript ajax and css and some points related to server
PPT on javascript ajax and css and some points related to server
 
Java Server Pages
Java Server PagesJava Server Pages
Java Server Pages
 
20jsp
20jsp20jsp
20jsp
 
Unit 4 web technology uptu
Unit 4 web technology uptuUnit 4 web technology uptu
Unit 4 web technology uptu
 
Unit 4 1 web technology uptu
Unit 4 1 web technology uptuUnit 4 1 web technology uptu
Unit 4 1 web technology uptu
 
Servlets and jsp pages best practices
Servlets and jsp pages best practicesServlets and jsp pages best practices
Servlets and jsp pages best practices
 
Jsp
JspJsp
Jsp
 
Jsp sasidhar
Jsp sasidharJsp sasidhar
Jsp sasidhar
 
Internet and Web Technology (CLASS-14) [JSP] | NIC/NIELIT Web Technology
Internet and Web Technology (CLASS-14) [JSP] | NIC/NIELIT Web Technology Internet and Web Technology (CLASS-14) [JSP] | NIC/NIELIT Web Technology
Internet and Web Technology (CLASS-14) [JSP] | NIC/NIELIT Web Technology
 
Atul & shubha goswami jsp
Atul & shubha goswami jspAtul & shubha goswami jsp
Atul & shubha goswami jsp
 
JSP Components and Directives.pdf
JSP Components and Directives.pdfJSP Components and Directives.pdf
JSP Components and Directives.pdf
 
JSP- JAVA SERVER PAGES
JSP- JAVA SERVER PAGESJSP- JAVA SERVER PAGES
JSP- JAVA SERVER PAGES
 
Web container and Apache Tomcat
Web container and Apache TomcatWeb container and Apache Tomcat
Web container and Apache Tomcat
 

Recently uploaded

Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
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
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
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
 
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
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 

Recently uploaded (20)

Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
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
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
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
 
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
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 

Jsp

  • 1. Presented By :- Deepak Sheogan Mobile number :- 7385553173 Email id:- sheogandeepak@gmail.com
  • 2.  Jsp stands for java server pages.  Java Server Pages (JSP) is a technology that helps software developers create dynamically generated web pages based on HTML, XML, or other document types.  JSP have access to the entire family of Java APIs, including the JDBC API to access enterprise databases.  Presentation purpose used.
  • 3.  Because jsp work as view and Servlet work as controller.  Simple to write code.  Whenever we are developing one jsp page must and should we need to save extension is .jsp  After developing jsp page we need to place inside the application scope where is WEB- INF
  • 4.
  • 5.
  • 6. Scripting elements  Declarations. Example :- <%! Int i=1; %>  Scriptlet( any business logic in jsp ) Example :-<% logic code %>  Expression Example :- <%= expression %> Continue…….
  • 7. Directive in jsp elements  A JSP directive affects the overall structure of the servlet class  <%@ page ... %> Defines page-dependent attributes, such as scripting language, error page, and buffering requirements.  <%@ include ... %> Includes a file during the translation phase. <%@ include file="header.jsp" %> <center> <p>Thanks for visiting my page.</p> </center> <%@ include file="footer.jsp" %><%@ include file="header.jsp" %> <center> <p>Thanks for visiting my page.</p> </center> <%@ include file="footer.jsp" %>  <%@ taglib ... %> Declares a tag library, containing custom actions, used in the page Continue….
  • 8. Actions jsp elemets •Forword action tag •Include action tag •Param action tag •Usebean action tag 1. Setproperty action tag 2. Getpropetry action tag Example :- https://www.tutorialspoint.com/jsp/jsp_actions.htm
  • 9.  Request :- java.servlet.http.servletrequest  Response :-java.servlet.http.servletresponse  Config :- java.servlet.http.servletconfig  Exception :- java.io.exception  Out :- java.io.printwriter  Page :- java.lang.object  Session :- java.servlet.httpsession
  • 10.  When a browser requests for a web page, it sends lot of information to the web server which can not be read directly because this information travel as a part of header of HTTP request.  int getServerPort()  Cookie[] getCookies()  HttpSession getSession()  Example:- https://www.tutorialspoint.com/jsp/jsp_clie nt_request.htm
  • 11.  When a Web server responds to a HTTP request to the browser, the response typically consists of a status line, some response headers, a blank line, and the document.  void sendRedirect(String location)  Sends a temporary redirect response to the client using the specified redirect location URL.  void setIntHeader(String name, int value)  Sets a response header with the given name and integer value.
  • 12.  GET method: 1. The GET method sends the encoded user information appended to the page request. 2. www.test.com/hello?key1=value1&key2=value2  POST method: 1. A generally more reliable method of passing information to a backend program is the POST method  getParameter():  getParameterValues(): for checkbox value
  • 13.  HTTP is a "stateless" protocol which means each time a client retrieves a Web page, the client opens a separate connection to the Web server and the server automatically does not keep any record of previous client request. 1. Cookies: 2. Hidden Form Fields: 3. URL Rewriting 4. Session
  • 14.  Cookies are text files stored on the client computer and they are kept for various information tracking purpose. JSP transparently supports HTTP cookies using underlying servlet technology.  Browser stores this information on local machine for future use.  Cookie cookie = new Cookie("key","value");  response.addCookie(cookie);  public int getMaxAge() [ for set time]  Example:-
  • 15.  Hidden Form Fields:- • A web server can send a hidden HTML form field along with a unique session ID • Example :- <input type="hidden" name="sessionid" value="12345">  URL Rewriting: You can append some extra data on the end of each URL that identifies the session, and the server can associate that session entifier with data it has stored about that session. http://tutorialspoint.com/file.htm;sessionid=12 345 https://www.tutorialspoint.com/jsp/jsp_session _tracking.htm
  • 16.  A JSP can be used with an HTML form tag to allow users to upload files to the server. An uploaded file could be a text file or binary or image file or any document.  <form action="UploadServlet" method="post" enctype="multipart/form-data">  Page redirect:-we need to send the client to this new location or may be because of load balancing, or for simple randomization.  Auto refresh:- response.setIntHeader("Refresh", 5);