Home
Videos uploaded by user “Sada Learning Hub”
Servlet Interview Questions –  10 out of 180
 
09:16
This video can help you to learn Servlet Technology interview questions with explanation Q) How many objects of a servlet is created? Q) What is the life-cycle of a servlet? Q) Who is responsible to create the object of servlet? Q) When servlet object is created? Q) What is difference between Get and Post method? Q) What is difference between PrintWriter and ServletOutputStream? Q) What is difference between GenericServlet and HttpServlet? Q) What is servlet collaboration? Q) What is the purpose of RequestDispatcher Interface? Q) Can you call a jsp from the servlet?
Views: 3810 Sada Learning Hub
Lesson - 11 : OOPs - Coupling and Cohesion in java programming language
 
07:15
Coupling: The degree of dependency between the components is called coupling. Cohesion: For every component we have to maintain a clear well defined functionality such type of component is said to be follow high cohesion.
Views: 1069 Sada Learning Hub
Solution For CamStudio Problem׃ xvid status not responding
 
01:53
Solution For CamStudio Problem׃ xvid status not responding This video is to show you the best settings to use with CamStudio to produce a good quality video. Instructions: Video Options Select Xvid M-PEG 4 Codec as the Compressor Official Xvid Download link: http://www.digital-digest.com/softwar... 1. Set Key Frame Rate at 200 2. Set Frames Captured at 5 3. Set Playback rate at 200. *Make sure when you multiply the playback rate by the frames captured rate you always get 1,000! Audio Options 1. Check the box "Use MCI Recording" Autopan 1. Check "AutoPan 2. Set Autopan Speed at 40 Region 1. Select "Fixed Reigion 2. Set 1280 for Width. Set 720 for Height. Especially handy for YouTube uploads. Program Options Under Recording Priority, Check "Highest" That's all you need to produce good quality videos with CamStudio!
Views: 342 Sada Learning Hub
Lesson - 09 : Eclipse IDE - Run Java program outside Eclipse
 
05:12
Create JAR file: To run the Java program outside of the Eclipse IDE, you need to export it as a JAR file. A JAR file is the standard distribution format for Java applications. Select your project, right-click it and select the Export menu entry. Run your program outside Eclipse: Open a command shell, e.g., under Microsoft Windows select Start ▸ Run and type cmd and press the Enter key. This should open a console window. Switch to the directory which contains the JAR file, by typing cd path. For example, if your JAR is located in c:\temp, use the following command.
Views: 568 Sada Learning Hub
Lesson - 58 : Python Advanced - Python  Database Access : Calling MySQL Stored Procedures in Python
 
11:34
************************************************** Python Core PlayList : https://www.youtube.com/watch?v=_laUbUtzMOs&list=PLxWzQv_1I_ACFomYYjF0HMqmu-w2pyqta Python Advanced PlayList : https://www.youtube.com/watch?v=RSKv-gSKrpA&list=PLxWzQv_1I_ACjp_DGDwHlTZlndqi4cu0_ ************************************************** Python Database Access : Calling MySQL Stored Procedures in Python : To call a stored procedure in Python, you follow the steps below: Connect to MySQL database by creating a new MySQLConnection object. Instantiate a new MySQLCursor object from the MySQLConnection object by calling the cursor() method. Call  callproc() method of the MySQLCursor object. You pass the stored procedure’s name as the first argument of the  callproc() method. If the stored procedure requires parameters, you need to pass a list as the second argument to the  callproc() method. In case the stored procedure returns a result set, you can invoke the  stored_results() method of the MySQLCursor object to get a list iterator and iterate this result set by using the  fetchall() method. Close the cursor and database connection as always. Example : db_config = read_db_config() conn = MySQLConnection(**db_config) cursor = conn.cursor() cursor.callproc('find_all') Sample Projects : https://github.com/SadaLearningHub1/Python3-Core-And-Advanced-Examples
Views: 1529 Sada Learning Hub
Lesson - 5 : Serialization - Serialization with respect to Inheritance
 
10:10
Serialization with respect to Inheritance : (1) If Super class is Serializable In case super class is Serializable than all its subclasses will be serializable by default. No need to implement serializable interface in subclass explicitly. (2) If Super class is not Serializable but subclass is In case super class is not Serializable than to serialize the subclass’s object we must implement serializable interface in subclass explicitly. In this case the superclass must have a no-argument constructor in it. (3) If the superclass is serializable but we don’t want the subclass to be serialized. To prevent subclass from being serialized we must implement writeObject() and readObject() method and need to throw NotSerializableException from these methods.
Views: 197 Sada Learning Hub
Java Database Connectivity(JDBC) Interview Questions – 10 out of 140
 
14:20
This video can help you to learn Java Database Connectivity(JDBC) interview questions with explanation Q) What is JDBC? Q) What is JDBC Driver? Q) What are the steps to connect to the database in java? Q) What are the JDBC API components? Q) What are the JDBC statements? Q) What is the difference between Statement and PreparedStatement interface? Q) How can we execute stored procedures and functions? Q) What is the role of JDBC DriverManager class? Q) What does the JDBC Connection interface? Q) What does the JDBC ResultSet interface?
Views: 983 Sada Learning Hub
Lesson - 04 : Web Security - Client Certificate Authentication
 
26:21
1. To apply security for a servlet or a jsp we have two approches 1. By the programmer 2. By the Container 2. Declarative Security Models 1. Basic Authentication 2. Digest Authentication 3. Form Based Authentication 4. Client Certificate Authentication Client Certificate Authentication 1. This model is used to transfer the data between a client and server over a SecureSocketLayer(SSL). 2. In this model first a server will send a certificate to browser(client). If the certificate accepted then server allows the communication in a secure connection. If not accepted communication is not allowed. 3. In real time third party certificate authority creates a secure certificate for data transfer using RSA algorithm(Rivest Saber Adleman). To create a local certificate we can use key tool given by JDK. To test client-certificate authentication do the following generate a local certificate using keyTool C:\>keytool -genkey -alias test1 -keyalg RSA The generated certificate is stored in c:\Documentand settings\welcome\keystore Add the generated certificate to server.xml file In server.xml put non SSL connector tag in <comments> and SSL <connector> tag at out of comments. Add two attributes called keystoreFile and keystorePass to the SSl <connector> tag. <connector port="8443" protocol="http/1.1" SSLEnable="true" maxThreads="150" scheme="https" secure="true" clientAuth="flase" sslProtocol="TLS" keystoreFile="c:\Documentand settings\welcome\keystore" keystorePass="xx"/> Sample Projects : https://github.com/SadaLearningHub1/JSP-Projects
Views: 1765 Sada Learning Hub
Best Camstudio settings for recording HD videos
 
