Python Flask Multi-Step Registration Form With MySQL jQuery

Multi-Step Registration Form You will see an example on Python Flask multi-step registration form with MySQL, jQuery. Sometimes you may need to capture lots of user details during registration process and as a result a user gets a long form on web page. So the best solution is to break the form into smaller logical section and present it into…

Spring @ConditionalOnResource Example

Condition On Resource In this tutorial I will create examples on Spring @ConditionalOnResource. The @ConditionalOnResource annotation lets configuration be included only when a specific resource is present in the classpath. For example, the Log4j class is only loaded if the log4j configuration file (log4j.properties) was found on the class-path. This way, you might create similar modules that are only loaded if their respective…

What is Optional.get() in Java?

Introduction I will discuss here what is Optional.get() in Java. Optional is a class and get() is a method in this class. Java 8 was a huge improvement to the platform and one of the new features was added Optional.get(). So using this feature you are telling that a value may or may not be available or present in the…

String vs StringBuffer vs StringBuilder

Introduction We will discuss on String vs StringBuffer vs StringBuilder here. Basically we will find the differences between String, StringBuffer and StringBuilder.

ClassNotFoundException vs NoClassDefFoundError in Java

Introduction I will show an example on ClassNotFoundException vs NoClassDefFoundError. ClassNotFoundException is an exception whereas, NoClassDefFoundError is an error. I will discuss the difference between ClassNotFoundException and NoClassDefFoundError with examples.

Dependency injection in Spring

Introduction Here we will see different types of dependency injections in Spring framework. There are three types of dependency injections and they are constructor injection, setter injection and interface injection. Spring supports only constructor and setter injection. Interface injection is supported by other language like Avalon. Interface injection a different type of DI(dependency injection) that involves mapping items to inject…

Building Simple Shopping Cart using Python, Flask, MySQL

Introduction In this tutorial I will show you here how to build a simple shopping cart using Python, Flask, MySQL. This shopping cart is very simple and it does not have checkout option, payment option. This is about to display products in an online shopping portal, add item to cart, remove item from cart and remove all items from cart…

Spring @ConditionalOnProperty Example

Condition On Property Here I will create examples on Spring conditional on property using the annotation @ConditionalOnProperty. The @ConditionalOnProperty annotation allows you to load beans conditionally depending on a certain environment property or configuration of a property. Use the prefix and name attributes to specify the property that should be checked. By default, any property that exists and is not equal…

Prevent JAR Creation using Maven

Introduction In this post you will see how to prevent JAR creation using maven build tool if your application does not have the required Java classes or resource files. Actually you don’t need to create jar file when your project does not contain any Java or resource files. I will use maven-jar-plugin which is used by default by maven build…

Session Management in Python, Flask

Introduction You will see here how to do session management in Python Flask. Session management in Python flask generally involves starting session, removing item from session, clearing item from session, updating item in session. You will see in subsequent sections later how to put value or an item into session, updating value in session, clearing session completely, removing value from…