Archive for the 'GlassFish' Category

Jul 22 2008

Using Spring and Facelets together with NetBeans 6.1



In this blog you can read how to create a Web Application with NetBeans 6.1 and the GlassFish 2 Application Server. This Web Application is using Facelets, MyFaces 1.2 and the Spring 2 technologies.


Please note:
I have contributed this blog to the NetBeans Community.


Prerequisites

First update your NetBeans 6.1 to the newest version (currently it is Build 200804211638).

NetBeans Version 6.1 Build 200804211638

Install the Facelets Support Modules and restart NetBeans.


Create a new Web Application

Create a new Web Application, name it “Spring_and_Facelets“.

create a new Web Application

Choose GlassFish v2 as Server and click next.

choose GlassFish 2 as Server

In the last step, activate the Facelets-Framework.

choose the Facelets Framework

Open the Project Properties and remove all libraries.

remove libraries

Download and add my special MyFaces and Facelets Libraries Collection to the project.

special facelets and myfaces collection

Build and run the application. You should see this in your browser:

running facelets application


Adding some Facelets functionality

It is now time to add some specific Facelets functionality to this small Web Application. First we create a new facelets file, name it “header“.

create a new facelets file

the header.xhtml file

Insert this HTML code into the file:

header.xhtml

Technorati Tags: Facelets, GlassFish, Java, MyFaces, NetBeans, Spring

3 responses so far

Apr 09 2008

Create reverse Ajax Web-Applications with DWR and NetBeans



This blog was submitted to the NetBeans IDE 6.1 Beta Blogging Contest.

In this blog you can read how to create a (very simple) reverse Ajax Web-Application, using NetBeans 6.1 BETA and running on GlassFish v2 (YES – i like new technologies!). This example is also working with previous NetBeans versions and Apache Tomcat 6.

Note:
Download-links to all files are available at the end of this blog-entry.


Prerequisites

To work with this example you need an installed NetBeans 6.1 BETA (as above mentioned, older versions are working too) with included GlassFish v2 and the DWR-Jar’s (included in the Example-archive). If you don’t want to create this example from scratch, you can open it with NetBeans and run it immediately. You can read in my other blog how to open an existing NetBeans project.


Introduction

There are many reverse Ajax Frameworks like COMETd and Pushlets which have the ability to push data from the Web Server to the Client (Browser). This effect is similar to applications using traditional Ajax with polling to detect new information on the server.

DWR, or Direct Web Remoting, is a Java open source library which helps developers write web sites that include Ajax technology. It allows code in a web browser to use Java functions running on a web server as if those functions were within the browser.

Direct Web Remoting diagram


DWR consists of two main parts:

Technorati Tags: Ajax, dwr, GlassFish, Java, NetBeans

20 responses so far

Feb 17 2008

Installing GlassFish v2 with PHP5 on Port 80

Published by under GlassFish,Linux

Welcome to my first blog entry. It’s about installing GlassFish v2 on Opensuse 10.1 with support for PHP5 and running on Port 80.

Technorati Tags: glassfish2, Java, netbeans6, opensuse, php, quercus

17 responses so far