06:56
This video is to show you the best settings to use with CamStudio to produce a good quality video. Instructions: Video Options Select Xvid M-PEG 4 Codec as the Compressor Official Xvid Download link: http://www.digital-digest.com/softwar... 1. Set Key Frame Rate at 200 2. Set Frames Captured at 5 3. Set Playback rate at 200. *Make sure when you multiply the playback rate by the frames captured rate you always get 1,000! Audio Options 1. Check the box "Use MCI Recording" Autopan 1. Check "AutoPan 2. Set Autopan Speed at 40 Region 1. Select "Fixed Reigion 2. Set 1280 for Width. Set 720 for Height. Especially handy for YouTube uploads. Program Options Under Recording Priority, Check "Highest" That's all you need to produce good quality videos with CamStudio!
Views: 569 Sada Learning Hub
Lesson - 21 : Servlet - Pagination in Servlet
 
18:46
Pagination in Servlet: For a given request if the response content is to large then the end user looses the concentration to observe the response of the request. When the response content is too heavy or too large then instead of displaying the total response at once we can divide the response content into multiple web pages and we can show page by page of the response. This concept is called pagination. For example in gmail the mails of inbox are displayed in page by page manner. This is a pagination.
Views: 4788 Sada Learning Hub
Lesson - 3 : OOPs - Has-A Relationship in Object Oriented Programming
 
04:54
Has-A Relationship: 1) HAS-A relationship is also known as composition (or) aggregation. 2) There is no specific keyword to implement hAS-A relationship but mostly we can use new operator. 3) The main advantage of HAS-A relationship is reusability.
Views: 556 Sada Learning Hub
Lesson - 27 : Hibernate - Built-in connection pooling in Hibernate
 
18:08
Hibernate – Built-in Connection Pooling in Hibernate: 1. If a java program wants to obtain a connection with a database then java API as provided or JDBC API as provided two ways. A) java.sql.DriverManager class B) javax.sql.DataSource interface 2. If a java program want to get direct connection with the database then we use DriverManager class. 3. The connection returned by DriverManager class is a nonreusable connection. The non reusable connections will increase the burden on a database. 4. To overcome the above problem we got connection pooling technique in java. 5. In connection pooling a group of reusable connections(pooled connections) are stored in a pool and the connections are provided to the clients whenever required. 6. To obtain a connection from a connection pool we use DataSource interface in a java program In hibernate connection pooling mechanism is divided into three types 1. Built-in connection pooling / jdbc connection pooling 2. Standalone connection pooing/Third party connection pooling 3. Server side connection pooling Built-in connection pooling / jdbc connection pooling : 1. Hibernate by default comes with automatic connection pool. This is also called jdbc connection pool. 2. As a programmer we are allowed to set the maximum pool size for hibernate built- in connection pool 3. If you want to set maximum pool size then we need to configure connection pool size property in hibernate.cfg.xml file 4. <property name=“hibernate.connection.pool_size”>10</property> 5. The built- in connection pool of hibernate is only for testing purpose, but it should not be used in real time application (production.system) Configurations: <hibernate-configuration> <session-factory> <property name="hibernate.connection.driver_class">oracle.jdbc.driver.OracleDriver</property> <property name="hibernate.connection.url">jdbc:oracle:thin:@localhost:1521:xe</property> <property name="hibernate.connection.pool_size">50</property> <mapping resource="Payment.hbm.xml"/> </session-factory> </hibernate-configuration> Hibernate Examples Project Github Link : https://github.com/SadaLearningHub1/Hibernate-Projects
Views: 276 Sada Learning Hub
Lesson - 69 : Python Advanced - Python CGI Programming : File Upload Example
 
07:03
Python CGI Programming : File Upload Example: To upload a file, the HTML form must have the enctype attribute set to multipart/form-data. The input tag with the file type creates a "Browse" button. <html> <body> <form enctype="multipart/form-data" action="save_file.py" method="post"> <p>File: <input type="file" name="filename" /></p> <p><input type="submit" value="Upload" /></p> </form> </body> </html> Above example has been disabled intentionally to save people uploading file on our server, but you can try above code with your server. Here is the script save_file.py to handle file upload − form = cgi.FieldStorage() # Get filename here. fileitem = form['filename'] # Test if the file was uploaded if fileitem.filename: # strip leading path from file name to avoid # directory traversal attacks fn = os.path.basename(fileitem.filename) open('/tmp/' + fn, 'wb').write(fileitem.file.read()) message = 'The file "' + fn + '" was uploaded successfully' else: message = 'No file was uploaded' print """\ Content-Type: text/html\n Sample Projects : https://github.com/SadaLearningHub1/Python3-Core-And-Advanced-Examples
Views: 605 Sada Learning Hub
Lesson - 58 : Hibernate - Many To One BiDirectional using XML and Annotation based Configuration
 
17:58
Hibernate – Assotations/Relationship : One To Many BiDirectional: 1. One-to-many bidirectional relationship is nothing but it is a combination of one-to-many and many-to-one. 2. If bi-directional relationship is applied then operations can be done from a parent to child or from a child to parent. 3. If we want to apply one-to-many bi-directional, then we need a collection at parent class and reference of a parent in child class both are required. 1. <many-to-one class="com.sada.Model.Vendor" name="vendor" column="VENID" cascade="all" lazy="proxy"/> 2. <set name="customers" cascade="all" lazy="true"> <key column="VENID"/> <one-to-many class="com.sada.Model.Customer"/> </set> Hibernate Examples Project Github Link : https://github.com/SadaLearningHub1/Hibernate-Projects
Views: 54 Sada Learning Hub
Java Interview Questions – 110 out of 380
 
06:49
This video can help you to learn java interview questions with explanation Q) What if the static modifier is removed from the signature of the main method? Q) What is difference between static (class) method and instance method? Q) Can we override static method? Q) Why we cannot override static method? Q) What is the difference between static binding and dynamic binding? Q) Can you declare an interface method static? Q) What is static import ? Q) What is static synchronization? Q) What is static block? Q) What are static variables?
Views: 81 Sada Learning Hub
Lesson - 01 : UNIX - Introduction And Salient Features of UNIX
 
