Skip to main content

Posts

Showing posts from August, 2014

Basic HTTP Authentication for REST Web Service

Basic HTTP authentication solve following security problems. Get username and password from http request Fetch the applicable method security details Verify if user is authorized to access the API Return valid error codes in case of invalid access In this tutorial, we show you how to develop a simple RESTfull web service application with HTTP basic authentication using Cuubez framwork. Technologies and Tools used in this article: cuubez 1.1.1 JDK 1.6 Tomcat 6.0 Maven 3.0.3 Intellij IDEA 13.1.1 Note:  If you want to know what and how REST works, just search on Google, ton of available resources. 1. Directory Structure This is the final web project structure of this tutorial. 2. Standard Web Project Create a standard Maven web project structure. mvn archetype:generate -DgroupId=com.cuubez -DartifactId=basic_authentication -DarchetypeArtifactId=maven-archetype-webapp -DinteractiveMode=false Note:  To support IntelliJ IDEA, use Maven co...

Embedded jetty for JAXRS

In this tutorial, we show you how to develop a simple RESTfull web service application with embedded jetty server using cuubez framwork. Technologies and Tools used in this article: cuubez 1.1.1 JDK 1.7 Maven 3.0.3 Intellij IDEA 13.1.1 Note:  If you want to know what and how REST works, just search on Google, ton of available resources. 1. Directory Structure This is the final web project structure of this tutorial. 2. Standard Java Project Create a standard Maven java project structure mvn archetype:generate -DgroupId=com.cuubez -DartifactId=cuubez-jetty -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false Note:  To support IntelliJ IDEA, use Maven command : mvn idea : idea 3. Project Dependencies Following maven dependencies should add to the pom.xml file. File : pom.xml <dependency> <groupId>com.cuubez</groupId> <artifactId>cuubez-core</artifactId> <version>1.1.1...