Azure WebApp: Different ways to deploy website on Azure

I am here again with a new article. In this Article I am going to talk about the deployment of websites on Azure. There are lots of article available regarding this topic. I am trying to document all the different ways of the deployment of website in this Article. You will be able to see the different techniques of the deployment of website in single article. I hope it will be helpful for Azure Developers. There are various ways to deploy website on Azure WebApp. Some of the common techniques are as follows: Deployment using GIT. Visual Studio publish method. Deployment Using FTP. Powershell command to deploy website. Deployment Using GIT Prerequisite: Azure subscription. Create webapp using Appservice tab provides webapp option to create webstie. Steps: The following steps are required to deploy website using GIT: Step-1:  Select the created webapp in Azure. One of the tab “Deployment Credential”… Read more“Azure WebApp: Different ways to deploy website on Azure”

API Testing with Postman

These days all new web applications are being developed using service based architecture. There are many tools for API testing like SOAP UI, Parasoft SOAtest and Postman. Postman is available as a native app for Mac, Windows, and Linux operating systems. In this tutorial, we’re going to walk through the different features that Postman provides and how we can organize them to make our API testing less painful. In comparison of other tools in the market, it is very lightweight and fast. Requests can be organised in groups, also tests can be created with verifications for certain conditions on the response. With its features it is very good and convenient API tool. It is possible to make different kinds of HTTP requests – GET, POST, PUT, PATCH and DELETE. It is possible to add headers in the requests. Installation To install Postman, go to the apps page and click Download… Read more“API Testing with Postman”

Url Encoding and Decoding in Java