14:37
Introduction : UNIX is an operating system which was first developed in the 1960s, and has been under constant development ever since. By operating system, we mean the suite of programs which make the computer work. It is a stable, multi-user, multi-tasking system for servers, desktops and laptops. UNIX systems also have a graphical user interface (GUI) similar to Microsoft Windows which provides an easy to use environment. However, knowledge of UNIX is required for operations which aren't covered by a graphical program, or for when there is no windows interface available, for example, in a telnet session. Features : 1. Popularity  : The unix operating  system have wide range of computing  power  from microcomputers, mainframes and different manufacture’s machine. 2. Portability : It is easier to read, understand, change and move to other machines because it is written in high-level language. The code can be changed and complied on a new machine. Users   can then choose from a wide variety of hardware vendors without being locked in with a particular vendor. 3. Machine-independence : The system is machine-independent. So , it is easier to write applications that can run on micros, mins and mainframes because the system hides the machine architecture from the user. 4. Multi-User Operations : UNIX is a multi-user system designed to support a group of users simultaneously. The system allows for the sharing of processing power and peripheral resources, white at the same time providing excellent security features. 5. Hierarchical File System :  UNIX uses a hierarchile file structure to store information. This structure has the maximum flexibility in grouping information in a way that reflects its natural state. It allows for easy maintenance and efficient implementation. 6. UNIX shell : UNIX has a simple user interface called the shell that has the power to provide the services that the user wants. It protects the user from having to know the intricate hardware details. 7. Pipes and Filters : UNIX has facilities called Pipes and Filters which permit the user to create complex programs from simple programs. 8. Utilities : UNIX has over 200 utility programs for various functions. New utilities can be built effortlessly by combining existing utilities. 9. Software Development Tools : UNIX offers an excellent variety of tools for software development for all phases, from program editing to maintenance of software.
Views: 1270 Sada Learning Hub
Lesson - 10 : JDBC -  Type-2 Driver Connect with Oracle using JDBC
 
04:54
Native-API Partly-Java driver (Type-2) This type-2 driver converts jdbc calls into native calls to connect with database. Native calls are c language calls so this type-2 driver is a platform dependent. Oracle OCI driver: This oracle oci driver is oracle corporation provided type-2 category driver used for connecting with a database of oracle database server. Driver class name : oracle.jdbc.OracleDriver URL : jdbc:oracle:oci:@[database name] user name : system password : root
Views: 219 Sada Learning Hub
Lesson - 1 : OOPs - Data hiding, Abstraction and Encapsulation In OOPs
 
08:05
Data Hiding : Our internal data should not go out directly that is outside person can’t access our internal data directly. By using private modifier we can implement data hiding. Abstraction : Hide internal implementation and just highlight the set of services, is called abstraction. By using abstract classes and interfaces we can implement abstraction. Encapsulation : It is the process of Encapsulating data and corresponding methods into a single module. If any java class follows data hiding and abstraction such type of class is said to be encapsulated class. Encapsulation=Datahiding+Abstraction
Views: 3601 Sada Learning Hub
Lesson - 72 : Hibernate - Most important Differences Between Methods
 
11:00
Hibernate – Most important Differences Between Methods : Q)what is the difference between load() and get() methods? load() method performs lazy loading , but get() method performs early loading. If a given id is not exist in the database then load() methodthrows ObjectNotFound Exception, but get() method returns null. Q) Difference between update() and merge()? Update and merge methods are used to convert an object state from detached to persistent. Detached state means the state obtained by an object, after coming out of a session cache. In hibernate a session cache can allow only one object of a pojo class with the same identifier (id). If another one is going to enter into the cache with the same identifier then hibernate throes an exception. Q) Difference between save() and saveOrUpdate()? Whenever save() method is called then hibernate checks the id of the object is not available in database or not. If not available then the object will be solved, otherwise an exception will be thrown. Whenever saveOrUpdate() method is called, then hibernate performs save operation if the id does not exist in the database or performs update operation if id exist in database, but exception will not be thrown. Q) Difference between save() and Persist()? Save() method return type is serializable and persist() method return type is a void. If you call save() then it will save the object in database and also it returns the id of that object back to java application. But if you call persist() then it will save the object in database, but it does not return the id of that object. When generator class is other than assigned then id of the object will be generated by hibernate. If you want to get the id generated by the hibernate then we can use save method. In case of generator classis assigned , we manually assign id for the object. so we can call persist() in this case. In java if a method returns some value then it is optional to store return value into some variable. So when save() is called, it is optional to store the id returned by the method into some serializable object. Q) Differences between openSession and getCurrentSession? Session object : It always create new Session object Session object : It creates a new Session if not exists , else use same session which is in current hibernate context Flush and close : You need to explicitly flush and close session objects Flush and close : You do not need to flush and close session objects, it will be automatically taken care by Hibernate internally Performance : In single threaded environment , It is slower than getCurrentSession Performance : In single threaded environment , It is faster than getOpenSession Configuration : You do not need to configure any property to call this method Configuration : You need to configure additional property “hibernate.current_session_context_class” to call getCurrentSession method, otherwise it will throw exceptions. Hibernate Examples Project Github Link : https://github.com/SadaLearningHub1/Hibernate-Projects
Views: 280 Sada Learning Hub
Lesson - 16 : JSP - JSP Taglib Directive - body tag support class
 
18:02
Custom tags in JSP: A custom tag is an user defined tag. By using custom tags we can get the following. 1. We can reduce java code in jsp page 2. We can provide security in jsp 3. We can get logic reusability. Difference files required to create custom tags: There are the four files (minimum) 1. jsp page 2. tag handler class(java class) 3. tld file(tag library descriptor) 4. web.xml(deployment descriptor) Taghandler class: A tag handler class is a java class in which the custom tag logic is define. For each custom tag there should be an associated tag handler class. The number of custom tags in a jsp page equals to the number of tag handler classes. To create a tag handler class our java class should extends one of the following two classes. 1. TagSupport class 2. BodyTagSupport class ----------------------------------------------------------------------------------------------------------- Extending tag support class: If we want to define the logic for a custom tag start and a custom tag end then we override the following two methods of TagSupport class. 1. doStartTag() 2. doEndTag() Ex:public class HelloTag extends TagSupport Tld File: A tld file is like an xml file in which custom tag are configured.For each custom tag it's name and TagHandler class of the class and other related information will be configured. Taglib directive: In jsp page to define some prefix for our custom tags we use taglib directive in jsp.Using taglib directive we also assign a unique identification name for the tags started with same prefix.To add a prefix and a unique identification name we use two attributes. 1. URI 2. Prefix Sample Projects : https://github.com/SadaLearningHub1/JSP-Projects
Views: 477 Sada Learning Hub
Lesson - 66 : Python Advanced - Python CGI Programming : Passing Information Using POST Method
 
10:00
************************************************** before watching this video please whatch this video to configure your setup https://www.youtube.com/watch?v=CTvsjQi5oCM Python Core PlayList : https://www.youtube.com/watch?v=_laUbUtzMOs&list=PLxWzQv_1I_ACFomYYjF0HMqmu-w2pyqta Python Advanced PlayList : https://www.youtube.com/watch?v=RSKv-gSKrpA&list=PLxWzQv_1I_ACjp_DGDwHlTZlndqi4cu0_ ************************************************** Python CGI Programming : Passing Information Using POST Method: A generally more reliable method of passing information to a CGI program is the POST method. This packages the information in exactly the same way as GET methods, but instead of sending it as a text string after a ? in the URL it sends it as a separate message. This message comes into the CGI script in the form of the standard input. Below is same hello_get.py script which handles GET as well as POST method. Example : #!/usr/bin/python # Import modules for CGI handling import cgi, cgitb # Create instance of FieldStorage form = cgi.FieldStorage() # Get data from fields first_name = form.getvalue('first_name') last_name = form.getvalue('last_name') print "Content-type:text/html\r\n\r\n" print "<html>" print "<head>" print "<title>Hello - Second CGI Program</title>" print "</head>" print "<body>" print "<h2>Hello %s %s</h2>" % (first_name, last_name) print "</body>" print "</html>” <form action="/cgi-bin/hello_get.py" method="post"> First Name: <input type="text" name="first_name"><br /> Last Name: <input type="text" name="last_name" /> <input type="submit" value="Submit" /> </form> Sample Projects : https://github.com/SadaLearningHub1/Python3-Core-And-Advanced-Examples
Views: 381 Sada Learning Hub
Lesson - 07 : UNIX -  CMP and WC Command in Unix
 
04:49
NAME cmp - Compare two files, and if they differ, tells the first byte and line number where they differ. SYNOPSIS cmp options... FromFile [ToFile] DESCRIPTION 'cmp' reports the differences between two files character by character, instead of line by line. As a result, it is more useful than 'diff' for comparing binary files. For text files, 'cmp' is useful mainly when you want to know only whether two files are identical. For files that are identical, 'cmp' produces no output. When the files differ, by default, 'cmp' outputs the byte offset and line number where the first difference occurs. You can use the '-s' option to suppress that information, so that 'cmp' produces no output and reports whether the files differ using only its exit status. Unlike 'diff', 'cmp' cannot compare directories; it can only compare two files. The wc (word count) command in Unix/Linux operating systems is used to find out number of newline count, word count, byte and characters count in a files specified by the file arguments. The syntax of wc command as shown below. # wc [options] filenames The following are the options and usage provided by the command. wc -l : Prints the number of lines in a file. wc -w : prints the number of words in a file. wc -c : Displays the count of bytes in a file. wc -m : prints the count of characters from a file. wc -L : prints only the length of the longest line in a file.
Views: 641 Sada Learning Hub
Lesson - 01 : Web Security - Basic authentication
 
33:55
1. To apply security for a servlet or a jsp we have two approches 1. By the programmer 2. By the Container 2. Declarative Security Models 1. Basic Authentication 2. Digest Authentication 3. Form Based Authentication 4. Client Certificate Authentication Basic Authentication When a client request is made for a secured a servlet or jsp then a container will apply the basic authentication like the following 1. First a container display a dialog box on browser to accept username and password. 2. If username and password are not correct then again a dialog box will be displayed like this totally three chances are given to the client. 3. If three changes are failed then a message with 401 status will be displayed. If correct then the requested resource is allowed to access Tomcat manager application is an example for basic authentication model. Sample Projects : https://github.com/SadaLearningHub1/JSP-Projects
Views: 797 Sada Learning Hub
Lesson - 3 : Threads - Getting and setting name of a Thread in Java Programming Language
 
02:50
Getting and setting name of a Thread: 1. Every Thread in java has some name it may be provided explicitly by the programmer or automatically generated by JVM. 2. Thread class defines the following methods to get and set name of a Thread. Methods: 1) public final String getName() 2) public final void setName(String name)
Views: 224 Sada Learning Hub
Lesson - 10 : JSP - JSP Standard Action element - forward, param, params
 
14:45
Standard Actions - <jsp:forward>: This action tag is used to forward a request from one JSP page to another JSP page This action tag internally uses RequestDispatcher forward() method This action tag can be used to communicate JSP to JSP page : <jsp:forward page="b.jsp"/> JSP to servlet : <jsp:forward page="srv1"/> JSP to HTML : <jsp:forward page="b.html"/> Standard Actions - <jsp:param/params> <jsp:param> When a request is forwarded from one JSP to another then automatically request parameters are also forwarded to another JSP. For example: <jsp:param name="email" value="[email protected]"/> <jsp:params> If more than one <jsp:param> tag is used then we should put them in <jsp:params> tag. For example: <jsp:params> <jsp:params name="email" value="[email protected]"/> <jsp:params name="hobby" value="reading"/> </jsp:params> Sample Projects : https://github.com/SadaLearningHub1/JSP-Projects
Views: 337 Sada Learning Hub
Lesson - 09 : JDBC -  Type-1 Driver Connect with Oracle using JDBC
 
05:11
The JDBC-ODBC Bridge Driver The JDBC-ODBC Bridge driver is called the Type 1 driver. The JDBC-ODBC Bridge driver converts JDBC calls to Open Database Connectivity (ODBC) calls. ODBC is an open standard API to communicate with databases. Create a Student table start -- all programs -- select oracle database 10g Express edition -- select run sql command line --- Enter username and password --- ctreate table and insert values like the following queries Create a Data Source Name (DSN) Start -- settings -- control panel -- administrative tools -- data sources Click on datasource -- click on add -- select Oracle XE -- finish enter DSN name -- click select -- select database -- ok -- ok
Views: 188 Sada Learning Hub
Lesson - 03 : Web Security - Form Based Authentication
 
