SlideShare a Scribd company logo
1 of 15
JAVA SERVER PAGES


Dynamic
 Web
Content
 With
  Ease




                     1
Let’s Learn JSP


Now What The Heck Is


 JSP
                       2
Introduction

• JavaServer Pages (JSP) is
  a Java technology that helps software
  developers    serve dynamically generated
  web pages based on HTML,XML, or other
  document types.

• Released in 1999 as Sun's answer
  to ASP and PHP .

                                         3
Comparison
Function/Feature   JSP                       PHP
Programming        Completely Object         Scripting language
Approach           Oriented but way too      with Object Oriented
                   descriptive.              Support.
String and data    Rich library              Rich Functionality .
manipulation                                 Inbuilt support to
                                             include third party
                                             libraries from other
                                             languages.
Learning curve     It helps if you have an   If you know C/C++,
                   decent understanding      then you are halfway
                   of JAVA and its           through to learn PHP.
                   architecture.
Web Oriented       Inbuilt Functionality     Inbuilt Functionality
Features           but way too much of       but less lines of code
                   code.                     and less time to build
                                             an application.          4
Advantages of JSP

• Versus Active Server Pages (ASP)
 JSP is portable to other operating systems
and Web servers; you aren’t locked into
Windows.

• Versus Servlets
 It is more convenient to write (and to
modify!) regular HTML than to have a zillion
println statements that generate the HTML.
                                          5
Let’s Dive into the World of JSP

   • What are JAVA servlets ?
   Servlets are java programs that run on a web
   server and are user to make webpages on a
   fly (dynamic).
   • Advantages of Servlets :
   Powerful ,portable and Cheaper than many
   other alternatives .



                                              6
•So aren’t JSP
 and Servlets
 the Same ..
•
                 7
The Difference

• Servlets, make you generate the entire
  page via your program, even though most
  of it is always the same. JSP lets you
  create the two parts separately.

• So everything a servlet can do JSP can
  and further it is more easier to write .

• Developers & Designers at there best .
                                             8
Let’s a build a basic app

 • Setup and Installation
 Step 1. Download and install a Java Developer
 Kit.
  Step 2. Download and install the Apache-
 Tomcat web server.
 Step 3. Open Your browser and type
 http://localhost:8080 .
 Step 4: Save your app inside the root folder in
 apache .
 Step 5: Type
 http://localhost:8080/<appname.jsp> to run you  9
Time For Some Coding

 <%@page contentType="text/html" import="java.util.*" %>   1st JSP tag
<html>
<body>
<p>&nbsp;</p>
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" width="460"
bgcolor="#EEFFCA">
<tr>
<td width="100%"><font size="6" color="#008000">&nbsp;Date
Example</font></td>
</tr>
<tr>
<td width="100%"><b>&nbsp;Current Date and time is:&nbsp; <font
color="#FF0000">
<%= new java.util.Date() %>               2nd JSP tag
</font></b></td>
</tr>
</table>
</center>
</div>
</body>
</html>
                                                                         10
Another Example


Create a simple HTML page having the following
output :


Select Your Sport :
 Cricket
Basketball
 Soccer
Rugby
Hockey
                                                 11
JSP Coding Part

•   <html>
    <body>
    <%! String[] sports; %>
    <center>You have selected:
    <%
      sports = request.getParameterValues("sports");
      if (sports != null)
      {
         for (int i = 0; i < sports.length; i++)
         {
           out.println ("<b>"+sports[i]+"<b>");
         }
      }
      else out.println ("<b>none<b>");
    %>
    </center>
    </body>
    </html>                                            12
The Output


You have selected: Cricket
Soccer




                             13
That Was Easy ..

• So with the help of some simple examples
  we saw the Power of JSP.

One can make JSP work the way he/she
wants and develop a full fledged web app
with it ..


        So , CODE & DESIGN ..
The world is all yours..
                                           14
Thank You 



Presented By :-



      Apoorv Anand
                  @APo_ORV
                         15

More Related Content

What's hot

Servlets and jsp pages best practices
Servlets and jsp pages best practicesServlets and jsp pages best practices
Servlets and jsp pages best practicesejjavies
 
