Friday, 14 July 2017

Spring MVC Java Config : Part 5 Secure RESTful API with Spring Security OAuth2

The OAuth 2.0 authorization framework enables a third-party application to obtain limited access to an HTTP service, either on behalf of a resource owner by orchestrating an approval interaction between the resource owner and the HTTP service, or by allowing the third-party application to obtain access on its own behalf.

Monday, 10 July 2017

Spring MVC Java Config : Part 4 Spring Security for Web Application

There are two main areas for application securities :    Authentication: Process of checking the user, who they claim to be.    
Authorization: Process of deciding whether an user is allowed to perform an activity within the application.

Thursday, 6 July 2017

Spring MVC Java Config : Part 3 RESTful Web Services


REST stands for Representational State Transfer.

It’s an is an architectural style which can be used to design web services, that can be consumed from a variety of clients.

The core idea is that, rather than using complex mechanisms such as CORBA, RPC or SOAP to connect between machines, simple HTTP/HTTPS is used to make calls among them.

Wednesday, 5 July 2017

Spring MVC Java Config : Part 2 Bean Validation and Exception Handler


It is always good to check the validity and integrity of form data before passing to business logic, let's see how to do it.



Spring MVC Java Config : Part 1 Bootstrapping a Web Application

It actually becomes confusing to me when  java config is introduced in Spring 4 as any class could be used to initiate a bean container.

Hope this and following posts would be helpful to us all.

Thursday, 29 June 2017

Liferay 6 : Reject process action for ${url} on ${form}_WAR_${portlet}


Liferay does not allow to submit form on a web page since it rejects the process action , why this is happening and how to resolved it ?



Monday, 26 June 2017

SSL with Embedded Tomcat without Spring Boot


In previous post, we have talked about how to have embedded tomcat without spring boot, now let see how to  enable SSL with embedded tomcat.

Sunday, 18 June 2017

Spring with Embedded Tomcat without Spring Boot


Because of service-oriented architecture style, instead of a monolithic application , you may have several independent applications can run on their own.Let's see how to have a Spring powered standalone application with embedded Tomcat without Spring boot.


Tuesday, 6 June 2017

Reverse Engineering : Generate Java Persistence Entity from Database

If there is already an existing database , then we could use some reverse engineering tool to automatically generate java persistence entity classes.

You may find below 2 ways from internet :
1. hibernate*-maven-plugin
2. IDE based reverse engine tools

This post would show you how to do it programmatically.



Sunday, 4 June 2017

Run Spring as Standalone Application Without Spring Boot



It seems that nowadays most of sample codes provided by https://spring.io/blog are all done with Spring Boot, so this post would show you how to write a standalone application with Spring and without Spring Boot.

Thursday, 11 May 2017

Wednesday, 22 March 2017

Tomcat Datasource Username Password Encryption

You may refer to (https://tomcat.apache.org/tomcat-8.0-doc/jndi-datasource-examples-howto.html) for details of how to configure a JDBC data source and use it in a web application, this post is going to talk about how to secure database user name and password in the datasource configuration.



Sunday, 13 November 2016

Let AWS Manage Domain Purchased from GoDaddy


After you purchased a domain from GoDaddy, you would actually let your application hosting service to manage your domain.

Thursday, 26 May 2016

ubuntu : auto restart application as a service after server reboot


You can simply use "nohup java -jar yourappname.jar &" to run an application at backend , but how to automatically start this application as a service after server reboot ?

Monday, 2 May 2016

aws : free ssl cert with let's encrypt




Let’s Encrypt (LE) is a free, automated, and open certificate authority (CA) so that we do not need to pay a cent for a SSL certificate.

Monday, 4 April 2016

AWS : Redirect HTTP to HTTPS

It has been a headache to enforce HTTPS for applications running on EC2 (Elastic Compute Cloud) , if you are encountering the same challenge then you should read below.


Wednesday, 1 July 2015

Eclipse BIRT : how to set a parameter as list ?

Need to pass a list as parameter to report ? The answer is this can't be done with current BIRT 4.5.0 implementation , but we  have alternatives :

Friday, 22 May 2015

OpenShift : WildFly 8 standalone.xml





I am using redhat openshift to test my applications lately , one annoying thing happened is this standalone.xml keep being overwritten, if you encountered the same read below :

Thursday, 7 May 2015

Flag Counter