32:10
1. To apply security for a servlet or a jsp we have two approches 1. By the programmer 2. By the Container 2. Declarative Security Models 1. Basic Authentication 2. Digest Authentication 3. Form Based Authentication 4. Client Certificate Authentication Form Based Authentication: 1. Java services does not support digest authentication model. 2. Digest authentication model is almost equal to basic model but their internal algorithm different. 3. Basic model uses base64 encoding algorithm, but Digest model uses hashing algorithm(MD5). So digest model is more secure than basic model. 4. Form based authentication is also equal to basic authentication only, but in form based the container uses the html or jsp pages configured by the programmer to accept username and password and to display error message. 5. In form based authentication model the predefined servlet of server will accept the username and password from the login page. 7. While designing the login page we need to provide url pattern user name and password like the following a. url-pattern:j_security_check b. username:j_usrename c. password:j_password Sample Projects : https://github.com/SadaLearningHub1/JSP-Projects
Views: 537 Sada Learning Hub
Lesson - 39 : Python3 - Python File Handling : Renaming and Deleting Files
 
09:32
************************************************** Python Core PlayList : https://www.youtube.com/watch?v=_laUbUtzMOs&list=PLxWzQv_1I_ACFomYYjF0HMqmu-w2pyqta Python Advanced PlayList : https://www.youtube.com/watch?v=RSKv-gSKrpA&list=PLxWzQv_1I_ACjp_DGDwHlTZlndqi4cu0_ ************************************************** Python File Handling : Renaming and Deleting Files: Python os module provides methods that help you perform file-processing operations, such as renaming and deleting files. To use this module you need to import it first and then you can call any related functions. The rename() Method The rename() method takes two arguments, the current filename and the new filename. os.rename(current_file_name, new_file_name) The remove() Method You can use the remove() method to delete files by supplying the name of the file to be deleted as the argument. os.remove(file_name) Sample Projects : https://github.com/SadaLearningHub1/Python3-Core-And-Advanced-Examples
Views: 31 Sada Learning Hub
Lesson - 27 : Python3 - Python Function : Returning multiple values from Function
 
06:55
Python Function : Returning multiple values from Function: Functions are the re-usable pieces of code which helps us to organize structure of the code. We create functions so that we can run a set of statements multiple times during in the program without repeating ourselves. We can return multiple values from function using the return statement by separating them with  a comma ( ,). Multiple values are returned as tuples. def bigger(a, b):     if a > b:         return a, b     else:         return b, a   s = bigger(12, 100) print(s) print(type(s)) Sample Projects : https://github.com/SadaLearningHub1/Python3-Core-And-Advanced-Examples
Views: 124 Sada Learning Hub
Lesson - 02 : JDBC -  Types of Drivers in JDBC
 
10:52
JDBC supports four types of drivers, they are: JDBC-ODBC Bridge driver : In a Type 1 driver, a JDBC bridge is used to access ODBC drivers installed on each client machine. Using ODBC, requires configuring on your system a Data Source Name (DSN) that represents the target database. Native-API Partly-Java driver : In a Type 2 driver, JDBC API calls are converted into native C/C++ API calls, which are unique to the database. These drivers are typically provided by the database vendors and used in the same manner as the JDBC-ODBC Bridge. The vendor-specific driver must be installed on each client machine. JDBC-Net Pure-Java driver : In a Type 3 driver, a three-tier approach is used to access databases. The JDBC clients use standard network sockets to communicate with a middleware application server. The socket information is then translated by the middleware application server into the call format required by the DBMS, and forwarded to the database server. Native Protocol Pure-Java driver : In a Type 4 driver, a pure Java-based driver communicates directly with the vendor's database through socket connection. This is the highest performance driver available for the database and is usually provided by the vendor itself.
Views: 477 Sada Learning Hub
Lesson - 30 : Hibernate - Create connection pool in Glassfish Server
 
14:18
Steps to configure a connection pool in glassfish3.x: Glassfish 3.x server is automatically installed along with netbeans 7.x IDE. We can find the glassfish server installed with IDE in c:\program files folde 1. Copy driver jar file i.e ojdbc14.jar into c:\program files\glassfish-3.1.2.2\glassfish\domains\domain1\lib\ext folder. 2. Start the glassfish server write the on command line c:\program files\glassfish-3.1.2.2\glassfish\bin>as admin start-domain domain. 3. Open the browser and type the following request http://localhost:4848. 4. At left side expand resources->expand jdbc->select jdbc connection pool ->click on new ->enter the following details. 1. Pool name : samplepool 2. Resource type : javax.sql.DataSource 3. Database Driver Vendor : oracle->click on next 5. Enter the following three additional properties 1. User : system 2. Password : tiger 3. URL:jdbc:oracle:thin :@localhost:1521:orcl3 -> finish. 6. click on pool name(samplepool)->click on ping button->if ping succeded then the pool is created successfully, otherwise pool is not created. 7. At left side click on jdbc resources->new button->enter JNDI name:oraclejndi->pool name:samplepool->ok. Hibernate Examples Project Github Link : https://github.com/SadaLearningHub1/Hibernate-Projects
Views: 593 Sada Learning Hub
JSP Interview Questions – 226 To 240 out of 255
 
22:29
This video can help you to learn JSP Technology interview questions with explanation Q-226) What are scripting elements? Q-227) What is a scriptlet? Q-228) What are JSP declarations? Q-229) What is a JSP expression? Q-230) How is scripting disabled? Q-231) What is a JSP ? What is it used for ? What do you understand by the term JSP translation phase or compilation phase? Q-232) Explain the life cycle methods of a JSP ? Q-233) What are different type of scripting elements? Q-234) What are the different scope values or what are the different scope values for "jsp:usebean"? Q-235) What are the differences between static and a dynamic include? Q-236) Is JSP variable declaration thread safe? Q-237) Explain JSP URL mapping? What is URL hiding or protecting the JSP page? Q-238) What are custom tags? Explain how to build custom tags? Q-239) What is a Expression? Q-240) Difference between forward and sendRedirect? Sample Projects : https://github.com/SadaLearningHub1/JSP-Projects
Views: 23 Sada Learning Hub
Lesson - 28 : JDBC -  How to Connect the Database using Properties files in JDBC
 
07:00
While creating JDBC applications we directly hard code connection properties in an application . It has the following properties 1. When we want to change the driver in an application then we need to reopen the java code and then we need to modify the code. 2. when we do changes in java code then we need to recompile then we need to reload application into server in some times we need to restart the server. 3. If want to change from one database to another then again we need to do the above two steps. To overcome the above problem we got the properties file usage in jdbc programming. A properties file is a text file which contains data in key = value pair format. This file can be stored with extension .properties A java program reads the values of properties file using associated keys at run time. So a java program will become as independent of databases and independent drivers.
Views: 140 Sada Learning Hub
Lesson - 14 : JSP - JSP Bean scopes
 