URL encoding/decoding in java is very useful while working with the URL which is transmitted through the network. In case your URL contains some special characters in it then it might get replaced with some other special character. Few important notes, Always use the same scheme to encode and decode the URL. URLs can be encoded multiple times hence always keep this in mind while comparing or retrieving the original URL. Before encoding, recommendation is to decode the URL first and see if resulted URL differs from original URL which means URL is already encoded. Sample Java Code public static void main(String[] args) throws UnsupportedEncodingException, URISyntaxException { // added the escape characters String url = “https:\\\\\\test-java\\page1?attribute1=23&attribute2=45”; // encoding the orginal url String encodeUrl =, “UTF-8”); System.out.println(encodeUrl); // getting the orginal url by decoding System.out.println(, “UTF-8”)); }

Recording Traffic in Parasoft Virtualize using Message Proxies

Virtualize can record live behavior of dependent system components—database queries and responses or traffic over HTTP, JMS, or MQ—then represent that behavior as a Virtual Asset. Once the Virtual Asset is created and deployed, it can emulate the captured behavior—enabling you to cut the dependencies on system components that are difficult to access. There are two ways to record live HTTP, JMS, or MQ traffic, using message proxies or using recording wizard. Here we will discuss message proxy approach as direct recording is not available in community edition. Recording from a Message Proxy In previous lesson we discussed about setting recording mode in message proxy. When message proxy is in record mode it can monitor the traffic over the specified transport as an application is exercised. Virtualize “listens” to traffic requests and responses, then builds a traffic file of legitimate request/response pairs. This traffic is then used to generate and… Read more“Recording Traffic in Parasoft Virtualize using Message Proxies”

Working with Message Proxies in Parasoft Virtualize

Message Proxies and benefits Message proxies are the tools Parasoft virtualized used to record live system behavior and redirect to the desired endpoints (Real or Virtual). Message proxies listen the traffic going via Parasoft Virtualize and on the basis of configuration either redirect to real end points or redirect to virtual asset to send the response defined in configured responder. These proxies can record traffic to emulate the captured behavior—enabling you to cut the dependencies on system components that are difficult to access. They support HTTP/S, JMS, MQ, and internal transports. To use the message proxies with your Application under test (AUT), it needs to be changed once to point to message proxy instead of real end points. After that, developers, QAs, and Performance Test Engineers can then easily start and stop recording, direct traffic to specific virtual assets, and so on. There are some other benefits of using message… Read more“Working with Message Proxies in Parasoft Virtualize”

Scrum – Agile Methodology

Scrum is an agile methodology to manage and control software development where change occurs rapidly (changing requirements, changing technology). Here focus area is on improved communication and maximizing cooperation. Scrum Roles – Product Owner -A Product manager who actually knows what needs to be built and in what sequence this should be done. Scrum Master – This role is played by a project manager or team leader who is responsible for enacting scrum values and practices. Scrum Team – A small team of 4-5 team members (contains programmers, UI designers, testers etc.)   Scrum Activities – Project Kick off Meeting – A collaborative meeting in the beginning of the project Participants: Product Owner, Scrum Master Purpose: Create the Product Backlog. Sprint Planning Meeting – A collaborative meeting in the beginning of each Sprint Participants: Product Owner, Scrum Master and Scrum Team Purpose: Create the Sprint Backlog. Sprint – An iteration… Read more“Scrum – Agile Methodology”

Difference between Scrum and XP (Extreme Programming)

There are small but important differences between Scrum and XP (Extreme Programming). These methodologies are definitely much aligned. In fact, if you have to choose between these two then it’s very difficult?  Below are some important differences between these two, Scrum teams typically work in iterations (called sprints) that are from two weeks to one month long. XP teams typically work in iterations that are one or two weeks long.   Scrum does not define how to do development, but many Scrum teams implement many of the XP practices.   Scrum focuses on structured sprints, and prioritizes back log items. Moreover focuses of XP are more on paired programming, prioritizing the tasks, and more test driven development.   Scrum teams do not allow changes into their sprints. Once the sprint planning meeting is completed and a commitment made to deliver a set of product backlog items, that set of items… Read more“Difference between Scrum and XP (Extreme Programming)”

Automation advantages in Agile? Why automation is needed in Agile?

Now a day’s, agile development and testing are growing broadly and smart QA/Testing team always keep themselves with current trends and technology. Automation is a critical component to maintain agility. Continuous integration/builds, unit, functional & integration test execution and automated deployment are common examples of applying automation. While working in SCRUM/XP, you’re splitting up your work into iterations and one of the conditions here is that by the end of each iteration code needs to have production-like quality and it needs to be ready to be put in production. This means that if you’re working on a project that requires 4 sprints, the second sprint needs to be built on top of the first one, the third on top of the second one and at any given time by the end of each sprint you should be ready to put your code into production. You need to continuously and repetitively… Read more“Automation advantages in Agile? Why automation is needed in Agile?”

Microservices and their key benefits

Microservices are a kind of software architectural solution that allows software to be developed into relatively small, distinct and loosely coupled components. Each of the components provides a distinct subset of the functionality of the entire application. Each microservice, can then be designed, developed, and managed independently. This allows for distributed ownership of a large application across a large organisation, with each microservice owned by a specific team. Microservices are an independent components and are smaller in size hence can be easily built and maintain by a small team. Microservices are scalable. Technology diversity i.e. This eliminates long-term commitment to a single technology stack, if you want to try out a new technology stack on an individual service, you can go ahead. Fault isolation i.e. larger applications remain unaffected by the failure of small component. Better support for parallel team to work on separate components. Independent deployment and easy integration…. Read more“Microservices and their key benefits”

SOAP and REST web service comparison

SOAP stands for Simple Object Access Protocol. REST stands for Representational State Transfer. SOAP is a XML based messaging protocol and REST is not a protocol but an architectural style. REST does not enforces message format as XML or JSON etc. Since SOAP messages are wrapped in a SOAP envelope it can be sent over to any transport mechanism e.g. TCP, FTP, SMTP or any other protocol. On the other hand, RESTful Web services are heavily dependent upon HTTP protocol. SOAP uses services interfaces to expose the business logic.REST uses URI to expose business logic. SOAP has a set of standard specifications e.g. specification for security (WS-Security) , specifications for messaging, transactions, etc. Unlike SOAP, REST does not has dedicated concepts for each of these. REST predominantly relies on HTTPS. SOAP is strongly typed, has strict specification for every part of implementation.  REST gives the concept and less restrictive about… Read more“SOAP and REST web service comparison”

Java Performance Tuning Tips

Sometime we need to improve the performance of our application into our code. Below are the recommendations for Java code tuning. Don’t optimize before you know it’s necessary Use a profiler to find the real bottleneck Work on the biggest bottleneck first   Managing Objects Here, idea is used to use garbage collection less frequently either by canonicalization or by references. Lesser number of garbage collection happens, lesser overhead occurs. Avoid creating temporary objects within repeated routines Pre-size collection objects Better to reuse objects than creating Use custom conversion methods for converting data types to reduce creation of temporary objects Canonicalize objects (Replacing multiple objects with single object) whenever required and compare by identity Replace string and other objects with integer constants and compare by identity Better to use primitive types instead of objects for instance variables Use StringBuffer than string concatenation operator Appropriate use of weak, soft references Use cloning… Read more“Java Performance Tuning Tips”

ACID Properties – DBMS Transaction

ACID Properties are considered to be the desirable properties of any transactions.When in a database system more than one transaction are being executed simultaneously and in parallel then system maintains the below properties in order to ensure the data accuracy and integrity. A-Atomicity if something unexpected happens in the middle of the transaction, then it should be completely undone so that the system will go back to it previous known good state. If the transaction is successful, then it must be committed , so that the system will go to the new state. C-Consistency Ensures the system is in a consistent stage,even though the transaction is committed or rolled back completely. I-Isolation Isolation makes sure that the data that are being manipulated are isolated, so that no other transactions / processes can manipulate them while it is modified by another transaction. D-Durability Durability indicates that, once the transaction is committed,… Read more“ACID Properties – DBMS Transaction”

Analysing and fixing Java Heap related Issues

Java Heap related issues can cause severe damage to our application and we might see poor user experience. Java Heap is memory used by your application which is used to create and store objects. We can define the maximum memory for heap by specifying -Xmx<size> by setting the java variable. When your application runs, it will gradually fill up Heap and memory must be released to keep our application working. Hence Java periodically runs a process called ‘Garbage collection(GC)‘ which will scan the heap and clear objects that are no longer referenced by your application.One cannot request Garbage Collection on demand. Only JVM can decide when to run GC. A Heap dump is a snapshot of the memory of when the heap dump was taken.Heap dumps are not commonly used because they are difficult to interpret. But, they have a lot of useful information in them if you know where/how… Read more“Analysing and fixing Java Heap related Issues”

Using DUAL table in Oracle

DUAL is a special table found in some of the databases e.g Oracle, Informix and DB2 etc. MySQL, Microsoft SQL (MS SQL) does not have this table moreover MySQL allows DUAL to be specified as a table in queries that do not need data from any tables.In oracle, this DUAL table is having one row and one column by default. The owner of DUAL is sys, can be accessed by all user. The table has a single VARCHAR2(1) column called DUMMY that has a value of ‘X’.This table was created by Charles Weiss of Oracle corporation to provide a table for joining in internal views. We mostly uses this to find the calculations or checking system variables etc. Examples 1. The following query displays the string value from the DUAL table SELECT ‘Test String’ FROM DUAL; Output: Test String ———– Test String 2. The following query displays the numeric value… Read more“Using DUAL table in Oracle”

How to copy one schema into another using SQL

Some times we don’t have the DBA access and need to copy data from one schema to another. You can perform that by executing migration SQL script in Oracle XE. Step 1. Generate migration script. SELECT table_name, (‘Select ”’||TABLE_NAME||”’ as tbl from dual;’ ||CHR(10)||’delete from <TARGET_SCHEMA>.’||TABLE_NAME||’;’||CHR(10)|| ‘insert into <TARGET_SCHEMA>.’||TABLE_NAME|| ‘ select * from <SOURCE_SCHEMA>.’||TABLE_NAME||’@<XE_CONNECTION>;’) as GENERATED_SQL FROM all_tables where Owner='<SOURCE_SCHEMA>’ Order By TABLE_NAME; Step 2. Run Below script by updating Source and Target connection details WHENEVER SQLERROR EXIT SQL.SQLCODE ROLLBACK connect system/password@xe — Where system is Oracle XE root user ID drop PUBLIC DATABASE LINK <XE_CONNECTION>; CREATE PUBLIC DATABASE LINK <XE_CONNECTION> CONNECT TO <SOURCE_USER_NAME> IDENTIFIED BY “PASSWORD” USING <SOURCE_CONNECTION_NAME>; set sqlprompt ”; — ———– Echo ON / autocommit OFF for the logged in session set autocommit off; set echo off; connect <TARGET_SCHEMA>/password@<XE_CONNECTION> set echo on; — Add SQL generated from Step 1 — Step 3. Execute the script. and commit… Read more“How to copy one schema into another using SQL”

Application Performance Management Tools

Depending on which language/technology your application is built on, there are several tools you could use for this. To fully manage and monitor the performance of an application, it requires collecting and monitoring a lot of different types of data. Below are important components of a complete application performance management tool, Performance of each web requests or transactions Performance of each transactions Usage and performance of all application dependencies like databases, web services, caching etc. Detailed transaction traces Code level performance profiling Server metrics like CPU, memory etc. Support for custom applications metrics Application log data Application errors Real user monitoring etc.   New Relic New Relic products work together as a platform from which you can troubleshoot and monitor software performance from end to end. Its SaaS based tool and supports the various languages – .NET, Java, Ruby, Phython, Nodejs, Go, PHP etc. APM Agents collect application performance data Browser Agent collects… Read more“Application Performance Management Tools”

Defining Performance and Performance Tuning

Why is My Application slow? When we find that after an application is deployed, it is not performing as desired. In other words it’s not meeting non-functional requirements. This application now requires some fixes that may correct the problem. The process of refactoring an application to improve its performance is called tuning. Before tuning we should also know, what is the user expectation (Non-functional requirement)? How much user going to access the system as per NFR. What is required throughput or response time user is expecting etc. Dependency on third party application or software etc.   A definite improvement can be achieved if you do some tuning to your code. The Tuning Process may involve: Switching compilers, turning on optimizations using a different runtime VM, finding bottlenecks in the code or architecture that need some fixes. There are always some limitations to our system i.e. CPU speed and availability, Memory… Read more“Defining Performance and Performance Tuning”

Test Driven Development

 TDD is just about writing the test before the program. In other words, first think about “how to use” any component, why do we need this component or what’s it for?  And only then think “how to implement”. Hence we can say, it’s a testing techniques as well as design techniques. Below are the advantages of it, It results into components that are easy to test. It results into components that are easy to enhance and adapt. In the end, there is no code without a test. We can tell at any time, whether everything still works as it should, or what exactly does no longer work as it once did. Complex things won’t fear us, execute the test and get positive feedback. You can re-use the unit test in accessing the performance of your system early stage of software lifecycles. Why test first? The test is the executable specification…. Read more“Test Driven Development”

Creating First Parasoft Virtual Asset

Now we know Parasoft Virtualize concepts. Today we will experience the magic of virtualization by creating our first virtual asset and testing it. First of all create an empty project as follows: Open the pull-down menu for the New toolbar button (top left) then choose Project. Choose Virtualize –> Empty Project, and then click Next. Enter a name for the project, change the destination if needed and then click Finish. Adding a New .pva File to an Existing Project To add a new .pva file to an existing project. Do one of the following: Right click the project node, and select Add New> .pva File from the shortcut menu. Choose File > New > .pva File. In the New .pva File wizard that opens, select the project that you want to contain the .pva file, enter a name for the .pva file, and then click Next. This will create a… Read more“Creating First Parasoft Virtual Asset”

Getting started with Parasoft Virtualize

Exploring Parasoft Virtualize UI Parasoft Virualize is based on Eclipse Workbench. Prasoft has developed and integrated several  perspectives. For ex: The Virtualize Perspective The Event Details Perspective The Change Advisor Perspective Let’s explore each perspective. The Virtualize Perspective The Virtualize perspective, which is built into the Eclipse workbench, provides a set of capabilities designed to help you create and manage virtual assets and provisioning actions. You can open this perspective in any of the following ways: Click the Virtualize Perspective button in the shortcut bar (on the top right of the workbench). Click the Open Perspective button in the shortcut bar, choose Other, then choose Parasoft Virtualize in the Select Perspective dialog that opens. Choose Window> Open Perspective> Other, then choose Parasoft Virtualize in the Select Perspective dialog that opens. The Virtualize perspective provides special views you will use to when creating and managing virtual assets and provisioning actions. Virtualize… Read more“Getting started with Parasoft Virtualize”

Basic Java constructs

Java is a strongly typed language, which means that all variables must first be declared before they can be used. The basic form of variable declaration is “Variable Type followed by variable name”. For example “int myVar;” Doing so tells your program that the variable named “myVar” exists and holds numerical data[ i.e integer value]. A variable’s data type determines the values it may contain, plus the operations that may be performed on it. The data types are of two types. They are primitive data types and reference data types. Primitive Data Types are pre defined by the language and is named by a reserved keyword. Example: int, float etc. Reference Data types are often referred as non-primitive data types. Example: Objects and Arrays They are called as reference data types because they are handled “by reference” – in other words, the address of the object or array is stored in… Read more“Basic Java constructs”

New features of various java releases and their comparison

Java is the choice of many software developers for writing applications. It is a popular platform that provides API and runtime environment for scripting and running enterprise software, including network applications and web-services. Oracle claims that Java is running in 97% of enterprise computers. Each Java programmer must know about these new features. Types of Applications that Run on Java are below, Desktop GUI Applications Mobile Applications Embedded Systems Web Applications Web Servers and Application Servers Enterprise Applications Scientific Applications Below is the consolidated list of important new features added in various java releases.

Parasoft Virtualize Installation

You can download Virtualize CE or Enterprise edition from the Virtualize product page. For CE all it takes is supplying an active email address where the download link will be sent to. It’s quite a big download at 1.1 GB, but this has a reason: it includes the full version of Virtualize, SOAtest (the Parasoft functional testing solution) and Load Test. This means that when you decide to upgrade to the full version, all you need is another license. No reinstalling of software required. After downloading and installing the software, you can simply unlock the CE license through the Preferences menu by entering the email address you supplied to get a download link. That’s it. If want to go for enterprise edition and want to use Virtualize for bigger teams you will need to have Parasoft Environment Manager and License server as well. Installation on Windows machine To install: Run the… Read more“Parasoft Virtualize Installation”

Service Virtualization Tools

A couple of years ago, I took my first steps in the world of service virtualization when I took on a project where I developed stubs (virtual assets) to speed up the testing efforts and to enable automated testing for a telecommunications service provider. I started looking for the tools available in the industry. I found few Service Virtualization solutions from few leading companies like CA, HP, IBM. Here is the list of few leading Service Virtualization tools. CA Service Virtualization, formerly known as LISA CA Service Virtualization lets you virtualize software service behavior and model a virtual service to stand in for the actual service during development and testing. CA Service Virtualization, formerly known as LISA, captures and simulates the behavior, data and performance characteristics of complete composite application environments, making them available for development and test teams throughout the software lifecycle, for faster time-to-market with quality software functionality… Read more“Service Virtualization Tools”

Installing java SDK and writing first java program

Installing and using Java Install the java SDK from below location and follow the installation instructions, Setting environment variable for Java Environmental variable is a variable that describes the operating environment of the process. Common environment variables describe the home directory, command search path etc. JAVA_HOME JAVA_HOME is a environment variable (in Unix terminologies), or a PATH variable (in Windows terminology) which contains the path of Java installation directory. On window operating system follow the below steps, 1.Right click My Computer and select Properties. 2. On the Advanced tab, select Environment Variables, and then edit JAVA_HOME to point to where the JDK software is located. or run the below from command prompt, Set JAVA_HOME = <jdk-install-dir> example, C:\Program Files\Java\jdk1.6.0_02. On Unix operating system run the below command, export JAVA_HOME=<jdk-install-dir> CLASSPATH Set PATH =%PATH%;%JAVA_HOME%\lib\tools.jar PATH Set PATH =%PATH%;%JAVA_HOME%\bin; Please note, changing the JAVA_HOME will reflect to path and class path… Read more“Installing java SDK and writing first java program”

Core Java Architecture and JVM

In this lesson, we are going to explain the core Java Architecture. Java Java was conceived by a team of engineers in Sun Microsystems in 1991 as a part of a research project, which was led by James Gosling and Patrick Naughton. It was initially called Oak but was renamed as Java in 1995. This is designed to be small, simple, and portable across platforms and operating systems, both at the source and at the binary level, which means that the same Java program can run on any machine. Features of Java Java is an Object Oriented Language. Object-Oriented design is a technique that helps the programmer visualize the program using real-life objects. Java is a Simple Language. The reason is, Certain complex features like operator overloading, multiple inheritance, pointers, explicit memory de allocation are not present in Java language. Using Java we can write Robust Programs. The Two main… Read more“Core Java Architecture and JVM”

Object oriented concepts used in Java

Java is an Object-Oriented Language hence before learning java let us understand the object oriented Concepts first. Object An object in the software world means a bundle of related variables and functions known as methods variables and functions known as methods. Software objects are often used to model real-world objects you find in everyday life. The real world objects and software objects share two characteristics : 1. State : condition of an item. 2. Behaviour : Observable effects of an operation or event including its results. State can be of two types : Active state which reflects the behaviour and Passive State refers to state which does not change which does not change. The behaviour of an object forms the interface to the external world. Class A class is a blueprint or prototype that defines the variables and the methods (or funtions) common to all objects of a certain kind. Constituents… Read more“Object oriented concepts used in Java”

Service Virtualization

What Is Service Virtualization? Service virtualization lets you create a simulated version of a service. The simulated version is referred to as a virtual service. The virtual service does not need to duplicate all the functionality of the actual service. Service virtualization is a method to emulate the behavior of specific components in heterogeneous component-based applications such as API-driven applications, cloud-based applications and service-oriented architectures. It is used to provide software development and testing teams access to dependent system components that are needed to exercise an application under test, but are unavailable or difficult to access for development and testing purposes. Service virtualization attempts to remove these test environment constraints by simulating the behavior of unavailable or difficult-to access dependencies, as depicted in below figure. This is done by modelling and deploying a so-called “virtual asset” that emulates those parts of the dependency’s behavior that are required to execute the desired… Read more“Service Virtualization”


 VSAM FAQ  Q1. What are the types of VSAM datasets? A1. Entry sequenced datasets (ESDS), key sequenced datasets (KSDS) and relative record dataset (RRDS).   Q2. How are records stored in an ESDS, entry sequenced dataset? A2. They are stored without respect to the contents of the records and in the order in which they are included in the file.   Q3. What is a CI, control interval? A3. A control interval is the unit of information that VSAM transfers between virtual and auxiliary storage.   Q4. What are the distinctive features of a ksds, key sequenced dataset? A4. The index and the distributed free space.   Q5. What is a CA, control area? A5. A group of control intervals makes up a control area.   Q6. What is a sequence set? A6. This is the part of the index that points to the CA and CI of the record… Read more“VSAM FAQs”

Bug Life Cycle

Life cycle of Bug   Log new defect When tester logs any new bug the mandatory fields could be: Build version, Submit On, Product, Module, Severity, Synopsis and Description to Reproduce In above list you can add some optional fields if you are using manual Bug submission template: These Optional Fields are: Customer name, Browser, Operating system, File Attachments or screenshots. The following fields remain either specified or blank: If you have authority to add bug Status, Priority and ‘Assigned to’ fields them you can specify these fields. Otherwise Test manager will set status, Bug priority and assign the bug to respective module owner. Look at the following Bug life cycle: Ref: Bugzilla bug life cycle The figure is quite complicated but when you consider the significant steps in bug life cycle you will get quick idea of bug life. On successful logging the bug is reviewed by Development or Test manager. Test manager… Read more“Bug Life Cycle”


Here list of frequently asked questions about JCL. How many levels of nesting is allowed in PROCs? Ans: 15 If the “DISP=” keyword is not coded for an existing dataset, what default values will be used for “DISP=”? Ans: If the “DISP=” keyword is not coded ,then the DEFAULT Values are : DISP=(NEW,DELETE,DELETE) If the “DISP=” keyword is not coded for a new dataset, what default values will be used for “DISP=”? Ans: If the “DISP=” keyword is not coded ,then the DEFAULT Values are : DISP=(NEW,DELETE,DELETE) What does COND=ONLY mean? Ans: It means that job step will be executed only if previous steps abnormally terminate What does COND=EVEN mean? Ans: It means that job step will be executed even if one of the previous steps abnormally terminates Can you execute a PROC from another PROC? Ans: Yes. Only if cataloged in SYS1.PROCLIB. Upto 15 levels are allowed. Question: What… Read more“JCL FAQs”

How to integrate elastic search with spring boot application

We can use elastic search with spring boot application and for this below are the detailed steps which can be followed. (Please note there some compatibility issue with some version of elastic search hence choose the appropriate one as per your need, I have used the version 2.4.0 with my spring boot app version 1.4.0.RELEASE) 1. Download and unzip the elastic search from 2. Open config file \elasticsearch-2.4.0\config\elasticsearch.yml and change the cluster name if needed, uncomment and add the value to property 3. Run the elastic search by clicking on batch file, \elasticsearch-2.4.0\bin\elasticsearch.bat (Here this is going to run the elastic search on separate server than your application i.e localhost:9300 ) 4. Add the below dependency to your spring application <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-elasticsearch</artifactId> </dependency> 5. Add the below properties to file 6. To enable the elastic search repository which will be used to save/generate/delete the search… Read more“How to integrate elastic search with spring boot application”

How to create custom page template in WordPress

Custom page template should be used when you want a different layout on any page. There can be multiple reasons for actual uses in your site created on wordpress. This is simple and can be done by following below steps , you just need simple knowledge about php, html and css. 1. Create template file, let us take the example of creating a template where we can display all the posts from a particular category. Also User should be able to navigate easily to each post of that category. a) Create a template file and add the below code,