Ch. 9 jsp standard tag library
Ch. 9 jsp standard tag libraryCh. 9 jsp standard tag library
Ch. 9 jsp standard tag libraryManolis Vavalis
 
S313265 - Advanced Java API for RESTful Web Services at JavaOne Brazil 2010
S313265 - Advanced Java API for RESTful Web Services at JavaOne Brazil 2010S313265 - Advanced Java API for RESTful Web Services at JavaOne Brazil 2010
S313265 - Advanced Java API for RESTful Web Services at JavaOne Brazil 2010Arun Gupta
 
15 expression-language
15 expression-language15 expression-language
15 expression-languagesnopteck
 
4η διάλεξη Τεχνολογίες Παγκόσμιου Ιστού
4η διάλεξη Τεχνολογίες Παγκόσμιου Ιστού4η διάλεξη Τεχνολογίες Παγκόσμιου Ιστού
4η διάλεξη Τεχνολογίες Παγκόσμιου ΙστούManolis Vavalis
 
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 7 ...
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 7 ...Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 7 ...
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 7 ...WebStackAcademy
 
11 page-directive
11 page-directive11 page-directive
11 page-directivesnopteck
 

What's hot (20)

19servlets
19servlets19servlets
19servlets
 
Jsp
JspJsp
Jsp
 
WEB TECHNOLOGIES JSP
WEB TECHNOLOGIES  JSPWEB TECHNOLOGIES  JSP
WEB TECHNOLOGIES JSP
 
Servlets and jsp pages best practices
Servlets and jsp pages best practicesServlets and jsp pages best practices
Servlets and jsp pages best practices
 
Ch. 8 script free pages
Ch. 8 script free pagesCh. 8 script free pages
Ch. 8 script free pages
 
Being a jsp
Being a jsp     Being a jsp
Being a jsp
 
Ch. 9 jsp standard tag library
Ch. 9 jsp standard tag libraryCh. 9 jsp standard tag library
Ch. 9 jsp standard tag library
 
Unified Expression Language
Unified Expression LanguageUnified Expression Language
Unified Expression Language
 
Ch. 7 beeing a jsp
Ch. 7 beeing a jsp     Ch. 7 beeing a jsp
Ch. 7 beeing a jsp
 
S313265 - Advanced Java API for RESTful Web Services at JavaOne Brazil 2010
S313265 - Advanced Java API for RESTful Web Services at JavaOne Brazil 2010S313265 - Advanced Java API for RESTful Web Services at JavaOne Brazil 2010
S313265 - Advanced Java API for RESTful Web Services at JavaOne Brazil 2010
 
Jsp tutorial
Jsp tutorialJsp tutorial
Jsp tutorial
 
15 expression-language
15 expression-language15 expression-language
15 expression-language
 
4η διάλεξη Τεχνολογίες Παγκόσμιου Ιστού
4η διάλεξη Τεχνολογίες Παγκόσμιου Ιστού4η διάλεξη Τεχνολογίες Παγκόσμιου Ιστού
4η διάλεξη Τεχνολογίες Παγκόσμιου Ιστού
 
Client side scripting and server side scripting
Client side scripting and server side scriptingClient side scripting and server side scripting
Client side scripting and server side scripting
 
C:\fakepath\jsp01
C:\fakepath\jsp01C:\fakepath\jsp01
C:\fakepath\jsp01
 
Wt unit 4
Wt unit 4Wt unit 4
Wt unit 4
 
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 7 ...
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 7 ...Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 7 ...
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 7 ...
 
11 page-directive
11 page-directive11 page-directive
11 page-directive
 
Aem best practices
Aem best practicesAem best practices
Aem best practices
 
Wt unit 3
Wt unit 3 Wt unit 3
Wt unit 3
 

Similar to Java server pages

JAVA J2EE Training in Coimbatore - Fundamentals of Java J2EE
JAVA J2EE Training in Coimbatore - Fundamentals of Java J2EE JAVA J2EE Training in Coimbatore - Fundamentals of Java J2EE
JAVA J2EE Training in Coimbatore - Fundamentals of Java J2EE abile technologies
 