19:46
There are four types of bean scopes they are 1. page 2. request 3. session 4. application Sample Projects : https://github.com/SadaLearningHub1/JSP-Projects
Views: 202 Sada Learning Hub
Lesson - 12 : JDBC -  Type-4 Driver Connect with MySql using JDBC
 
05:38
Native Protocol Pure-Java driver (Type-4) This type-4 driver is a pure java driver it means this driver software is 100% implemented in java programming. We call this type- 4 driver is portable driver because it is a platform independent driver. This type-4 driver uses a native protocol accepting by a server to connect with the database server. As a java programmer we need to supply the following three information's in the url of the jdbc driver . IP address Port number Database name or service ID Ex : jdbc:mysql://localhost:3306/test
Views: 158 Sada Learning Hub
Lesson - 50 : Hibernate - One To Many Delete Child Form Parent using XML and Annotation Config
 
24:02
Hibernate – Assotations/Relationship : Remove a Child From a Parent Object In OneTo Many : To remove one child object of a parent object, the following steos are required. 1. load parent object. 2. Read a collection of child objects from parent. 3. Load child objects. 4. Remove a child object from collection with in a transaction. For ex: The following code adds one more customers to a vendor. 1. Vendor v = (Vendor)session.get(Vendor.class,111); 2. Set set = v.getCustomers(); 3. Customer c = (Customer)session.get(Customer.class, 504); 4.Transaction tx = session.beginTransaction(); set.remove(c); tx.commit(); Hibernate Examples Project Github Link : https://github.com/SadaLearningHub1/Hibernate-Projects
Views: 377 Sada Learning Hub
Servlet Interview Questions –  50 out of 180
 
09:50
This video can help you to learn Servlet Technology interview questions with explanation Q) What is HTTPServletRequest class? Q) What is HTTPServletResponse class? Q) How to write html contents using servlets? Q) How to send an authentication error from a servlet? Q) How to redirect a request from a servlet to another servlet? Q) How sendRedirect method works? Q) How sendError method works? Q) What are servlets filters? Q) Name some of the servlets filters? Q) How to do servlet filter mapping?
Views: 751 Sada Learning Hub
Lesson - 67 : Python CGI:Passing Checkbox, Radio Button, Text Area, Drop Down Data to CGI Program
 
14:37
************************************************** before watching this video please whatch this video to configure your setup https://www.youtube.com/watch?v=CTvsjQi5oCM Python Core PlayList : https://www.youtube.com/watch?v=_laUbUtzMOs&list=PLxWzQv_1I_ACFomYYjF0HMqmu-w2pyqta Python Advanced PlayList : https://www.youtube.com/watch?v=RSKv-gSKrpA&list=PLxWzQv_1I_ACjp_DGDwHlTZlndqi4cu0_ ************************************************** Python CGI Programming : Passing Checkbox, Radio Button, Text Area, Drop Down box to CGI programming: Passing Checkbox Data to CGI Program : Checkboxes are used when more than one option is required to be selected. Passing Radio Button Data to CGI Program : Radio Buttons are used when only one option is required to be selected. Passing Text Area Data to CGI Program : TEXTAREA element is used when multiline text has to be passed to the CGI Program. Passing Drop Down Box Data to CGI Program : Drop Down Box is used when we have many options available but only one or two will be selected. Sample Projects : https://github.com/SadaLearningHub1/Python3-Core-And-Advanced-Examples
Views: 552 Sada Learning Hub
Lesson - 35 : Hibernate - Non-select operation in HQL using XML and Annotation based Configuration
 
23:17
Hibernate Query Language(HQL): 1. The object oriented from SQL is called HQL. 2. The SQL queries are database dependent. It means some modifications are required in SQL query, when the database is changed to one to another. 3. To get out of this problem in hibernate we got HQL. 4. HQL queries are database independent. Because the HQL query is internally converted to equivalent SQL query by hibernate based on the database at run time. 5. HQL queries are constructed by replacing columns names with properties names and table names with pojo class names in a SQL query. 6. HQL can be used to perform both select and non select operations on a database. Hibernate Query Language(HQL) Non select operation: 1. With HQL we can also perform non select operations on a database. 2. To execute a non select operation we need to call executeUpdate()of Query interface. 3. For non select operation we must begin a transaction of hibernate. It is optional for select operation. 4. The following is a code for updating the employees of deptno=20 with salary=5000 Query qry = session.createQuery("update Employeee set e.employeeSal=5000 where e.deptNumber = 20); Transaction tx = session.beginTransaction(); int i = qry.executeUpdate(); tx.commit(); Hibernate Query Language(HQL) Insert operation: 1. The insert operation is not like update and delete operation of HQL. It means we can not directly insert multiple rows or objects into a database by creating an insert operation. 2. The insert operation in HQL is nothing but copying either full or partial object of one pojo class to another pojo class. 3. While constructing this insert operation the number of destination pojo class properties and the number of sources pojo class properties in the command should be equal. 4. Example: Query qry = session.createQuery("insert into Employee1(empId,ename) select e.employeeId, e.employeeName from Employee e") The above insert operation copies the partial objects of Employee class to Employee1 Query qry = session.createQuery("insert into Employee1(empId,ename,empSal,deptno) select e.employeeId, e.employeeName e.employeeSal,e.deptNumber from Employee e") The above insert operation copies the full objects of Employee class to Employee1 Hibernate Query Language(HQL) Insert operation: 1. Using HQL query we can also find the result of aggregate functions on objects. But it is not recommended to use HQL. The reason is the query will become as database dependent. 2. For example if we want to find sum and average of salaries of all employees objects then we can use the following code. Query qry = session.createQuery("select sum(e.employeeSal), avg(e.employeeSal) from Employee e"); List list = qry.list(); Object obj[] =(Object[])list.get(0); System.out.println("sum= "+obj[0]); System.out.println("avg= "+obj[1]); Hibernate Examples Project Github Link : https://github.com/SadaLearningHub1/Hibernate-Projects
Views: 41 Sada Learning Hub
Lesson - 15 : JDBC -  How to insert and select image from Database
 
09:34
Inserting a picture is nothing but storing binary data(bytes) of the picture into a database table.In JDBC we need preparestatement interface for transferring binary data from java program to database.If we want to insert a picture into a table then that table column should be of blob(binary large object) type.The following are the steps required for inserting a picture 1. Creating a java.io.File object for the picture. 2. Create java.io.FileInputStream object for reading the binary data from the file. 3. Find size of the picture file. 4. Call setBinaryStream() for inserting binarydata of the picture into an SQL statement.
Views: 1086 Sada Learning Hub
Lesson - 15 : Hibernate - Second Level cache using XML and Annotation based Configuration
 
48:54
1. Hibernate as two levels of caching A) First-level or session level or local B) second level or factory level or global 2. First level cache is automatic in hibernate. 3. First level cache is not sharable across all sessions. It means each session has it's own cache and the cache of one session can not be sharable by another session. 4. Second level cache is a factory level. So it is sharable across all sessions. 5. In hibernate first level cache is not in the hands of a programmer. It is automatically enabled when a session is opened and disable when session is closed. 6. Second level cache of hibernate can be enabled or disabled by the programmer. 7. To add second level cache we need a third party provider class. 8. To enable second level cache : <property name='hibernate.cache.use_second_level_cache'>true</property> <property name='hibernate.cache.provider_class'>fully qualified provider class name</property> 9. To enable second level cache in a hibernate application we need to congfigure one of the following four cache provider class in hibernate configuration file. A) org.hibernate.EhCacheProvider B) org.hibernate.OSCacheProvider C) org.hibernate.SwarmCacheProvider D) org.hibernate.TreeCacheProvider To allow a pojo class objects into second level cache weneed to configure <cache> tag in mapping file. For example to allow product class object into factory level cache we should configure <cache> like the following <hibernate-mapping> <class name='Product' table='product'> <cache usage='read-only'/> <id../> <property../> </class> </hibernate-mapping> The values of usage attribute of <cache> tag are 1. read-only : Allows only read operations on a pojo class objects stored in factory cache. 2. read-write : Allows both read and write operations on a pojo class object stored in factory cache. 3. nonstrict-read-write : Purely use in distributed transactions. 4. Transactional : Purely use in distributed transactions. Hibernate Examples Project Github Link : https://github.com/SadaLearningHub1/Hibernate-Projects
Views: 383 Sada Learning Hub
Lesson - 71 : Hibernate - Most Important Methods
 
