Posts

Quick-Start a Springboot Project

Image
Want to write a back end web-service in Java and don’t know where to start? You’re at the right place. By the end of this article, you would have a springboot project running on a tomcat server, and you would also be able to create projects later without any difficulty.
I have worked with spring before, and the biggest advantage of springboot, at least when starting a new project, is that we don’t have to add entries and mappings for all our pages. In spring, the web.xml needs to contain all the mappings, which is not the case with springboot, which doesn’t have a web.xml file at all (it handles things for us). So let’s get started with creating a project.
Head over to start.spring.io and enter your project details, mainly the group id and artifact id. Under dependencies, make sure you add spring-starter-web, and you could add DevTools for faster reloading. You can also select a database dependency such as MySQL or PostgreSQL in case you plan on using it.
Once done, click on the Gene…

Creating a Maven Web-Service in IntelliJ

Image
Here is a step-by-step procedure on making a Maven web-service using Java in the IntelliJ Environment.
Open IntelliJ and go to File > New project. In the popup that opens, select Maven on the left and check the checkbox Create from archetype and select maven-archetype-webapp.


Give your project a group-id and an artifact id. The group id could be something like com.testpackage, and the artifact id something like testproject. Leave all other settings as they are and continue to finish. This should create a new project.
In the pom.xml (or testproject.xml) file, add the dependencies for rest-easy.
Add the jetty plugin to the plugins block. We would be using the jetty server to run our web-service. (Note: This documentation assumes that you have maven installed and added to your PATH variable, such that you can use the mvn command from the terminal.)

Creating a Mail Server Using Webmin

Image
Here is the complete step-by-step procedure on how to create a mail server.

(a)  Host a website from the server domainname.com and create a child of that website* called mail.domainname.com. (For help refer to )        *For the document root of the child, enter : /usr/shared/squirrelmail


(b)  Create a user on the server from which you can later login into the mail server.
(c)  In the Zone List within domainname.com, go to Mail Server.
(d)  Within the mail server, add/edit the following fields : 1. Mail Server : mail.domainname.com. 2. Priority : 10 Note : Leave the Name field blank. Click on Create and then Save.
(e)  Go to the Zone List of domainname.com and Click on Apply Changes. Alternately, you can go to the server terminal and use the command #service named restart.

Hosting a Website and Creating a DNS Server

What is a Domain Name System (DNS) server?

A DNS server is a computer server that contains a database of public IP addressesand their associated hostnames, and in most cases, serves to resolve, or translate, those common names to IP addresses as requested.

Here is the complete documentation on hosting a website and creating a domain name system server.

Part A :
(a)  Go to Webmin|BIND DNS Server|Create Master Zone and enter/edit the following entries.
(b)  1. Domain name/Network : Add domainname.com               2. Master Server : Add dns.domainname.com               3. Email address : Enter an email address (need not be a valid one)                    Click on Create.
(c)  An Edit Master Zone screen should open. Select Address and add the following two entries  1. Leave the Name field blank and give the server IP address in the address field. Click on Create.  2. In the Name field, add dns.domainname.com. and give the server IP address in the address field. Go to Webmin Index|BIND DNS Server a…

Command Line Dynamic Library

Here is the complete documentation on creating and using a dynamic linking library on the command line.

What is a Dynamic Linking Library (DLL) ?

A DLL is a module that contains fiunctions and data that can be used by another module. A DLL helps reduce memory overhead when several applications use the same functionality at the same time, since although each application receives its own copy of the DLL data, the applications share the DLL code.

Here's how to create your own DLL from the command line:

(a)  Create a project (ComplexLibrary, say) and create two files in it. The first file is a header file (.h) which contains the prototypes of the members of the class(Comp.h, say). The second file is a .cpp file (ComplexLibrary.cpp, say) which contains the  definitions of members in Comp.h.
(b)  On the command line, use the command : $g++ -c ComplexLibrary.cpp –shared –o ComplexDynamic.dll to  build the project and create the dynamic linking library (.dll) file. On Unix based systems, u…