Saturday, February 16, 2019

Form Handling in Spring MVC

                            Form handling is made easy in spring MVC with the help of Spring Tag Library. I have given detailed step-by-step process for form handling. Here, i have taken simple login form as an example.

                           This video covers following topics.
  1. Introduction to Form Binding.
  2. How to achieve Form Binding Using Spring Tag Libraries.
  3. How to bind Java Beans to Form.
  4. How to get Form Data in Controller.
  5. How to Debug Spring Application in Eclipse.


                                    Full Source Code available below



Sunday, February 10, 2019

Spring MVC Example for Beginners : E commerce Application

                      In the followingVideo lectures, I explained how to Set-Up Basic Spring MVC Application using Spring Boot and also developed  small E commerce application.

                    First Video focuses on setting up Spring MVC project using spring boot. Here, i download sample project from  After downloading, import project contents into your eclipse workspace ( or any other IDE). Imported project is Maven-ised, and you can notice that it includes all dependent jars required for spring.  Spring Boot also comes with embedded tomcat server. So, you dont have straight away run web-application as a normal application with out worrying about downloading any other external web server/app container.

         For Further details on how to setup, refer below video.


In Second video,  I have explained a step by step process for developing online store web-application.
  1. Create a Model, Controller and Views.
  2. Map HTTP URL to Controller using RequestMapping and GetMapping
  3. Display all Products information available in store.
  4. Display Specific Product Information using PathVariable
  5. Taking dynamic variable input from URL
  6. Introducing Service Layer in MVC architecture

Project is still-partial,So Please subscribe for further updates.

                                           Full Source Code is available below


Tuesday, January 15, 2019

Spring 5 Tutorial for Beginners

                                     Spring is a lightweight framework  for developing Java Applications ( standalone, web, enterprise, web Services, micro services). Spring is very popular because its easy to integrate application code with  spring framework. With Spring boot 2.0 its even more easier.

                                    Spring world provides so many modules such as such as spring core, spring web, spring data access, spring cloud and so many other modules. All of these modules are developed by following basic design pattern i.e Dependency Injection

                                  In the following video i have given detailed description on below concepts. 

  1.  What is Spring. 
  2.  Spring Modules.
  3.  Inversion of Control
  4.  Dependency Injection and auto wiring
  5.  Dependency Injection Types - Setter Injection, Constructor 
  6.  Injection and Field Injection.
  7.  Bean Scopes - Prototype and Singleton.


Sunday, August 6, 2017


                There are Multiple ways to parse XML in Oracle but in this post i will show how to parse using EXTRACTVALUE and  XMLTABLE.  Let's Suppose you have an following  XML stored  in a column MSG in table TMP.

   <student id='123'>


             Now if you want to extract <name> value, you will use a function like below.

from TMP;

                            Above function takes MSG ( XML source ) in XMLTYPE format.( Since my MSG column is varchar i converted to XMLTYPE ) and returns the value specified in path (XPATH). I have specified absolute path here,you can also specify relative path using //name. 

                           See the following video for more detailed explanation on EXTRACVALUE and XMLTABLE 


                             EXTRACTVALUE can return only one single value. If you want to render XML as table structure like rows and columns you have to use XMLTABLE. It will create virtual table based on specification. Syntax for XMLTABLE table is as below.

select students.* from TMP,XMLTABLE(
"id" NUMBER PATH '@id',
"name" VARCHAR2(20)  PATH 'name',
"marks"  NUMBER PATH 'marks'
) students;

   In above query '/students/student' is row specifier XPATH, meaning now of student tags=no of rows.  Under each Student element  id,name and marks are columns. 

                    Advantage of XMLTABLE is that it can dynamically return all the rows whereas EXTARCTVALUE can only return single row.


Saturday, April 16, 2016

Install and Configure SSH service in Linux

What is SSH..?

                        Have You Ever Wondered,How to remotely connect to your server ? Most of the time, we will never touch server once it is configured.It's gonna stag in server room. All the necessary actions to ther server like stopping and starting web server,Installing new Packages,Changing host entries all done via remote access.


                           So,Today in this post we are gonna talk about how to set up remote access using SSH. On a high level,SSH ( Secure SHell) is a standard  protocol that allows  remote connection.Once SSH service is installed in your linux box, you can access that machine from any location providing a proper authentication. 


                     Setting up SSH service is very straight forward. We just have to install a program called openSSH. Its a program that actually implements SSH protocol. Based on your linux distro,you have to type particular command and install the program.

       Debain / Ubuntu
                        sudo apt-get install openssh-server 
     Fedora / RedHat 
                                yum install openssh-server 