11:22
Hibernate – Most Important Methods: buildSessionFactory() : Create a SessionFactory using the properties and mappings in this configuration. The SessionFactory will be immutable, so changes made to this Configuration after building the SessionFactory will not affect it. openSession() : SessionFactory.openSession() always opens a new session that you have to close once you are done with the operations. beginTransaction() : Begin a unit of work and return the associated Transaction object. If a new underlying transaction is required, begin the transaction. Otherwise continue the new work in the context of the existing underlying transaction. commit() : Commit this transaction. close() : End the session by releasing the JDBC connection and cleaning up. load(Class clazz,serializable id) : Return the persistent instance of the given entity class with the given identifier, assuming that the instance exists. get(Class clazz,serializable id) : Return the persistent instance of the given entity class with the given identifier, or null if there is no such persistent instance. persist() : Make a transient instance persistent. save() : Persist the given transient instance, first assigning a generated identifier. saveOrUpdate() : Either save(Object) or update(Object) the given instance, depending upon resolution of the unsaved-value checks (see the manual for discussion of unsaved-value checking). update() : Update the persistent instance with the identifier of the given detached instance. merge() : Copy the state of the given object onto the persistent object with the same identifier. evict() : Remove this instance from the session cache. clear() : Completely clear the session. delete() : Remove a persistent instance from the datastore. createQuery() : Create a Query instance for the given HQL query string. list() : Return the query results as a List. executeUpdate() : Execute the update or delete statement. createCriteria() : Create Criteria instance for the given class (entity or subclasses/implementors) createSQLQuery() : Create a SQLQuery instance for the given SQL query string. getnamedQuery() : Create a Query instance for the named query string defined in the metadata. Hibernate Examples Project Github Link : https://github.com/SadaLearningHub1/Hibernate-Projects
Views: 195 Sada Learning Hub
Lesson - 4 : Threads - Thread Priorities in Java Programming
 
05:39
1. Every Thread in java has some priority it may be default priority generated by JVM (or) explicitly provided by the programmer. 2. The valid range of Thread priorities is 1 to 10[but not 0 to 10] where 1 is the least priority and 10 is highest priority. 3. Thread class defines the following constants to represent some standard priorities. 1) Thread. MIN_PRIORITY----------1 2) Thread. MAX_PRIORITY----------10 3) Thread. NORM_PRIORITY--------5
Views: 264 Sada Learning Hub
JSP Interview Questions – 01 To 15 out of 255
 
25:48
This video can help you to learn JSP Technology interview questions with explanation Q-1) What is JSP? Q-2) What are advantages of using JSP? Q-3) What are the advantages of JSP over Active Server Pages (ASP)? Q-4) What are the advantages of JSP over Pure Servlets? Q-5) What are the advantages of JSP over Server-Side Includes (SSI)? Q-6) What are the advantages of JSP over JavaScript? Q-7) What are the advantages of JSP over Static HTML? Q-8) Explain lifecycle of a JSP? Q-9) What is a sciptlet in JSP and what is its syntax? Q-10) What are JSP declarations? Q-11) What are JSP expressions? Q-12) What are JSP comments? Q-13) What are JSP Directives? Q-14) What are the types of directive tags? Q-15) What are JSP actions? Sample Projects : https://github.com/SadaLearningHub1/JSP-Projects
Views: 599 Sada Learning Hub
Lesson - 11 : JSP - JSP Standard Action element - include
 
12:27
Standard Actions - <jsp:include> <jsp:include> This action tag is used to include response of one jsp page to another jsp page at run time. In jsp this type of including is called as run time or dynamic including. Sample Projects : https://github.com/SadaLearningHub1/JSP-Projects
Views: 202 Sada Learning Hub
Lesson - 20 : JSP - JSTL Core Tags in JSP
 
