Datatables with Spring MVC

This tutorial explains the implementation of Datatables with Spring MVC. Most of you all will be aware of usage of data tables in a web application, here we will see how to integrate it with Spring MVC application. This is like any other web page that we create in our MVC application, the only different thing here is using jQuery’s data table to display the data in a tabular form and with additional options like paging, searching and sorting. Continue reading “Datatables with Spring MVC”

Convert String to XML file in Java.

Hello Friends,

In the previous example we have seen how to convert XMl to String. Now this example will do the exact opposite of the previous one i.e. convert from String to XML. We will now try to convert the String stream into an XML file object. Here is the simple code for that.

Continue reading “Convert String to XML file in Java.”

Convert XML file to String Object in Java.

Hello Friends,

This is one of my tutorials in java with respect to XML, to convert xml file to string. Sometimes while working with web-services we may come accross with the requirements of sending the updates to the web-service via a XML file. For the same you may need to convert the XML file into a stream of String (however we can pass XML file to web-services for updation). But, at some times if you need to update the values or attributes of the XML and then send it as String then following code will do it for you.

Continue reading “Convert XML file to String Object in Java.”

Collections in Java Part III : List

Hello Friends,

This is part III for java collections tutorial. Earlier we have discussed regarding SET collection interface in part II. In this, we will be focusing on an interface that is used when the sequence of the elements needs to be maintained, yes that’s right its LIST interface. List interface in Java Collection Framework also extends the base interface, Collection.  Continue reading “Collections in Java Part III : List”

Java Print Triangle Example.

Hello Friends,

This is one of the basic examples for newbies who are still in the learning phase. 🙂 Most of you may get an assignment to print triangle of * or numbers or serial number etc. So, this example if for all those guys n gals. In this example we will print a Right angle triangle where we will print the sequence something like:

1
23
456
78910

Continue reading “Java Print Triangle Example.”

FDMA vs TDMA.

Hello Friends,

This is regarding the terms from Computer Networks TDMA and FDMA. These two pre-3G technologies that have been utilized to improve the performance of the 2G network.

FDMA (Frequency Division Multiplexing Access):

FDMA is a method of dividing a single band into 30 discrete channels. Each channel would then be capable of handling separate traffic, whether it’s a call or a data transfer. This is a higher level of multiplexing and should not be confused with FDM (Frequency Division Multiplexing) which is a low level multiplexing process and occurs on the physical layer. FDMA hardware includes high performance filters that also help it in avoiding near-far problems which can deteriorate the call quality. Continue reading “FDMA vs TDMA.”

Jsp include file

Hello Friends,

This is one of the simple tutorials on jsp include file. Most of the time in any of the web application we need some part of the application on almost each of the pages. So, writing the code in each of the pages is really tedious and is not the best practice. For example, if we have a web application where we have to use the Header code and Footer code on every page then its the best practice to write the code once in a separate file and then import that file or its contents into the page where we want it to be displayed.

Continue reading “Jsp include file”

Login Example: JSP and Servlets: Part II.

Hello Friends,

This is part II of jsp and servlets login example. Check Part I here.

Step 4) Now, we need to create a Servlet file for the redirection of the jsp pages. In the src folder under the package code2java, add the Servlet file and name it as LoginServlet. As discussed earlier this servlet file will get the user details from the Bean file and then it will create a Session for that user only if the user is a valid user. And accordingly it will redirect to the respective jsp pages. You can use the default code which Eclipse generates while Servlet creation, the only change you need to do is in doGet() method. Continue reading “Login Example: JSP and Servlets: Part II.”

Login Example – JSP and Servlets: Part I.

Hello Friends,

This is one of the tutorials on JSP and Servlets. In this we will discuss and create a simple login application using servlets and JSP where we will connect to the DB for the user credentials and then authenticate the users accordingly. First of all we will discuss about what we will need for this.

JSP Pages:

We will create three JSP pages which will be the only viewable parts of our code. The three pages will be as Login Page, Login Success page and the Invalid Login page. Continue reading “Login Example – JSP and Servlets: Part I.”