Agile Software Development by Sencha
Agile Software Development by SenchaAgile Software Development by Sencha
Agile Software Development by SenchaLael Rukius
 
SoftwareUniversity seminar fast REST Api with Spring
SoftwareUniversity seminar fast REST Api with SpringSoftwareUniversity seminar fast REST Api with Spring
SoftwareUniversity seminar fast REST Api with SpringNayden Gochev
 
C,c++,java,php,.net training institute in delhi, best training institute for ...
C,c++,java,php,.net training institute in delhi, best training institute for ...C,c++,java,php,.net training institute in delhi, best training institute for ...
C,c++,java,php,.net training institute in delhi, best training institute for ...MCM COmpetitive Classes
 
Overview of Java
Overview of JavaOverview of Java
Overview of Javajosemachoco
 
Languages used by web app development services remotestac x
Languages used by web app development services  remotestac xLanguages used by web app development services  remotestac x
Languages used by web app development services remotestac xRemote Stacx
 
Advance java prasentation
Advance java prasentationAdvance java prasentation
Advance java prasentationdhananajay95
 
Raisa anthony web programming 1st week
Raisa anthony   web programming 1st weekRaisa anthony   web programming 1st week
Raisa anthony web programming 1st weekRaisa Anjani
 
Follow these reasons to know java’s importance
Follow these reasons to know java’s importanceFollow these reasons to know java’s importance
Follow these reasons to know java’s importancenishajj
 
presentation on online movie ticket booking
presentation on online movie ticket bookingpresentation on online movie ticket booking
presentation on online movie ticket bookingdharmawath
 
December 4 SDForum Java Sig Presentation
December 4 SDForum Java Sig PresentationDecember 4 SDForum Java Sig Presentation
December 4 SDForum Java Sig PresentationJonathan Abrams
 

Similar to Java server pages (20)

Jsp abes new
Jsp abes newJsp abes new
Jsp abes new
 
Analysis
AnalysisAnalysis
Analysis
 
JAVA J2EE Training in Coimbatore - Fundamentals of Java J2EE
JAVA J2EE Training in Coimbatore - Fundamentals of Java J2EE JAVA J2EE Training in Coimbatore - Fundamentals of Java J2EE
JAVA J2EE Training in Coimbatore - Fundamentals of Java J2EE
 
Agile Software Development by Sencha
Agile Software Development by SenchaAgile Software Development by Sencha
Agile Software Development by Sencha
 
JavaScript Toolkit
JavaScript ToolkitJavaScript Toolkit
JavaScript Toolkit
 
Jsp Comparison
 Jsp Comparison Jsp Comparison
Jsp Comparison
 
SoftwareUniversity seminar fast REST Api with Spring
SoftwareUniversity seminar fast REST Api with SpringSoftwareUniversity seminar fast REST Api with Spring
SoftwareUniversity seminar fast REST Api with Spring
 
C,c++,java,php,.net training institute in delhi, best training institute for ...
C,c++,java,php,.net training institute in delhi, best training institute for ...C,c++,java,php,.net training institute in delhi, best training institute for ...
C,c++,java,php,.net training institute in delhi, best training institute for ...
 
Java
JavaJava
Java
 
Jsp(java server pages)
Jsp(java server pages)Jsp(java server pages)
Jsp(java server pages)
 
Jsp
JspJsp
Jsp
 
Devjyotippt
DevjyotipptDevjyotippt
Devjyotippt
 
Overview of Java
Overview of JavaOverview of Java
Overview of Java
 
Languages used by web app development services remotestac x
Languages used by web app development services  remotestac xLanguages used by web app development services  remotestac x
Languages used by web app development services remotestac x
 
Spatial approximate string search Doc
Spatial approximate string search DocSpatial approximate string search Doc
Spatial approximate string search Doc
 
Advance java prasentation
Advance java prasentationAdvance java prasentation
Advance java prasentation
 
Raisa anthony web programming 1st week
Raisa anthony   web programming 1st weekRaisa anthony   web programming 1st week
Raisa anthony web programming 1st week
 
Follow these reasons to know java’s importance
Follow these reasons to know java’s importanceFollow these reasons to know java’s importance
Follow these reasons to know java’s importance
 
presentation on online movie ticket booking
presentation on online movie ticket bookingpresentation on online movie ticket booking
presentation on online movie ticket booking
 
December 4 SDForum Java Sig Presentation
December 4 SDForum Java Sig PresentationDecember 4 SDForum Java Sig Presentation
December 4 SDForum Java Sig Presentation
 

Recently uploaded

Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfAyushMahapatra5
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...PsychoTech Services
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajanpragatimahajan3
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room servicediscovermytutordmt
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 

Recently uploaded (20)

Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 

Java server pages

  • 1. JAVA SERVER PAGES Dynamic Web Content With Ease 1
  • 2. Let’s Learn JSP Now What The Heck Is JSP 2
  • 3. Introduction • JavaServer Pages (JSP) is a Java technology that helps software developers serve dynamically generated web pages based on HTML,XML, or other document types. • Released in 1999 as Sun's answer to ASP and PHP . 3
  • 4. Comparison Function/Feature JSP PHP Programming Completely Object Scripting language Approach Oriented but way too with Object Oriented descriptive. Support. String and data Rich library Rich Functionality . manipulation Inbuilt support to include third party libraries from other languages. Learning curve It helps if you have an If you know C/C++, decent understanding then you are halfway of JAVA and its through to learn PHP. architecture. Web Oriented Inbuilt Functionality Inbuilt Functionality Features but way too much of but less lines of code code. and less time to build an application. 4
  • 5. Advantages of JSP • Versus Active Server Pages (ASP) JSP is portable to other operating systems and Web servers; you aren’t locked into Windows. • Versus Servlets It is more convenient to write (and to modify!) regular HTML than to have a zillion println statements that generate the HTML. 5
  • 6. Let’s Dive into the World of JSP • What are JAVA servlets ? Servlets are java programs that run on a web server and are user to make webpages on a fly (dynamic). • Advantages of Servlets : Powerful ,portable and Cheaper than many other alternatives . 6
  • 7. •So aren’t JSP and Servlets the Same .. • 7
  • 8. The Difference • Servlets, make you generate the entire page via your program, even though most of it is always the same. JSP lets you create the two parts separately. • So everything a servlet can do JSP can and further it is more easier to write . • Developers & Designers at there best . 8
  • 9. Let’s a build a basic app • Setup and Installation Step 1. Download and install a Java Developer Kit. Step 2. Download and install the Apache- Tomcat web server. Step 3. Open Your browser and type http://localhost:8080 . Step 4: Save your app inside the root folder in apache . Step 5: Type http://localhost:8080/<appname.jsp> to run you 9
  • 10. Time For Some Coding <%@page contentType="text/html" import="java.util.*" %> 1st JSP tag <html> <body> <p>&nbsp;</p> <div align="center"> <center> <table border="0" cellpadding="0" cellspacing="0" width="460" bgcolor="#EEFFCA"> <tr> <td width="100%"><font size="6" color="#008000">&nbsp;Date Example</font></td> </tr> <tr> <td width="100%"><b>&nbsp;Current Date and time is:&nbsp; <font color="#FF0000"> <%= new java.util.Date() %> 2nd JSP tag </font></b></td> </tr> </table> </center> </div> </body> </html> 10
  • 11. Another Example Create a simple HTML page having the following output : Select Your Sport : Cricket Basketball Soccer Rugby Hockey 11
  • 12. JSP Coding Part • <html> <body> <%! String[] sports; %> <center>You have selected: <% sports = request.getParameterValues("sports"); if (sports != null) { for (int i = 0; i < sports.length; i++) { out.println ("<b>"+sports[i]+"<b>"); } } else out.println ("<b>none<b>"); %> </center> </body> </html> 12
  • 13. The Output You have selected: Cricket Soccer 13
  • 14. That Was Easy .. • So with the help of some simple examples we saw the Power of JSP. One can make JSP work the way he/she wants and develop a full fledged web app with it .. So , CODE & DESIGN .. The world is all yours.. 14
  • 15. Thank You  Presented By :- Apoorv Anand @APo_ORV 15