23:58
To reduce java code from a jsp page in jsp we have standard actions custom tags and expression language. Even though these many tags are given but still the java code is not completely reduce from a jsp page. In order to remove the java code from a jsppage sun micro system add a set of tags additionally to the jsp technology in jsp1.2. The tags added by sun for jsp technology are called JSTL tags. The difference between jsp tag and JSTL tag is a jsp tag is provided by sun and it's implementations are given by vendor but JSTL a tag with implementation is given by sun microsystem. The JSTL tags are divided into five categories. 1. Core tags 2. SQL tags 3. XML tags 4. Function tags 5. Formating tags JSTL Core Tags in JSP: 1. <c:out> : Like <%= ... >, but for expressions. 2. <c:set > : Sets the result of an expression evaluation in a 'scope' 3. <c:remove > : Removes a scoped variable (from a particular scope, if specified). 4. <c:catch> : Catches any Throwable that occurs in its body and optionally exposes it. 5. <c:if> : Simple conditional tag which evalutes its body if the supplied condition is true. 6. <c:choose> : Simple conditional tag that establishes a context for mutually exclusive conditional operations, marked by <when> and <otherwise>. 7. <c:when> : Subtag of <choose> that includes its body if its condition evalutes to 'true'. 8. <c:otherwise > : Subtag of <choose> that follows the <when> tags and runs only if all of the prior conditions evaluated to 'false'. 9. <c:import> : Retrieves an absolute or relative URL and exposes its contents to either the page, a String in 'var', or a Reader in 'varReader'. 10. <c:forEach > : The basic iteration tag, accepting many different collection types and supporting subsetting and other functionality . 11. <c:forTokens> : Iterates over tokens, separated by the supplied delimeters. 12. <c:param> : Adds a parameter to a containing 'import' tag's URL. 13. <c:redirect> : Redirects to a new URL. 14. <c:url> : Creates a URL with optional query parameters Sample Projects : https://github.com/SadaLearningHub1/JSP-Projects
Views: 792 Sada Learning Hub
Lesson - 1 : Enum - Enum Introduction in Java Programming Language
 
04:06
Java Enum Examples. You should always use enums when a variable (especially a method parameter) can only take one out of a small set of possible values. Examples would be things like type constants (contract status: “permanent”, “temp”, “apprentice”), or flags (“execute now”, “defer execution”).
Views: 104 Sada Learning Hub
Lesson - 59 : Python Advanced - Python  Database Access : Connecting to Oracle Databases
 
15:49
************************************************** Python Core PlayList : https://www.youtube.com/watch?v=_laUbUtzMOs&list=PLxWzQv_1I_ACFomYYjF0HMqmu-w2pyqta Python Advanced PlayList : https://www.youtube.com/watch?v=RSKv-gSKrpA&list=PLxWzQv_1I_ACjp_DGDwHlTZlndqi4cu0_ ************************************************** Python Database Access : Connecting to Oracle Databases: Connecting to Oracle To create a connection to Oracle, perform the following steps: Review the code as follows, which is contained in the connect.py file in the $HOME directory. import cx_Oracle con = cx_Oracle.connect('pythonhol/[email protected]/orcl') print con.version con.close() The cx_Oracle module is imported to provide the API for accessing the Oracle database. Many inbuilt and third party modules can be included in this way in Python scripts. The connect() method is passed the username "pythonhol", the password "welcome" and the connection string. In this case, Oracle's Easy Connect connection string syntax is used. It consists of the IP of your machine and the DB service name "orcl". The close() method closes the connection. Any connections not explicitly closed will be automatically released when the script ends. Sample Projects : https://github.com/SadaLearningHub1/Python3-Core-And-Advanced-Examples
Views: 1597 Sada Learning Hub
Lesson - 15 : Servlet - Setting MIME Types in Servlet
 
21:00
MIME : Multipurpose Internet Mail Extension : MIME types are used to inform the browser about the content type of the response.MIME type setting is also called content type setting.If we do not set any content type then by default content type set automatically is "text/html". To set a content type for a response in a servlet then we need to call "setContentType()". Some of the MIME types are 1. text/html 2. text/plain 3. text/xml 4. application/MSWord 5. application/vnd.MSExcel 6. application/vnd.MSPowerpoint 7. application/pdf 8. image/gif 9. image/jpeg etc...
Views: 415 Sada Learning Hub
Lesson - 3 : i18n - DateFormat class in Internationalization in Java Programming
 
09:36
public abstract class DateFormat extends Format DateFormat is an abstract class for date/time formatting subclasses which formats and parses dates or time in a language-independent manner. The date/time formatting subclass, such as SimpleDateFormat, allows for formatting (i.e., date -> text), parsing (text -> date), and normalization. The date is represented as a Date object or as the milliseconds since January 1, 1970, 00:00:00 GMT. DateFormat provides many class methods for obtaining default date/time formatters based on the default or a given locale and a number of formatting styles. The formatting styles include FULL, LONG, MEDIUM, and SHORT. More detail and examples of using these styles are provided in the method descriptions. DateFormat helps you to format and parse dates for any locale. Your code can be completely independent of the locale conventions for months, days of the week, or even the calendar format: lunar vs. solar. To format a date for the current Locale, use one of the static factory methods: myString = DateFormat.getDateInstance().format(myDate); If you are formatting multiple dates, it is more efficient to get the format and use it multiple times so that the system doesn't have to fetch the information about the local language and country conventions multiple times. DateFormat df = DateFormat.getDateInstance(); for (int i = 0; i < myDate.length; ++i) { output.println(df.format(myDate[i]) + "; "); } To format a date for a different Locale, specify it in the call to getDateInstance(). DateFormat df = DateFormat.getDateInstance(DateFormat.LONG, Locale.FRANCE); You can use a DateFormat to parse also. myDate = df.parse(myString); Use getDateInstance to get the normal date format for that country. There are other static factory methods available. Use getTimeInstance to get the time format for that country. Use getDateTimeInstance to get a date and time format. You can pass in different options to these factory methods to control the length of the result; from SHORT to MEDIUM to LONG to FULL. The exact result depends on the locale, but generally: SHORT is completely numeric, such as 12.13.52 or 3:30pm MEDIUM is longer, such as Jan 12, 1952 LONG is longer, such as January 12, 1952 or 3:30:32pm FULL is pretty completely specified, such as Tuesday, April 12, 1952 AD or 3:30:42pm PST. You can also set the time zone on the format if you wish. If you want even more control over the format or parsing, (or want to give your users more control), you can try casting the DateFormat you get from the factory methods to a SimpleDateFormat. This will work for the majority of countries; just remember to put it in a try block in case you encounter an unusual one. You can also use forms of the parse and format methods with ParsePosition and FieldPosition to allow you to progressively parse through pieces of a string. align any particular field, or find out where it is for selection on the screen.
Views: 177 Sada Learning Hub