Email validator in java

You can use the below validator class for email address in your java projects, /* Email Validator */ package com.tms.utility; import java.util.regex.Pattern; /** * * @author aarnav */ public class EmailValidator { private static final String EMAIL_PATTERN = “^[_A-Za-z0-9-\\+]+(\\.[_A-Za-z0-9-]+)*@” + “[A-Za-z0-9-]+(\\.[A-Za-z0-9]+)*(\\.[A-Za-z]{2,})$”; public EmailValidator() { } /** * Validate hex with regular expression * * @param email for validation * @return true valid email, false invalid email */ public static boolean validate(String email) { Pattern pattern = Pattern.compile(EMAIL_PATTERN); return pattern.matcher(email).matches(); } }

Converting a number to english word in java

You can use the below java class to convert a number to english word, /* * Number to English word converter */ package com.tms.utility; /** * * @author aarnav */ import java.text.DecimalFormat; public class EnglishNumberToWords { private static final String[] tensNames = { “”, ” ten”, ” twenty”, ” thirty”, ” forty”, ” fifty”, ” sixty”, ” seventy”, ” eighty”, ” ninety” }; private static final String[] numNames = { “”, ” one”, ” two”, ” three”, ” four”, ” five”, ” six”, ” seven”, ” eight”, ” nine”, ” ten”, ” eleven”, ” twelve”, ” thirteen”, ” fourteen”, ” fifteen”, ” sixteen”, ” seventeen”, ” eighteen”, ” nineteen” }; private EnglishNumberToWords() {} private static String convertLessThanOneThousand(int number) { String intialNum; if (number % 100 < 20){ intialNum = numNames[number % 100]; number /= 100; } else { intialNum = numNames[number % 10]; number /= 10; intialNum = tensNames[number %… Read more“Converting a number to english word in java”

How to sign SOAP request in Jmeter

In this post we will see how to test a SOAP web service in JMeter. Using JMeter, we can do both functional testing as well as load testing of a SOAP web services. As we know that web services are headless so, we can’t use the record and playback feature of JMeter to record the web service requests. Hence, we need to create the Sampler requests manually. In this tutorial, we will use the S”OAP/XML-RPC Request” sampler to create and send the SOAP request. SOAP/XML-RPC Request The SOAP/XML-RPC Request sampler is used to send a SOAP or an XML-RPC request to a webservice. This sampler creates an HTTP POST request(as SOAP is based POST method) with the request body specified in the “SOAP/XML-RPC Data” field. We can specify the SOAPAction in the SOAPAction field after checking the Send SOAPActioncheckbox. Steps to test a SOAP Web service using JMeter- Add a Thread… Read more“How to sign SOAP request in Jmeter”

How to write to local file system using a postman collection java script

Ensure that you have node and npm installed. Install newman with: npm install newman. Create a file with the following contents: var fs = require(‘fs’), newman = require(‘newman’), results = [];{ reporters: ‘cli’, collection: ‘/path/to/collection.json’, environment: ‘/path/to/environment.json’ // This is not necessary }) .on(‘request’, function (err, args) { if (!err) { // here, args.response represents the entire response object var rawBody =, // this is a buffer body = rawBody.toString(); // stringified JSON results.push(JSON.parse(body)); // this is just to aggregate all responses into one object } }) // a second argument is also passed to this handler, if more details are needed. .on(‘done’, function (err, summary) { // write the details to any file of your choice. The format may vary depending on your use case fs.writeFileSync(‘migration-report.json’, JSON.stringify(results, null, 4)); }); Here is another example: var express = require(‘express’); var fs = require(‘fs’); var bodyParser = require(‘body-parser’); var app = express(); app.use(bodyParser.urlencoded({ extended:… Read more“How to write to local file system using a postman collection java script”

Recover oracle database from error ORA-00333

To restore the oracle from ORA-00333: redo log error , you need to follow the below steps, SQL> connect system Enter password: ERROR: ORA-01033: ORACLE initializatio Process ID: 0 Session ID: 0 Serial number: 0 ORA-00333: redo log read error block 767 count 7428 SQL>connect sys as sysdba password SQL> startup SQL>select l.status, member from v$logfile inner join v$log l using (group#); SQL>recover database using backup controlfile; Enter and provide the current file path – /oracle/fast_recovery_area/redo01.log SQL>alter database open resetlogs;

Integration of Rich File Manager with ckeditor

This article is helpful to those developers or programmers who are facing the issues with file upload functionality and are using the ckfinder a paid service. Rich file manager is open source and is free to use. You can follow the below steps to integrate this with ckeditor in your spring boot or java application. 1.Download the latest version of ckeditor  and rich file manager. Add the above downloaded files under resources folder of your project. Make sure to add ckeditor and RichFilemanager-master directories in parallel under resource folder. 2.Open the js file /Resources/ckeditor/config.js and add below lines, config.filebrowserImageBrowseUrl =’/RichFilemanager-master/index.html?filter=image’ (Note, we have added the filter Image to support the upload of images only moreover you can remove or modify the filter as per your need. 3. Enabling the java connector – We need to use the java connector to connect rich file manager with ckeditor. i) Modify the rich… Read more“Integration of Rich File Manager with ckeditor”