Wednesday, October 20, 2010

Configuring a data source in Weblogic


One of the Java EE container functionalities is to provide data sources to its deployed applications. The functionality offers flexibility to application configuration. We can switch the system to a new database without impacts on application code.

Securing a Web application with Weblogic

With Weblogic, we can develop a login-based Web application with only little code !
Classical secured Web applications require the following features
  1. Securing communication (HTTPS)
  2. Exploiting users and roles data to protect Web resources.
    • A user is associated with a set of roles (“client” , “staff”, “administrator staff”).
    • The access to Web resources is controlled according to roles. For example,
      • Only grant access to the URL “/manageProductPrices/*” to the administrator staffs.
      • Only grant access to the URL “/manageOrders /*” to the staffs.
      • Grant access to the URL “/clientArea/*” to all logged in clients.
      • Grant access to the URL “/public/*” to everyone.
    • The data about users and roles can be stored on DBMS or an external server such as LDAP.
  1. Offering services to create and update user data (register new users, change password etc).


In this tutorial, I will show you how to realize all these features in a simple way.
Realizing feature 1 (HTTPS) only consists in configuring the Weblogic domain.
For feature 2, we will use the Weblogic Admin Console to create users and roles, to associate controls to Web resources in “web.xml”.
For feature 3, we will externalize users and roles to an external database. Then, it is possible to create customized web pages to edit theses data with your favorite framework (such as struts + hibernate).
This tutorial does not cover the creation of custom applications to edit users’ data. Rather, we will use the Weblogic Admin Console.

Sunday, October 17, 2010

GWT project

Hello

It has been a while since I created a Google code project

This project will contains a set of demo GWT applications for learning how to implement some client rich application features.

The applications are mainly network games (with two parties) !

They are based on a common framework which provide communications (listing online users and exchanging message between users).

The applications are deployed at the Google App Engine server.

http://gwt-cool-sample.appspot.com

This is a screen capture showing how to play Chess and chat at the same time.



The two-person game is not yet finised. However, you can play with the computer at this URL

http://gwt-cool-sample.appspot.com/chess_vs_computer.html


Please write me if you want to join the code project :-)




Creating a Web Service on Weblogic

With Eclipse, we can create and deploy a Web Service in a few minutes. In this tutorial, we will build a service called Document Manager, which enables users to store and retrieve documents on a server.

This tutorial will show you how to do the following tasks.
  • Define an Web Service interface in Java.
  • Implement this interface and deploys the service on Weblogic.
  • Generate a WSDL from the Java interface.
  • Test the service with a Weblogic tool.
  • Generate a client program from the WSDL.

Saturday, October 16, 2010

Installing and configuring the Weblogic server on Eclipse

Oracle Weblogic offers nice Eclipse plugins to developpe Java EE applications. In this post, I will show you how to install the server and to configure it with Eclipse.


Click here to go to the tutorial