Home > Java, JSF, Spring, Spring Web Flow > Open Lane Gets a Face

Open Lane Gets a Face

JSFAdding JSF to my open lane application was very straight forward. The JSF Integration chapter of the Spring Web Flow Reference Guide has all the steps. The integration involved:

  • Modifying the web configuration files to support JSF.
  • Adding the spring-faces, jsf-api, and jsf-impl libraries.
  • Adding a JSF configuration file faces-config.xml.
  • Adding a JSF file. I added test.xhtml (see below) to the flows directory.
  • I’ve also removed my test view resolver.

Now my flow requests get routed to a JSF resolver. The request http://localhost:8080/open-lane/spring/test now executes the following JSF:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core">

<f:view contentType="text/html">

<h:head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<title>Open Lane - Test</title>
</h:head>
<h:body>
This is a test.
</h:body>
</f:view>
</html>

Source code is available at github.

Notes:

¹I did some house keeping with the code. You may have noticed that the URL has changed..

Advertisements
Categories: Java, JSF, Spring, Spring Web Flow
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: