How JSP translated into Servlets?

Telusko
21 Feb 201712:54

Summary

TLDRThe video script discusses the process of creating a service method and a print writer object in Java, demonstrating how to print 'Hello World' and handle request and response objects. It covers creating data objects, understanding server-side script writing, and converting JSP pages to servlets for web development. The script also touches on the importance of imports, class declarations, and the use of HTML tags within JSP, offering insights into Java programming for web applications.

Takeaways

  • 😀 The script discusses the process of creating a JSP file and the importance of understanding Java and Servlet APIs.
  • 🔧 The speaker talks about the use of scriptlets in JSP, which are Java code snippets that can be embedded within HTML.
  • 📝 Expressions in JSP are used to output data, and they are evaluated and converted to a String before being presented to the user.
  • 🏷️ JSP tags are used for various purposes like including other files, forwarding requests, and handling form data.
  • 🔄 The conversion of JSP pages to Servlets is highlighted, emphasizing that JSP is just a view technology that gets translated into Servlets at runtime.
  • 🛠️ The script mentions the creation of a Servlet container to manage the Servlet lifecycle and handle requests.
  • 📂 It is important to understand the structure of a Servlet, including the service method and how it processes HTTP requests.
  • 🔑 The speaker explains the use of directives in JSP for including other files, setting page directives, and using tag libraries.
  • 📝 The importance of proper declaration and initialization of variables within the scriptlet area of a JSP is discussed.
  • 🔍 The script touches on the use of comments in JSP, emphasizing the need for proper syntax to avoid errors.
  • 🔗 The need to import necessary packages and classes when writing JSP code is mentioned, to ensure access to required functionalities.

Q & A

  • What is the primary focus of the script discussion?

    -The script primarily discusses the technical aspects of creating and working with JavaServer Pages (JSP), Java classes, and servlets.

  • What does the script mention about JSP and servlets?

    -The script explains the process of converting JSP pages into servlets and the role of the serverlet container in this conversion.

  • What are the key components involved in a JSP request and response cycle?

    -The key components mentioned are the request object, which carries the client's request, and the response object, which sends the server's response back to the client.

  • How does the script describe the creation of a Java class?

    -The script suggests creating a Java class by extending the necessary classes and defining methods for handling requests and responses.

  • What is the role of the serverlet container mentioned in the script?

    -The serverlet container is responsible for managing servlets, handling requests, and converting JSP pages into servlets at runtime.

  • What does the script imply about the importance of understanding JSP tags?

    -The script implies that understanding JSP tags is crucial for writing Java code that can be converted into servlets and executed by the serverlet container.

  • How does the script relate to the concept of a service method?

    -The script mentions creating service methods within Java classes to handle different types of HTTP requests, such as GET and POST.

  • What is the significance of the declaration area in JSP as per the script?

    -The declaration area in JSP is significant for declaring variables and methods that can be used within the JSP page, and it should be written carefully to avoid errors.

  • What does the script suggest about the use of scriptlets in JSP?

    -The script suggests that scriptlets in JSP should be used to write Java code that can be converted into servlets, and they should be written within the scriptlet tags.

  • How does the script discuss the process of importing packages in Java?

    -The script discusses importing packages using the 'import' statement, which is necessary for using classes from different packages in Java.

  • What are the implications of using JSP comments as mentioned in the script?

    -The script mentions that comments in JSP should be written carefully to avoid confusion and ensure that they do not interfere with the JSP tags or code.

Outlines

00:00

🚀 Introduction to JSP and Servlet Basics

This paragraph introduces the concept of using PrintWriter objects to print 'Hello World' and discusses creating objects and handling requests and responses in JSP (JavaServer Pages) and servlets. It explains that JSP is often converted into servlets for better development ease, emphasizing the difference between writing JSP and directly writing servlets. The paragraph also highlights the server environment like Tomcat, which is called a servlet container, and how JSP is processed within it.

05:00

🔍 Converting JSP to Servlets

This paragraph delves deeper into the mechanics of how JSP files are converted into servlets. It explains that any JSP code written is eventually transformed into a servlet, detailing the role of class definitions and service methods in this process. The discussion includes the automatic handling of objects like requests and responses by the server (Tomcat), making JSP a convenient tool for web developers despite it being transformed into servlets.

10:05

💡 JSP Directives and Scripting Elements

This paragraph explains various JSP directives and scripting elements. It covers different tags used in JSP, such as scriptlets for Java code, declarations for defining variables and methods, and expressions for outputting values. It also discusses how to import Java packages within JSP using specific tags, and the distinction between these tags and their respective functionalities. The explanation emphasizes how JSP allows for a mix of HTML and Java code to create dynamic web content.

Mindmap

Keywords

💡Service Method

A service method in the context of the video script refers to a function or procedure within a service class that is designed to perform specific tasks or operations. It is integral to the theme of the video as it discusses the creation and utilization of service methods in application development. For example, the script mentions 'create object of print writer' and 'define objects request and response' which are actions typically performed by service methods.

💡JSP

JSP, or JavaServer Pages, is a technology that allows for the generation of dynamic web content. It is a key concept in the video as it appears to be discussing web development with Java. The script references 'JSP' in the context of writing server-side scripts, indicating its relevance to the video's theme of server-side programming.

💡Scriptlet

In JavaServer Pages, a scriptlet is a section of Java code that is embedded within an HTML page. The video script mentions scriptlets, suggesting that it covers the concept of embedding Java code directly into web pages to generate dynamic content. This is a fundamental aspect of JSP programming.

💡HTML Tags

HTML tags are used to define elements within an HTML document. The video script talks about 'HTML tags' in the context of writing server-side code that outputs HTML, which is a common practice in web development. Understanding HTML tags is crucial for creating the structure and content of web pages.

💡Java Code

The script mentions writing 'Java code' in various contexts, such as within HTML tags and scriptlets. Java code is the programming language used to write the logic of an application, and in the video, it is used to manipulate data and control the flow of the web application.

💡Serverlet

A servlet is a Java technology that runs in a server and is used to generate dynamic web content. The term 'servlet' is mentioned in the script, indicating that the video discusses the use of servlets in server-side Java programming to handle HTTP requests and responses.

💡Request and Response Objects

In the context of web development, request and response objects are used to handle data sent to and received from a server. The video script refers to 'objects request and response' as part of the process of server-side scripting, highlighting their importance in the communication between the client and the server.

💡Web Application

A web application is a software program that runs on a web server and is accessed through a web browser. The video script discusses various components and methods that are part of developing a web application, such as service methods, JSP, and servlets, indicating that the main theme revolves around web application development.

💡Class

In object-oriented programming, a class is a blueprint for creating objects. The script mentions creating classes and extending them, which is a fundamental concept in Java programming. The video seems to be teaching how to define classes and use them to create objects that perform specific tasks within a web application.

💡Method

A method in Java is a function that is associated with an object or class. The video script frequently refers to creating and using methods, such as 'create method request and response'. Methods are a core concept in the video's discussion of how to structure and execute code within a Java-based web application.

💡Variable

A variable is a storage location paired with an associated symbolic name, which contains some known or unknown quantity or information, a value. The script mentions declaring variables, which is a basic concept in programming that is essential for storing and manipulating data within the application.

Highlights

Creating an object of PrintWriter to print 'Hello World'.

To add two numbers, create a class and use request parameters.

JSP pages convert into servlets which are handled by Tomcat.

In JSP, use HTML tags combined with Java code.

Using scriptlet tags in JSP for embedding Java code.

Using JSP expressions to output values directly in the HTML.

Importing packages in JSP using the directive tag.

Declarations in JSP for defining variables and methods outside of service methods.

The benefit of JSP is the ease of development by embedding Java in HTML.

Tomcat acts as a servlet container and handles JSP pages.

In JSP, <% %> tags are used for Java code, while <%= %> is used for expressions.

The converted servlet from JSP automatically gets request and response objects.

JSP can include methods within declaration tags that get integrated into the servlet class.

Importing multiple packages in JSP can be done using a comma-separated list.

JSP simplifies showing data on a webpage with embedded Java code for logic processing.

Transcripts

play00:03

विच इस सर्विस मेथड और दें वे हैव तू

play00:06

क्रिएट ऑब्जेक्ट ऑफ प्रिंट राइटर दें यू

play00:08

कैन प्रिंट हेलो वर्ल्ड इनसाइट व्हेन यू

play00:10

वांट तू एड तू नंबर्स वे हैव तू क्रिएट जो

play00:12

डी स्टफ प्लस वे हैव तू क्रिएट एन वे हैव

play00:15

तू फेस डी डेट ऑफ फ्रॉम डी रिक्वेस्ट

play00:16

ऑब्जेक्ट वाइड और पर डेट वे हैव तू डिफाइन

play00:18

ऑब्जेक्ट्स रिक्वेस्ट और रिस्पांस इन कैसे

play00:21

ऑफ जेपी यू गेट जो ठोस ऑब्जेक्ट्स बाय

play00:24

डिफॉल्टर राइट डेट मेंस जेपी इस मैच

play00:27

सिंपली लुक सर्वरलेट और फ्रॉम टुडे बिल बी

play00:30

व्हाट वे बिल बी वर्किंग ओनली ऑन जेसीपी

play00:32

बिल नोट को पर सब लेट राइट बट थॉट्स नोट

play00:35

डी कैसे आईएफ डेट वास डी कैसे दें वही वुड

play00:38

वही वुड आनेवन बिल लर्न सब लेट वही

play00:41

डायरेक्टली यू कैन स्टार्ट विद जेसीपी सो

play00:44

व्हाट आईएफ आई से

play00:46

जेसीपी आई मीन यू कैन नोट वन जेसीपी राइट

play00:49

यू कैन ओनली यू कैन ओनली राइट और जेसीपी

play00:52

यू कैन नोट वन जेसीपी इट्स बिकॉज़ आईएफ

play00:54

रिमेंबर व्हेन यू क वे टॉम कैट वे हैव सम

play00:56

लेट व्हाइट सो साल लेट रस ऑन टॉम कैट

play00:59

बिकॉज़ टॉमकैट इस अलसो कॉल्ड आज एन

play01:01

सर्वरलेट कंटेनर राइट डेट मेंस इन टॉम कैट

play01:05

यू कैन ओनली वन सावरेंस यू कैन नोट वन

play01:07

जेपी बट दें वे हैव सीन दी आउटपुट डिवाइस

play01:10

वे वे हैव क्रीटेड डेट जेसीपी पेज और वे

play01:11

कैन रन जेएसी पेज ऑन टॉम कैट हो डेट इस

play01:14

हैपनिंग डेन

play01:15

सर्वर कनॉट वन चाहिए एसपी सो व्हाट हैपेंस

play01:18

इस आज एन प्रोगामर एवं आईएफ यू राइट एन

play01:21

जेसीपी कोड डेट जेपी गोल्ड किड्स

play01:23

कन्वर्टेड इन सर्वलेस राइट सो मटर आईएफ यू

play01:27

एवं आईएफ यू राइट एन जैसी पेज था इस

play01:29

गेटिंग कन्वाइट इन सर्वेद आईटी दी ओनली

play01:31

एडवांटेज ऑफ लाइटिंग जेसीपी इस आईटी इस

play01:34

आईटी इस इजी ऑफ पर डेवलपमेंट

play01:38

राइट सो हो कैन यू कन्वर्ट सो इट्स

play01:42

एक्चुअली नोट एबल तू जेपी मूविंग फ्रॉम

play01:44

सर्विस टॉपिक बट व्हेन यू आर नोट आईटी गज

play01:48

और दिस डायरेक्शन सो यू लाइक जैसे पेज और

play01:50

था कन्वर्टेड इन एन सर्वरलेट बट दें हो

play01:53

एक्जेक्टली जस्ट पॉसिबल सो लेट मी क्रिएट

play01:57

क्लास और दें नोट राइट हैंड साइड बिल

play01:59

कंपेयर्ड डेट बिल जेसीपी हो एक्जेक्टली और

play02:02

और वे कैन राइट एन देसी पेज ओके लेट मी

play02:05

जस्ट जस्ट लेट मी जस्ट को पर जेसीपी हर और

play02:07

साहब लेट हर सो एक्जेक्टली कन्वर्टेड

play02:12

सो इन जेसीपी वे हैव जो दी एचटीएमएल टैग्स

play02:16

राइट जेएसपीईएस जो अबाउट एचटीएमएल और दें

play02:18

समथिंग बिटवीन वे हैव जावा कोड राइट सो

play02:21

लेट से वे हैव एचटीएमएल टैग वे हैव बॉडी

play02:24

और अलसो टैक्स लेट अलसो राइट बॉडी टैग हर

play02:26

सो बॉडी ओपन और डेन समरी हेयर वे हैव तू

play02:29

क्लोज बॉडी टैग और दें वे हैव तू क्लोज

play02:31

एचटीएमएल टैग राइट हैव डन डेट नो व्हाट हर

play02:36

सो हर व्हाट यू बिल डू व्हाट यू बिल बी

play02:39

डूइंग गैस आईएफ यू वांट तू राइट जावा कोड

play02:40

लेट से आईएफ आई वांट तू एड तू नंबर्स सो

play02:43

आई बिल डू आईटी इस आई बिल से एन'टी आई

play02:45

इक्वल तू और वे नो डेट वे कैन उसे एन

play02:47

रिक्वेस्ट ऑब्जेक्ट पैरामीटर राइट और लेट

play02:51

आईटी जस्ट लेट से दिस इस एन गेट एन मेथड

play02:52

इट्स लाइक आईटी जस्ट मेक आईटी सम स्मॉलर

play02:54

बिकॉज़ आई हैव तू राइट सॉलिड कोर्ट डेट आज

play02:56

वेल सर्विस से दिस इस एन टी वन

play03:07

आई एम सेइंग इंतजार डॉट पासिंग और

play03:10

एवरीथिंग इस हर ओके सम डूइंग डेट आई एम

play03:12

डूइंग एवरीथिंग

play03:16

इन तू के इक्वल तू से थिंक नो वे गो दिस

play03:19

तू वालुज आई वांट तू एड दिस तू वालुज वे

play03:21

कैन सेंट के इक्वल तू आई प्लस के और दें

play03:26

वे कैन से आउट डॉट प्रिंट और वे कैन

play03:29

प्रिंट दी वैल्यू ऑफ के इसे डैटसन बट वही

play03:31

सो वे कैन वे कैन एसाइंड स तू वालुज और वे

play03:34

कैन एड ठोस तू वालुज और दें वे कैन प्रिंट

play03:36

दी आउटपुट तो से थिंक आईएफ यू वांट तू डू

play03:39

इन सब लेट हो डू यू नो आईटी राइट सो लेट

play03:42

लेट इग्नू दिस टॉपिक आई मीन लेट टेक नो

play03:44

दिस लो चेक आईएफ आई आस्क यू गेट आई मीन

play03:47

आईटी दस नोट मटर व्हाट यू वांट तू डू इन

play03:49

दिस सब्जेक्ट आईएफ आई आस्क यू तू गेट एन

play03:51

व्हाट इसे समथिंग विच कम शेर वन वे हैव तू

play03:55

क्रिएट एन क्लास राइट यू से प्रोवाइड डी

play03:57

नाम ऑफ डी क्लास यू हैव तू एक्सटेंड डेट

play04:00

क्लास विद हिसाब नेट दें यू हैव तू क्रिएट

play04:07

मैथर्ड रिक्वेस्ट और रिस्पांस यू हैव तू

play04:10

क्रिएट ऑब्जेक्ट ऑफ प्रिंट आइटम और दें यू

play04:12

हैव तू क्लोज एवरीथिंग डेट मेंस आईटी दोएस

play04:14

नोट मटर व्हाट इसे डी लॉजिक ऑफ डी एस यू

play04:16

हैव तू जो दिस थिंग्स और आई फ़ॉरगोट वन

play04:18

थिंक इंपोर्ट दे पैकेज राइट सो यू हैव तू

play04:21

डू ऑल दो स्टफ हर आईटी देश नोट इस डी

play04:23

लार्जेस्ट यू हैव तू डू जो डी थिंग्स राइट

play04:26

सो लेट सी आईएफ आईएफ आई क्रिएट एन

play04:28

सर्वरलेट या वे से पब्लिक प्लस और आई बिल

play04:32

नाम दिस सब लेट स डेमो सब्जेक्ट

play04:35

विच एक्सटेंशन

play04:40

आईएफ आई ओपन दिस यू हैव तू डिफाइन एन मेथड

play04:43

विच इस विच इस एन सर्विस मेथड राइट सो वे

play04:45

से एन मेथड सर्विस दिस सर्विस बिल टेक तू

play04:48

बट अमीटर रिक्वेस्ट और रिस्पांस सो वे गो

play04:51

दिस तू ऑब्जेक्ट आईएफ आई ओपन दिस इन दिस

play04:54

वे हैव तू क्रिएट ऑब्जेक्ट ऑफ प्लेन तू

play04:56

इटर विच इस आउट और दें वे हैव तू डू

play04:58

समथिंग वे हैव तू कंप्लीट समथिंग सो दिस

play05:00

ऑब्जेक्ट दिस इस डी योर ऑबजेक सो आईटी

play05:03

डेजन मटर व्हाट सर्विस यू वांट तू क्रिएट

play05:06

दिस समथिंग विच इस विच इस देवर राइट यू आर

play05:09

ज डोंट वारी आईएफ यू वांट तू राइट सम

play05:13

लॉजिक हर राइट डी लॉजिक राइट इन जेसीपी वे

play05:16

आर नोट डूइंग अन्य ऑफ डी स्टफ सो व्हाट

play05:18

हैपेंस इस व्हेन यू व्हेन यू रज एसपी पेज

play05:21

आईटी व कन्वर्ट इत्सेल्फ इन एन सर्वरलेट

play05:24

सो आईटी बिल डू दिस इस फिक्स्ड राइट बट ऑन

play05:28

दिस समथिंग विच वे हैव तू डिफाइन हर डी

play05:30

क्लास नाम सो व्हाट हैपेंस इस योर जेसीपी

play05:33

इन इंडियन

play05:36

जेसीपी योर क्लास नाम बिल विकम आईटी इस

play05:40

डेमो आई मीन डेमो

play05:44

jsp.jsp सो थॉट्स योर डेट्स योर क्लास नाम

play05:47

राइट सो व्हाट एवर फाइल वे हैव से आईटी इस

play05:49

डेमो आई मीन नोट जस्ट फूल आईटी इस डेमो

play05:52

जेसीपी ओके सो वे बिल विकम डेम और जेसीपी

play05:56

देवर सो व्हाट एवर फाइल नाम योर मेंशन हर

play05:58

डेट डेट वैसे रेकों योर फेवरेट नाम दें

play06:00

डेट बिल बी एक्सटेंडेड बाय सर्वर यू डोंट

play06:03

हैव तू डू आईटी राइट आईटी इसे डेट इसे विच

play06:04

स्टैंडर्ड दिस इसे समथिंग विच यू आर विच

play06:07

आर टॉम कैट बिल गिव यू आईटी बिल से ओके वे

play06:08

बिल गिव यू आर सर्विस मेथड यू गेट एन डू

play06:10

पोस्ट दिस तू ऑब्जेक्ट बिल बी प्रोवाइड

play06:13

में योर टॉम कैट सो व्हाट एवर यू आर राइट

play06:15

इनसाइड दिस कोड व्हाट एवर व्हाट एवर यू आर

play06:18

राइट इनसाइड दिस टैग बिल आई मीन दिस बिल

play06:21

को इन डी सर्विस मेथड सो आईटी वैसे आईटी

play06:24

वज डायरेक्टली कॉपी पिए सो दिस बिल बी

play06:25

कॉपी हर और थॉट्स वही यू गेट दिस आर्ट

play06:29

ऑब्जेक्ट यू डोंट हैव तू क्रिएट और आउट

play06:32

ऑब्जेक्ट इन ज स्पेस बिकॉज़ यू आर सो आईटी

play06:34

बिल गिव डी ऑब्जेक्ट यू डोंट हैव तू

play06:36

क्रिएट एन रिक्वेस्ट स्टॉप आईटी बिल गिव

play06:38

डी रिक्वेस्ट ऑब्जेक्ट यू डोंट हैव तू

play06:40

क्रिएट एन रिस्पांस ऑब्जेक्ट बिकॉज़ यू आर

play06:42

सर्विस बिल गिव यू डेट रिस्पांस ऑब्जेक्ट

play06:43

नोट जस्ट दिस थ्री ऑब्जेक्ट

play06:46

योर एप्लीकेशन ऑब्जेक्ट एवरीथिंग बिल बी

play06:48

जिवन बाय जेसीपी हमें जो टॉम कैट चलिए

play06:51

दोस्त

play06:53

ऑब्जेक्ट्स इन जेसीपी अगेन बिल बी सिंह

play06:55

डेट इन डी सेशन डी फ्यूचर सेशंस ओके सो हर

play06:59

थॉट्स हो आईटी क सो आईटी गेट कन्वर्टेड

play07:01

फ्रॉम जेसीपी तू सालिक इसे डेट असम राइट

play07:05

नो

play07:08

व्हाट डू यू कॉल दिस व्हाट इसे कॉल्ड दिस

play07:11

सब्जेक्ट आई एम इन दिस टैग नोट सर दिस टैग

play07:13

सो दिस टैग हर इन जेसीपी इसे कॉल्ड आगे

play07:17

स्क्रिप्ट सो दिस स्क्रिप्ट लेट सो दिस

play07:21

टैग विच इस एंगल एन ब्रैकेट परसेंटेज साइन

play07:24

बिल बी कॉल्ड आज आई एम इन दिस साइड बिल बी

play07:26

कॉल्ड आज स्क्रिप्ट ओके नो व्हाट एल्स

play07:29

व्हाट आर व्हाट आर थिंक वे हैव सी वॅटीवर

play07:32

यू राइट इन दिस टैग बिल को तू योर सर्विस

play07:34

राइट सो दिस व्हाट बिल बी कमिंग हर सो

play07:38

व्हाट बिल डी राइट इन दिस स्क्रिप्ट लाइट

play07:39

बिल बी कमिंग इन सर्विस मेथड व्हाट आईएफ

play07:42

यू वांट समथिंग हर आई वांट तू क्लियर डी

play07:44

वेरिएबल आई बिल सेंट एन लेट से हमारा

play07:47

वेरिएबल लेट से वैल्यू

play07:49

आई वांट तू क्रिएट एन वेरिएबल समथिंग लाइक

play07:52

दिस सो व्हाट अबाउट

play07:54

दिस सर्विस मेथड राइट आई वांट समथिंग हर

play07:57

इन डी डिक्लेरेशन क्षेत्र आई वांट तू

play07:59

डिक्लेरेशन वैरियेबल्स देवर हो कैन यू डू

play08:00

डेट आईएफ यू राइट डेट इनसाइड दिस टैग आईटी

play08:04

वज गोइंग साइड

play08:06

चॉइस सो व्हाट वे बिल डू स लेट लेट मी

play08:09

जस्ट एक्सपेंस इमेजिन वे हैव वे डू हैव जो

play08:12

ठोस थिंग्स अप वे हैव एचटीएमएल टैग वे हैव

play08:15

बॉडी टाइप्स ऑफ वेदर सो वे हैव वन मोर

play08:18

टाइप ऑफ वन मोर टैग हर सी आई उसे दिस टैग

play08:21

अगेन आईटी बिल को तू सर्विस से आई वांट तू

play08:24

पट सम डेट विच इस नोट इन सर्विस ओके आई

play08:28

वांट तू पट सम डेट ऑफ सम डिक्लेरेशन और सम

play08:31

स्टेटमेंट विच इस नोट डेट इनसाइड सब आईटी

play08:33

इस आउटसाइड दिस सर्विस

play08:35

सो वे कैन उसे उन्नाव टॉपिक सो वे कैन नोट

play08:39

राइट सो आईटी इसे एन सर्विस बट नोट सर्विस

play08:42

राइट सो आईटी इस डिक्लिनेशन सो दिस

play08:44

क्षेत्र बिल बी कॉल्ड स

play08:48

डिक्लेरेशन सो वे कैन सो व्हाट डू यू मीन

play08:50

राइट इनसाइड दिस सो आईएफ आई सेंट

play08:54

वैल्यू इक्वल तू वन सो दिस स्कोर बिल को

play08:57

इनसाइड डिक्लेरेशन क्षेत्र राइट सो व्हेन

play08:59

यू वांट तू डिफाइन अन्य वेरिएबल विच इस

play09:01

विच शुड बी हर विच इस एन इंस्टेंस

play09:03

वैरियेबल्स आईएफ यू वांट तू क्रिएट अन्य

play09:05

मेथड और लेट से विथ दिस सर्विस आई वांट वन

play09:08

मोर मेथड आते शो सो यू कैन यू कैन क्रिएट

play09:10

एन शो मेथड इनसाइड दिस टैग इसे डी

play09:13

डिक्लेरेशन टैग सो आईएफ यू क्रिएट एन मेथड

play09:15

हर डेट मेथड बिल बी गोइंग इन डी क्लास सो

play09:18

व्हाट एवर यू वांट इनसाइड डी क्लास और

play09:20

आउटसाइड डी सर्विस मेथड डेट बिल को इन

play09:22

डिक्लेरेशन क्षेत्र परफेक्ट राइट डू वे

play09:26

हैव वन समथिंग मोर वे हैव वन मोर और डेट

play09:29

वे हैव तू मोस्ट डी फर्स्ट वन इस

play09:33

लेट सी आईएफ यू वांट तू इंपोर्ट एन पैकेज

play09:35

इन योर फाइल समथिंग हर यू वांट तू इंपोर्ट

play09:38

एन पैकेज में भी डेट एपी डेट क्लास में भी

play09:41

डेटाबेस क्लास आईएफ यू वांट तू इंपोर्ट

play09:44

अन्य पैकेज सो व्हाट यू आर डूइंग सिंपली

play09:47

से इंपोर्ट और दें वे राइट सो नॉर्मल आईएफ

play09:50

इंपोर्ट दे पैकेज आउटसाइड डी क्लास व्हाट

play09:53

अबाउट जेसीपी वेद यू आर मेंशन आई वांट तू

play09:55

इंपोर्ट दे पैकेज सो पर जेपी वे हैव वन

play09:58

मोर टैग इन फैक्ट बिकॉज़ परसेंटेज

play10:05

@

play10:06

राइट साइड

play10:10

वे हैव तू से इंपोर्ट और दें वे से इक्वल

play10:14

तू डबल इन डबल कोट्स हैव तू मेंशन

play10:15

java.util.d

play10:20

और परसेंटेज

play10:25

यू आर मेंशनिंग इंपोर्ट अटरीब्यूट सो था

play10:28

था समथिंग हैव तू रिमेंबर दिस इंपोर्ट इस

play10:31

एन एक्टर डुएट वे हैव तू असाइन डी

play10:33

वैलिडिटी वे से इक्वल तू और दें वे हैव तू

play10:34

मेंशन डी पैकेज नाम व्हाट आईएफ यू हैव

play10:36

मल्टीपल पैकेज वे आर जस्ट हैव तू गिव कोमा

play10:38

सो आईटी इस जावा डॉट यू तिल डेट

play10:43

कोमा जावा एसक्यूएल डॉट स्टेटमेंट वे कैन

play10:46

हैव मल्टीपल कॉमस और वे कैन थिंक डेट राइट

play10:49

सो था थ्री टैक्स सो दिस इस स्क्रिप्ट

play10:52

लाइक दिस इस डिक्लिनेशन नो दिस टैग इस

play10:56

कॉल्ड आज डीक्रिएटिव

play10:59

आ दिस इस डायरेक्ट तू

play11:02

मी मिस्टेक सो आईटी इसे डायरेक्ट

play11:06

तू यू दिस इस डिक्लेरेशन दिस इस स्क्रिप्ट

play11:10

नो डू वे हैव वन मोर यस वे हैव सो लेट से

play11:13

आईएफ यू वांट तू प्रिंट समथिंग स्पेशल ऑफ

play11:16

यूजिंग प्रिंट आउट प्रिंट वे कैन अलसो उसे

play11:19

एंगल ऑफ ब्रैकेट इक्वल तू सो वे हैव तू

play11:22

उसे एंगुलर पैकेट परसेंटेज इक्वल तू के सो

play11:25

व्हाट अबाउट दिस टैग विच इस परसेंटेज

play11:28

इक्वल तू बिल को इनसाइड आउट

play11:32

डॉट प्रिंट

play11:36

दिस टैग विच इस परसेंटेज इक्वल तू बिल को

play11:39

इनसाइड योर आउटडोर प्लेनेट

play11:42

सो दिस टैग हर इस कॉल्ड आज एक्सप्रेशन

play11:49

एसपी वे हैव डायरेक्टिव सो डायरेक्टिव गोस

play11:53

आगे सो यू वांट तू इंपोर्ट दी पैकेज आईएफ

play11:55

यू वांट तू डू अन्य अदर एक्स्ट्रा स्टॉप

play11:57

डेट इस डायरेक्टिव आईएफ यू वांट तू राइट

play11:59

समथिंग इनसाइड डी क्लास आउटसाइड डी सर्विस

play12:02

मेथड एग्जांपल मेथड डेफिनेशन वेरिएबल

play12:04

डिक्लेरेशन यू कैन डू डेट और डिक्लेरेशन

play12:06

क्षेत्र सो वे हैव तू उसे परसेंटेज नोट

play12:09

आईएफ यू वांट तू राइट समथिंग इन डी सर्विस

play12:11

मेथड वे हैव तू उसे एंगुलर पैकेट परसेंटेज

play12:14

परसेंटेज एंगुलर बैक इस योर स्क्रिप्ट टैग

play12:16

आईएफ यू वांट तू राइट समथिंग इन आउट डी

play12:19

विंटर और डायरेक्टली वे कैन उसे दी

play12:21

एक्सप्रेशन टैग राइट सो दिस इस जेसीपी पर

play12:24

यू सो व्हाट एवर यू कैन चेंज इट्स गेट

play12:27

कन्वर्टेड इन एन सर्वरलेट राइट सो एवं

play12:31

आईएफ राइटिंग एन जेसीपी आईटी बिल बी सो

play12:33

अगेन विच इस बटर डिपेंड्स आईएफ यू वांट तू

play12:37

शो डाटा ऑन डी पेज ओके आईएफ यू आईएफ यू आर

play12:41

इंटरेक्शन इस तू क्रिएट एन पेज जस्ट इस

play12:43

बटर राइट बट आईएफ यू आर एंटीना जस्ट तू

play12:45

प्रोसेस आईटी पर डेट वे हैव सावरेन अगेन

play12:48

विच वन तू उसे व्हेन डेट बिल सी इन डी

play12:50

नेक्स्ट वीडियो सो थॉट्स इट्स था थैंक यू

play12:52

सो मैच पर वाचिंग और दिस

Rate This

5.0 / 5 (0 votes)

Related Tags
Web DevelopmentJava ScriptProgrammingHTML TagsServer SideCode SnippetsWeb DesignJSP PagesTechnical GuideDeveloper Tips