Start/Stop/Restart/Checking status of SSH service

                               If you wonder whether your server is already running or if you want start/stop/restart the service use the following command line

                   1.Know the status
                                          service ssh status 
                   2.Restart the service
                                      service ssh  restart
                   3.Start/Stop service
                                         service ssh stop
                                         service ssh start

Configure openSSH

                    By default service is gonna run with basic configuration.To override default configurations like port number (22), Authentication types, Banner Message etc,You have to change sshd_config  file which is located in /etc/ssh

                  For Detailed description on installation and configuration proceed with this video. 


Wednesday, February 11, 2015

How to Connect MongoDB server with PHP

 Requirements :

  1. Basic Knowledge of MongoDB
  2. MongoDB Server
  3. PHP driver for MongoDB

Start the server:

1.In windows, go to cmd and navigate to bin folder in mongodb    
  installation location.
2.Execute " mongod " command to start the server.

      If you haven't installed mongodb server before.check my videos MongoDB installation in windows  and php driver setup for mongodb


Explanation :

          $connection=new MongoClient();
                    MongoClient()  by default creats a connection to server at localhost:27017.If you want to create a connection to remote server then you can specify it as arguments.

     This piece of code selects the database named university.If the database haven't created before,mongodb will automaticaly creates a databse. 

$student_collection= $db->student;
       same as above line,but this line creats (if first time ) and also selects collection(table in RDMS) named dont have to specify any schema ,mongodb has dynamic schema feature.
     Finally,create an array with required fields.Insert created array (document) in to collection using insert() function.

Video Tutorial

Wednesday, February 4, 2015

How to Clear Written Exam for Interviews

                Without any doubt, Interview is an important aspect in each and every student life.Thorough preparation is must and should to clear an interview.But the point is how to prepare.? what to prepare..?.Well , Each and Every company has their own method of selection process. Some companies expect  you to write complex algorithms whereas some companies concentrate on your basic skills.No mater  which company you are attending,these are few concepts you must know (for IT companies).


1. Basic Arithmetic

                            You should revise your good old school days math problems.Concentrate more on basic skills like percentage,profit and loss, LCM and HCF , Problems on trains , Average ,simple and compound interest ,Logarithms etc. Have a basic knowledge on each and every above mentioned concepts.

    online preparation : IndianBix
   Ebook : Quantitative Aptitude By R.S Aggarwal

2.Verbal Ability         

                   Must necessary skill for every company. Don't confuse communicative skills with verbal ability. some people may be good at communication but they may not posses verbal skills. Though its not possible to learn vocabulary  with in weeks, you can still give it a try. If you have strong English background and if you are really good at grammar,vocabulary then you concentrate on other sections.

3.Logical Reasoning                     

                      Pretty much easy section if you are little bit intelligent. Relationships, Directions, Deductions, Series..etc  comes under this section. Key thing in this area is to answer as quickly as possible. Fastness and Accuracy comes with practice.So i suggest you to practice this section as much as you can.

4.Knowledge on Core Concepts

                                         Some companies may add core concepts question as last section. If you are attending IT companies then make sure you have sound knowledge on Pointers, Data Structures ,Data Base, Algorithms. Depth of preparation may depends on company you are attending. Some big companies like flipkart, eBay concentrates more on data structures and algorithms.I suggest you to go through previous papers of respective company before starting preparation.

Tips : 

  1. Do not neglect any section.Most of the companies maintain sectional cut-offs which means if you don't qualify in any single section then you wont qualify the written round.
  2. Take Mock online tests and track the performance.Concentrate more on areas you are lagging.
  3. Fastness and Accuracy is the key point rather than just answering.
  4. While writing exam don't just stick to a single question for longer time.If you feel particular question is killing time then better go for next question.
  5. ......... Practice Practice Practice...........


© 2013 YRR Help. All rights resevered. Designed by Templateism

Back To Top