KEMBAR78
The BalusC Code - JSF Tutori.. | PDF | Java (Programming Language) | Eclipse (Software)
0% found this document useful (0 votes)
103 views51 pages

The BalusC Code - JSF Tutori..

The document provides steps to set up a development environment for JavaServer Faces (JSF) 1.2 using Eclipse IDE, Apache Tomcat application server, Java SE 6 JDK, and other required libraries. It details downloading and installing each component, configuring Eclipse preferences for JSF development, and integrating Tomcat with Eclipse.

Uploaded by

Arr RA
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
103 views51 pages

The BalusC Code - JSF Tutori..

The document provides steps to set up a development environment for JavaServer Faces (JSF) 1.2 using Eclipse IDE, Apache Tomcat application server, Java SE 6 JDK, and other required libraries. It details downloading and installing each component, configuring Eclipse preferences for JSF development, and integrating Tomcat with Eclipse.

Uploaded by

Arr RA
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 51

The BalusC Code

Code depot of a Java EE / JSF developer

Friday, January 4, 2008


JSF tutorial with Eclipse and Tomcat

Introduction

In this tutorial you will learn how to setup a Sun JSF RI 1.2 (Mojarra) playground with
Eclipse 3.4 (Ganymede) and Apache Tomcat 6.0 (Catalina). A JSF 1.2 environment
requires at least the Java 5.0, JSP 2.1 and Servlet 2.5 API's. We'll download and install
Java SE 6 SDK, Eclipse 3.4 IDE (with WTP for Java EE development) and Tomcat 6.0
Application server (which supports JSP 2.1 and Servlet 2.5 API's). Additionally we'll
also download and install JSTL 1.2 which can be used in combination with JSF, thanks
to unified EL.

There are also another IDE's available next to Eclipse, e.g. Sun Netbeans, Sun Java
Studio Creator, Oracle JDeveloper, IntelliJ IDEA, etcetera. The choice for Eclipse is
made because it's highly configureable, customizeable, has lots of helpful wizards and ..
it's free! True, it may eat memory and it may sometimes crash. Just make sure that your
environment has enough RAM memory for Java EE development. I recommend at least
2GB of which 1GB is reserved to Eclipse. Also at least a Pentium4 CPU around 3GHz,
or a Core 2 Duo CPU around 2GHz, or a Athlon64 CPU around 2.5GHz is
recommended. Also make sure that you install trusted plugins the right and clean way,
because the well-known Eclipse-instability is almost always caused by bad plugins.

There are also another application servers available next to Apache Tomcat, e.g. Sun
Java Application Server (also known as Glassfish in its current release), JBoss
Application Server, Mortybay Jetty, Objectweb Jonas, etcetera. The choice for Tomcat
is made because it's small, lightweight, relatively fast and is supported by Eclipse by
default by an excellent plugin. The only disadvantage of Tomcat is that it doesn't
support EJB's. So if you ever want to develop with EJB's, then you'll have to switch to
another application server which supports EJB's, such as Glassfish and JBoss AS.

Back to top

Preparing

Create a working directory where you install and store all related files. In this tutorial
we'll use C:\Java as working directory. If you want to store it somewhere else, then
you'll have to replace every occurence of "C:\Java" throughout the tutorial by the
desired directory.

Back to top

Download and install Java SE 6 JDK

The Java SE 6 JDK contains the standard Java API. You can also consider to download
and install the Java EE 5 SDK instead which contains the Sun implementation of the
enterprise Java API next to the standard Java API. But the Java EE 5 SDK ships with a
Glassfish Application Server implementation, while we need the Tomcat Application
Server implementation. The Tomcat Application Server implementation already
contains at least the javax.el and javax.servlet implementations of the Java EE 5 API,
which are required by JSF. The javax.servlet.jsp.jstl implementation, which is also
required by JSF, is missing in the Tomcat implementation, but it can be downloaded
and installed separately. So we can just skip the download and installation of Java EE 5
SDK, the Java SE 6 JDK is sufficient.

1. Surf to the Java SE 6 JDK download page.


2. Pick the latest non-beta JDK without Java EE SDK and/or Netbeans, currently it
is called JDK 6 Update 7. Press the Download button.
3. Choose Platform/Language, accept the License Agreement and press the
Continue button.
4. Click at the link below 'Java SE Development Kit 6u7', you will get the file jdk-
6u7-windows-i586-p.exe (naming may differ per version), save it to disk.
5. Install the JDK and JRE in C:\Java\jdk1.6.0_07 and C:\Java\jre1.6.0_07
respectively.

Back to top

Download and install Eclipse 3.4 IDE

The Eclipse IDE is available in several tastes. As we're going to develop Java EE web
applications with JSF, we need the Java EE variant. It contains under each the WTP
(Web Tools Platform) which eases the development of web applications. The currently
latest version is Eclipse 3.4.

1. Surf to the Eclipse download page.


2. Click at the Eclipse IDE for Java EE Developers link.
3. Download or pick a mirror and you will get the file eclipse-jee-ganymede-
win32.zip (naming may differ per version), save it to disk.
4. Extract the zip and move the child directory \eclipse to C:\Java\eclipse.
Back to top

Download and install Tomcat 6.0

The Tomcat Application Server is available in several releases, each supporting a


different JSP/Serlvet specification. As we're going to develop with JSF 1.2, we need at
least the Tomcat release supporting JSP 2.1 and Servlet 2.5. However, if you're using
another view technology than JSPs, such as Facelets or JSFTemplating, then you can
run JSF 1.2 on JSP 2.0 and Servlet 2.4 without issues. This is supported by at least
Tomcat 5.5.

1. Surf to the Tomcat 6.0 download page.


2. Scroll a bit down the page and under Binary Distributions » Core click at the zip
link.
3. You will get the file apache-tomcat-6.0.18.zip (naming may differ per version),
save it to disk.
4. Extract the zip and move the child directory \apache-tomcat-6.0.18 to
C:\Java\apache-tomcat-6.0.18.

Back to top

Download and install JSTL 1.2

The servlet-api.jar of Tomcat doesn't contain the JSTL API, while it is also required by
JSF. So we need to download it separately and place it in the classpath of Tomcat.

1. Surf to the JSTL 1.2 download page.


2. Click at the jstl-1.2.jar link.
3. You will get the file jstl-1.2.jar (naming may differ per version), save it to disk.
4. Move it unchanged to the C:\Java\apache-tomcat-6.0.18\lib directory, which is
the main classpath of Tomcat.

NOTE: if you don't have full control over Tomcat (e.g. production server or shared
hosting server), then you should rather put the jstl-1.2.jar in the /WEB-INF/lib of your
web project.

Back to top

Download and install Mojarra 1.2

Since the 1.2_07 release of Sun JSF RI, the Sun JSF RI project got a codename called
"Mojarra". You can find the project home page at http://javaserverfaces.dev.java.net.

1. Surf to the Mojarra download page.


2. Download the binary of the latest release, so click at the 1.2_09 binary link.
3. You will get the file mojarra-1.2_09-b02-FCS-binary.zip (naming may differ
per version), save it to disk.
4. Extract the zip and move the child directory mojarra-1.2_09-b02-FCS to
C:\Java\mojarra-1.2_09-b02-FCS.

Back to top
Run and configure Eclipse

1. Run C:\Java\eclipse\eclipse.exe. You will be asked to select a workspace. Point


it to C:\Java\workspace.

2. On the welcome screen, click at the icon with the curved arrow at the right side:
Go to the workbench.

3. In the top menu, go to Window » Preferences » Java » Installed JREs. Select the
current JRE (it should automatically be the same as you have installed, in this
case the jre1.6.0_07, located at C:\Java\jre1.6.0_07) and click Edit. Select the
C:\Java\jre1.6.0_07\lib\rt.jar, click at Source Attachment, click at External File,
navigate to C:\Java\jdk1.6.0_07, select the src.zip file and add it. Now the source
code of the Java SE API is available in Eclipse.

4. In the Preferences dialogue, go to Web » JavaServer Faces Tools » Libraries


and click New. Give the library an unique name, e.g. Mojarra 1.2_09. Set
Version Supported to v1_2. Under Library Jars, click Add, navigate to
C:\Java\mojarra-1.2_09-b02-FCS\lib, select the both JAR's jsf-api.jar and jsf-
impl.jar and add them. Check Is JSF Implementation and click Finish.
5. In the Preferences dialogue, go to Web » JSP Files » Editor » Templates and
click New. Enter name New JavaServer Faces (JSF) Page (xhtml strict), select
context New JSP, enter description JSF with xhtml strict markup and default
view setup, copypaste the following snippet in the pattern field and click OK:
6. <%@taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
7. <%@taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
8. <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
9.
10. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
11. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
12.
13. <f:view>
14. <html xmlns="http://www.w3.org/1999/xhtml">
15. <head>
16. <title>Insert title here</title>
17. </head>
18. <body>
19. ${cursor}
20. </body>
21. </html>
</f:view>

22. In the Prefrences dialogue, go to Web » JavaServer Faces Tools » Validation


and under Type Assignment Problems set Method expression signature
incompatibility to Warning or Ignore if you want to allow JSF action methods
return void. I also recommend to set the Unary operation number (and boolean)
coercion problems under Type Coercion Problems to Warning or Ignore,
because it would unnecessarily give an error when you're using for example
UIComponent#getValue() -which has Object type outcome- in EL but you
treated it as number or boolean.
I have filed a bug about this, vote for it if you agree!

23. In the Preferences dialogue, go to General » Editors » Text Editors » Spelling


and disable it. Really. It will save you from a big annoyment, because it also
unnecessarily spellchecks XML documents like web.xml, faces-config.xml and
on.

24. Here are some more screenshots of how I configured some other preferences
(Text Editors, HTML Editor and Errors/Warnings):

25. Click OK to close the Preferences dialogue.

Back to top

Integrate Tomcat in Eclipse

1. At the bottom box click at the Servers tab. Rightclick at the box and choose New
» Server. In the wizard, select the server type Apache » Tomcat v6.0 Server and
click Next. In the next page, click at Browse, point to C:\Java\apache-tomcat-
6.0.18 and click Finish. Now Tomcat is integrated in Eclipse.

2. Doubleclick the Tomcat server entry in the Servers tab, you'll get the server
configuration. At the left column, under Server Locations, select Use Tomcat
installation. This way Eclipse will take full control over Tomcat, so that you will
be able to access the default Tomcat homepage with the Tomcat Manager at
http://localhost:8080 when running from inside Eclipse. Optionally also check
Publish module contexts to separate XML files under Server options. Otherwise
Eclipse will modify the Tomcat's server.xml to its own taste, which may cause a
XML validation warning with
"[SetPropertiesRule]{Server/Service/Engine/Host/Context}" during Tomcat
startup (which actually doesn't harm at all). At the right column, under Ports,
please note the HTTP/1.1 port. This defaults to 8080, keep it in mind. You can
change it there if you want.

3. At the left column, under General Information, click Open launch configuration,
navigate to tab Arguments, in the field VM arguments add the following
argument at the end (separated with a space):

-Dorg.apache.el.parser.COERCE_TO_ZERO=false

This will fix an unwanted feature in the EL implementation which was


introduced along with Tomcat 6.0.16 (empty number fields become 0 and so
on). Also see this bug and the links in it. Click OK to close the launch
configuration properties and save the configuration by choosing File » Save in
the top menu or by pressing CTRL+S. Close the server configuration by clicking
at the cross of the tab, or by pressing CTRL+F4.

4. Rightclick the Tomcat server entry in the Servers tab and choose Start. You can
also start it by clicking at the green arrow at the toolbar of the box. If you're
running a firewall, you'll probably get kind of a warning during the first time of
Tomcat startup. Just accept/allow/unblock it.

5. Once it is started, go to http://localhost:8080 (where 8080 is supposed to be the


HTTP/1.1 port of Tomcat). You should get the default Tomcat home page.
If you get a timeout or kind of an unknown host error message, then
doublecheck if Tomcat is configured properly (you should have selected Use
Tomcat installation in step 2 and use the right port number) and if it is started
properly. In Eclipse you can find the Tomcat logs at the Console tab of the
bottom dialogue box.
6. You can stop the server by rightclicking at the Tomcat server entry in the
Servers tab and choose Stop. You can also stop it by clicking at the red square at
the toolbar of the box.

Back to top

Prepare JSF web project in Eclipse

1. At the left box open the Project Explorer tab if not already opened. Rightclick at
the box and choose New » Dynamic Web Project.

2. In the wizard, give it the Project name Playground, verify if Target Runtime is
set to Apache Tomcat v6.0 and Dynamic Web Module version is set to 2.5.
Under Configuration select JavaServer Faces v1.2 project and click Next.

3. In the next page, you may change the module settings to your taste. Personally I
like to have URL's always in lowercase, so I change the default Context Root
from Playground to playground. Click Next.

4. In the next page, you need to define JSF Capabilities. At JSF Libraries, select
Mojarra 1.2_09 <Default> (which we have definied in the preferences). At URL
Mapping Patterns, select the default /faces/* and remove it. Then add a new
pattern with the value *.jsf. Finally click Finish.

5. During the creation of the web project you'll probably get a license agreement
popup for the facesconfig_1_2.xsd file from sun.com. If you don't have any
intentions to do bad things, just click at I Agree.
6. After creation of the web project, you should get a directory structure similar to

the screenshot below.

Back to top

Create JSF hello world in Eclipse - The Backing Bean


1. Create a backing bean class: open the Playground project, rightclick at Java
Resources folder and choose New » Class.

2. Enter the package name mypackage, enter the class name MyBean, keep the
other fields default and click Finish. The package and the class will be created
and the editor box will show the class source.

3. Add two properties to the bean:


4.
5. private String input;
6. private String output;
7.

8. Add getters and setters: the input property will be used by an UIInput
component, so it require both a getter and a setter. The output property will be
used by an UIOutput component, so it require at least a getter. The setter is
optional, but it won't be used by the JSF component. Rightclick somewhere at
one of the both properties inside the source editor, choose Source » Generate
Getters and Setters, or hit ALT+SHIFT+S, then R. In the wizard, select the
desired getters and setters, if necessary choose the insertion point (I like to have
getters and setters at the whole bottom of the class) and the sorting (I like to
have getters first and then setters) and then click at OK. Eclipse will generate the
suitable getters and setters. Useful if you ever would have a lot of properties. If
necessary, hit CTRL+SHIFT+F to format the code again so that methods get
separated by a blank line. You can configure formatting preferences in Window
» Preferences » Java » Code Style » Formatter.

9. Add an action method to the bean:


10.
11. public void action() {
12. output = "Welcome at the JSF world, " + input;
13. }
14.

Save the mypackage.MyBean by choosing File » Save in the top menu or by


pressing CTRL+S.

15. Define the backing bean in the faces-config.xml: doubleclick the file
WebContent/WEB-INF/faces-config.xml to open the Faces Configuration
editor. Navigate to the ManagedBean tab, select the request scope and click

Add.
16. In the wizard, enter the qualified class name mypackage.MyBean or click
Browse and enter MyBean to get the matching items and select the
mypackage.MyBean. Click next and verify if the managed bean name is set to
myBean. Finally click at Finish.

17. Go to the Source tab to see the managed bean entry. If necessary, hit
CTRL+SHIFT+F to get the XML formatted. Save the faces-config.xml by
choosing File » Save in the top menu or by pressing CTRL+S.

Back to top

Create JSF hello world in Eclipse - The JSF file

1. Create a JSF file: rightclick at WebContent folder of the Playground project and
choose New » JSP. Enter the File name test.jsp, click Next, select the template
New JavaServer Faces (JSF) Page (xhtml strict) (which we have definied in the
preferences) and click Finish.
2. Add a basic form to the body of the test.jsp:
3. <h:form>
4. <h:outputLabel for="input" value="Enter your name:" />
5. <h:inputText id="input" value="#{myBean.input}"
required="true" />
6. <h:commandButton value="submit" action="#{myBean.action}" />
7. <h:outputText value="#{myBean.output}" />
8. <h:messages />
</h:form>

Save the test.jsp by choosing File » Save in the top menu or by pressing
CTRL+S.

Back to top

Run JSF web project in Tomcat

1. Rightclick the Tomcat server entry in the Servers tab and choose Add and
Remove Projects. In the wizard, select the Playground project under Available
Projects and click Add to add it to Configured Projects. Click Finish.

2. Rightclick the Tomcat server entry in the Servers tab and choose Start. You can
also start it by clicking at the green arrow at the toolbar of the box.
3. Once it is started, go to http://localhost:8080/playground/test.jsf. Note the .jsf
extension, it will be covered by the FacesServlet mapping in the
WebContent/WEB-INF/web.xml. So this request will be passed through the
FacesServlet and the FacesServlet will map it to the default JSP extension,
which is .jsp. The FacesServlet will also create the FacesContext and pass the
specific request through the JSF lifecycle.

If you get a timeout or kind of an unknown host error message, then


doublecheck if Tomcat is started properly and if the port is correct. If you get an
internal server error exception, then doublecheck if the code is all correct. Also
try to interpret and understand the exception message and the trace, if necessary
with help of Google. In Eclipse you can find the Tomcat logs at the Console tab
of the bottom dialogue box.

Back to top

And now?

Play with it!

This whole blog site contains lot of useful JSF material. You can find them in the
Articles section at the right column of this blog site. Copy'n'paste them, or, preferably,
type it over, and play, experiment and run it. The most popular and recommendable
articles are the following:

 Debug JSF lifecycle


 Communication in JSF
 Using datatables
 DAO tutorial - use in JSF
Here are the most important JSF related links to be bookmarked and read thoroughly:

 JSF specification (pick the 1st download link), it explains why JSF is there, how
it works and what it all provides.
 JSF API documentation, it contains detailed javadocs of the JSF API classes, it
explains where the classes are for, how to use them and what all fields/methods
do.
 JSF TLD documentation, it shows which JSF tags are all available, what they all
do and which attributes they supports.
 Java EE tutorial, chapter 10 and on contains Sun's own JSF tutorial.
 If you want to get a book, I highly recommend the JSF: The Complete
Reference, one of its authors, Ed Burns, is the lead of the JSF specification.

You may want to checkout Facelets as replacement of JSP as view technology for JSF
components. It offers much more advantages over JSP and is going to be included in the
upcoming JSF 2.0 as default view technology.

Finally you can check the Favorites section at the right column of this blog site for
more interesting links.

Back to top

Copyright - None of this article may be taken over without explicit authorisation.

(C) January 2008, BalusC

Posted by BalusC at 3:12 PM


Labels: Eclipse, JSF, Tomcat, Tutorial

104 comments:

pascal said...

Hey BalusC, you have wonderfull articles over there! please I am an autodidact
in JSF and I ve got a small a problem with the use of binding, whenever I use
binding property an error that looks like " javax.servlet.ServletException:
Component ID select" occurs! what could be the problem? please tell me, if you
wish to analyse my code send me please your e-mail at murindwaz@gmail.com.
I ve found you every where on sun forum, and your comments and responses
helped me very much. and from there I found your blog! thanks U very much.

January 12, 2008 6:29 AM


BalusC said...

You're getting a "Duplicate component ID" error? Check throughout your JSF
code if every component has an unique ID.

For future questions which are not related to the blog article, please make use of
the Sun JSF forum. I browse those forums almost every day :)
January 12, 2008 1:18 PM
Marian said...

Could you please make available a tarball containig the sources of the project? I
try to run it, following your indications, but I only get the following error:

Jan 20, 2008 9:56:12 AM com.sun.faces.lifecycle.Phase doPhase


SEVERE: JSF1054: (Phase ID: RENDER_RESPONSE 6, View ID: /test.jsp)
Exception thrown during phase execution:
javax.faces.event.PhaseEvent[source=com.sun.faces.lifecycle.LifecycleImpl@ff
d135]
Jan 20, 2008 9:56:12 AM org.apache.catalina.core.StandardWrapperValve
invoke
SEVERE: Servlet.service() for servlet Faces Servlet threw exception
java.lang.NullPointerException
at
com.sun.faces.mgbean.ManagedBeanBuilder.bakeBeanProperty(ManagedBean
Builder.java:350)
at
com.sun.faces.mgbean.ManagedBeanBuilder.bake(ManagedBeanBuilder.java:1
07)

January 20, 2008 4:59 AM


erenay said...

I did everythind as said but I get the error:


"The requested resource (/Project/test.jsf) is not available."

February 2, 2008 10:36 PM


BalusC said...

Re-read the article. The project is called 'Playground' and the context root is
called 'playground'.

February 3, 2008 2:03 AM


erenay said...

And my project name is 'Proce' and context root is 'proce'

Errors in my console are like:


INFO: Initializing Sun's JavaServer Faces implementation (1.2_07-b03-FCS) for
context '/proce'
java.lang.ClassCastException: com.sun.faces.lifecycle.LifecycleFactoryImpl
cannot be cast to javax.faces.lifecycle.LifecycleFactory
at
com.sun.faces.config.ConfigureListener.configure(ConfigureListener.java:1106)
at
com.sun.faces.config.ConfigureListener.configure(ConfigureListener.java:766)
...
SEVERE: Exception sending context initialized event to listener instance of
class com.sun.faces.config.GlassFishConfigureListener
java.lang.ClassCastException: com.sun.faces.application.ApplicationAssociate
cannot be cast to com.sun.faces.application.ApplicationAssociate
at
com.sun.faces.application.ApplicationAssociate.getInstance(ApplicationAssocia
te.java:208)
at
com.sun.faces.config.JSFVersionTracker.publishInstanceToApplication(JSFVer
sionTracker.java:269)
...
SEVERE: Error listenerStart
03.Şub.2008 15:43:52 org.apache.catalina.core.StandardContext start
SEVERE: Context [/proce] startup failed due to previous errors

One problem is, when I double click on server tab, it shows that http1.1 port is
8080
But when I choose to run test.jsp on server with the option "Update context root
for Web module proce"
the browser uses "http://localhost:8055/proce/test.jsf"
and the error is: The requested resource (/proce/test.jsf) is not available.
can it be the problem, I can't change it to 8055, it says it is used by another
process.
entering "http://localhost:8080/proce/test.jsf" to the browser also doesn't work

I'm a newbie and trying to understand, sorry if this is a stupid problem.

February 3, 2008 12:08 PM


Snazit said...

BalusC, this is one of the most beautiful tutorials I've seen. You're English is
almost perfect, better than most of the folks I work with here in the states. What
I found most useful was the lead-in describing where to get needed jars and who
has what, namely not needing Java EE 5 Platform. Wish I read you before
downloading - I needed jsf 1.2...

Hats off to you!!

Thanks,
Don

February 5, 2008 5:04 PM


Gene said...

Very good tutorial about JSF. Thanks a lot for your sharing.

February 14, 2008 10:26 PM


Rajive said...
I had been struggling with making my sample applications work for almost a
week now.I had all sorts of issues - imcompatible versions, incorrect guidelines
from vendors...
With your instructions, I got my sample working within a couple of hours.
Thanks for taking the time and for making the effort to share your knowledge
with the community.
Regards
RJ

March 4, 2008 6:47 AM


scot said...

excellent tut balusc sir.


u r forum and tuts have helped me a lot in starting up with jsf.
thanks a lot.

March 5, 2008 1:02 PM


Thierry Herrmann said...

Very nice tutorial! It's been a pleasure to read it and execute it without any error
in just half an hour. Thanks a lot.

March 19, 2008 12:08 AM


andi said...

Hi BalusC, I searched for many hours to find a working tutorial about Eclipse,
Tomcat and JSF and all I found was your great and (more important)
WORKING tutorial. I just wanted to say thank you!!!!

Greetings Elwood

March 21, 2008 5:31 PM


Carsten said...

Hi BalusC!
Nice "from scratch" tutorial, thx. Maybe you could expand your example with
use of the palette like in the WTP Tutorial (available via the eclipse online help:
JavaServer Faces Tools Tutorial)?
But thx anyway!

April 2, 2008 8:25 AM


Chandoo said...

Excellent article, I was having trouble with putting jsf 1.2, tomcat 6 and java 5
and ruined my weekend. Thank god, I found this just in time. :)

April 21, 2008 3:00 PM


Ryan said...

Yep, I agree!
April 30, 2008 7:01 PM
cristian said...

Hi BalusC,
i've read your article and it's very help me for my project
But i have a little trouble here.
When i running my project and i try open it in my browser, it doesn't open. there
is some error said "The requested resource (/try/coba1.jsf) is not available". i
write http://localhost:8080/try/coba1.jsf in the url. could you tell me what
causing it? thank's before

June 3, 2008 4:01 AM


BalusC said...

This is just the same as a '404 page not found' error. So the URL is wrong or the
resource actually doesn't exist. So either the context root name is wrong, or the
file name is wrong, or the FacesServlet mapping is wrong. Retry the tutorial
without any changes.

June 3, 2008 7:35 AM


LookingForSpring said...

Hi BalusC
I was wondering if you'd ever tried JBoss's Seam Eclipse plugin and how it
compares to the one in your tutorial?
Regards, Jeremy

June 8, 2008 1:53 PM


Lee Theobald said...

Nice article BalusC. I've got a quick related question - Have you ever found
anything that formats your JSF pages well in Eclipse? Most of the plugins seem
to be able to format plain HTML well but when it comes to your JSF tags
(<h:commandLink> and the like) it seems to treat them as normal text and
doesn't indent them.

June 11, 2008 4:45 AM


BalusC said...

@LookingForSpring: no, I haven't tried it out.

@Lee Theobald: Eclipse with WTP plugin formats JSF pages (in fact, JSP
pages) well. The WTP plugin is by default installed in the Eclipse Java EE
version.

June 11, 2008 7:42 AM


boylukky said...

Hi Balusc sir,
Thanks a lot for all your efforts for this tutorial.
As Lee Theobald said, I'm also not able to format JSF code using WTP all
version of Eclipse europa. It doesn't indent JSF tags. I tried all source
(HTML,CSS)configurations in eclipse but nothing worked. Please let me know
if some configuration is available or suggest if any plugin exists for this.
Thanks
BoyLukky

June 17, 2008 7:52 AM


BalusC said...

I can't reproduce your problem. It works fine here with Eclipse Java EE.

June 17, 2008 8:05 AM


boylukky said...

Hi Balusc,
After a small analysis i think i found a testcase.
JSF page without html tags ex: table,tr,td etc is being formatted nicely. But if we
use html tags then it's not being formatted by eclipse properly. I'm getting
h:datatable tag just after td in the same line after formatting, ideally which
should be in next line with indentation.
Please correct me if I'm wrong.
Thanks
BoyLukky

June 17, 2008 9:21 AM


BalusC said...

I see. I would try reporting this issue to the Eclipse boys here:
http://bugs.eclipse.org.

June 17, 2008 9:37 AM


chris said...

Great tutorial. Got it straight to the end withoug problems! Or almost,I had to
remove the "%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%" line
because I got an error on it. Have to check why (jstl-1.2.jar in tomcat\lib
though=. Any ideas ?

July 6, 2008 10:55 AM


chris said...

The reason of having problems with the jstl taglib in the proposed template is
that the JSTL library was not registred. It should be done after point 4 of the
"Run and configure Eclipse" section.

July 14, 2008 12:13 PM


jaya_bansal said...
Hello BalusC,
Its a nice article and I was able to configure my environemnt as per your
tutuorial.
I could run the demo application also.
I see an error when I try to run my JSF project -
SEVERE: Error configuring application listener of class
com.sun.faces.config.ConfigureListener
java.lang.NoClassDefFoundError:
com/sun/org/apache/commons/digester/RuleSet
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
at java.lang.Class.getConstructor0(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:37
87)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4350)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Jul 15, 2008 10:53:07 AM org.apache.catalina.core.StandardContext
listenerStart
SEVERE: Skipped installing application listeners due to previous error(s)
Jul 15, 2008 10:53:07 AM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
Jul 15, 2008 10:53:07 AM org.apache.catalina.core.StandardContext start
SEVERE: Context [/CMA_NEW] startup failed due to previous errors

I am unable to launch my applciation.Please help.

July 15, 2008 1:43 AM


BalusC said...

The Apache Commons Digester JAR is missing in the classpath.

July 15, 2008 9:21 AM


hopebest said...
Hello BalusC,

I tried the tutorial, but I got error in test.jsp:

Method must have signature "String method()" but has signature "void
method()"

at line (sorry HTML is not allowed for the post)


commandButton value="submit" action="#{myBean.action}"

How should I fix it?

Thanks a lot!

July 26, 2008 1:32 PM


BalusC said...

This is not an error, it is just a warning. You can either ignore it (it will just run)
or replace void by String and return null. I just prefer void over returning null.

July 26, 2008 4:22 PM


hopebest said...

Thanks, BalusC.

but when I
http://localhost:8080/Playground/test.jsf

HTTP Status 404 - /Playground/test.jsf

type Status report

message /Playground/test.jsf

description The requested resource (/Playground/test.jsf) is not available.


Apache Tomcat/6.0.16

I didn't find any logs in the file system. I read all the other posts and some
people have the same issue. I checked everything carefully, but have not found
any solution.

July 26, 2008 10:22 PM


BalusC said...

First of all, the context root name in the tutorial is called 'playground'. If you left
yours unchanged, then you might not have added the project to Tomcat, or not
have mapped the FacesServlet on *.jsf correctly, or given the test.jsp another
name.
If you still fails in solving this, then I recommend to start over and do not try to
do something else than what the tutorial tells.

July 26, 2008 10:26 PM


chris said...

Hello again,

I tried your tutorial with success. Then wanted to add Hibernate to my project
(using Hibernate Synchronizer in Eclipse).

When I try to run my jsf page, I run into a problem with the
"HybernateException" class:

java.lang.ClassNotFoundException: net.sf.hibernate.HibernateException
I did all I could to put the Hibernate library in the correct place but the system
does not seem to find it.

Where should I check first ?

Thanks for your help.

July 31, 2008 6:06 AM


BalusC said...

Add it to the classpath of the project. It covers at least the /WEB-INF/lib


directory. It is recommended to put any 3rd party JAR's in there.

July 31, 2008 8:01 AM


BalusC said...

@Hopebest: today I installed Eclipse Ganymede and I discovered that you're


right. This tutorial was based on Eclipse Europa and the error you're occurring
wouldn't occur in it. I've added a new line to the tutorial:

# If you're using Eclipse Ganymede, under the Prefrences dialogue, go to Web »


JavaServer Faces Tools » Validation and under Type Assignment Problems set
Method expression signature incompatibility to Warning or Ignore if you want
to allow JSF action methods return void.

I will rewrite this tutorial for Eclipse Ganymede sooner or later. Thank you.

August 9, 2008 8:00 PM


Pesito said...

Hello
I wonder how do I get started when the application type http://localhost:8080/
and not this way: http://localhost:8080/myApplication.

Thank you.
Note: I do not speak English, so we used a tool of translation. Excuse me if the
text is bad writing.

August 11, 2008 9:42 AM


Pesito said...

I could do deploy. The problem was an error that happened in a production


environment, but not the case in the development environment.

August 15, 2008 11:42 AM


ramjac said...

Thank you very much for this wonderful tutorial. You saved a lot of my time
and my setup is perfect now.

I will read very often your blog.

September 9, 2008 6:32 AM


Roshan said...

Thanks man for providing useful tutes on JSF...

September 12, 2008 12:23 PM


Sunny said...

i have followed all the stpes but i am getting HTTP Status 404.
only difference in tour configuraion and my is below
Web Module version is set to 2.5(i have 2.4). Under Configuration select
JavaServer Faces v1.2(i have v1.1). on start up of tomcat there is also one
eexception java.lang.NoClassDefFoundError: javax/el/CompositeELResolver.
Still i am ale to see tomcat screen but not the application

September 17, 2008 6:38 AM


BalusC said...

The mentioned class is part of Servlet 2.5 / JSP 2.1. Are you using a Servlet 2.5 /
JSP 2.1 application server? E.g. Tomcat 6.x or newer.

September 17, 2008 7:46 AM


Sunny said...

Thanks BalusC,
now it is working fine.i was using older versions.
i am trying simple app with name and age on jsp with add button.
i have defined input fields value like this ..
value="#employeeAction.employee.name}",
but somehow i am getting Target Unreachable, 'employee' returned null
exception.sorry about deleting my previous post.
September 20, 2008 10:49 AM
subhi said...

Hi balusC,
Thanks for sharing your knowledge. You this tutorial help me a lot. I had
worked on jsf 1.5 ys back , it was hard to recall jsf config for me but your
tutorial help me a lot.

Thanks again.
Subhash.

September 20, 2008 1:42 PM


BalusC said...

@Sunny: make sure that employee is not null. E.g.

Employee employee = new Employee();

September 20, 2008 8:19 PM


Sunny said...

thanks for replay,but i have declared employee as managed bean so it should be


initialized automatically like employeeAction(which is also managed bean) as
we dont call new on employeeAction directly. please suggest

September 26, 2008 3:32 AM


SmaJLe said...

Thank you so much! I've had tons of problems with getting this thing to work,
and you really saved my day :)

Now I can finally get back to the listening of the lesson...

October 2, 2008 4:39 AM


Michael said...

My test.jsf works, but I got the following:


[SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property
'source' to 'org.eclipse.jst.jee.server:Playground' did not find a matching
property.

Is there a way to resolve this warning ?

October 4, 2008 9:25 PM


BalusC said...

You can just ignore this. This is new since Tomcat 6.0.16.

Eclipse WTP adds a new attribute 'source' to the project related <context>
element in the server.xml of Tomcat which identifies the source of the context
(the actual project in the workspace which has this server definied).

Since Tomcat 6.0.16 any 'unexpected' XML tags and attributes in the server.xml
will produce a warning during the startup, although there is no DTD.

Just ignore it. Your web project is fine.

October 4, 2008 10:04 PM


Hareesh Ram Chanchali said...

Hi BALUSC,

Many thanks for your time and effort. Keep going and post more useful tutorials.

Hareesh Ram Chanchali

October 15, 2008 5:44 PM


batcha said...

Hi,

i'm Having a problem in your tut ,i did exactly as what you say and at the end
when i typed in the browser
http://localhost:8080/playground/test.jsp and the error is
HTTP Status 404 - /playground/test.jsp

type Status report

message /playground/test.jsp

description The requested resource (/playground/test.jsp) is not available.

Tell me what i need to do

Thanks in Advance
Malick

October 16, 2008 5:03 AM


jonie said...

very good tutorial, but its better to include richface, facelet and tomahawk
configuration in eclipse too...

October 24, 2008 12:02 AM


BalusC said...

That goes beyond the scope of this tutorial ;) I however agree that Facelets and
Tomahawk are worth inclucing in your web project. So is Ajax4jsf, which is just
part of RichFaces.
October 24, 2008 7:14 AM
tariqahsan said...

I was also getting the HTTP Status 404 - /playground/test.jsp

type Status report

message /playground/test.jsp

description The requested resource (/playground/test.jsp) is not available ...

What I found that in the WEB-INF/web.xml file I had this (had to take out the
tag as the it was complaining from blog posting) -
servlet-mapping
servlet-name>Faces Servlet servlet-name url-pattern .jsf url-pattern
servlet-mapping

On the console I was getting the error -


...
Caused by: java.lang.IllegalArgumentException: Invalid url-pattern .jsf in
servlet mapping ...

To correct problem I changed


url-pattern *.jsf url-pattern
in the web.xml. (The '*' missing)
Build and bounced the Tomcat server and it worked.

This is indeed the most comprehensive every step of the way type JSF sample
tutorial I have seen so far. Great Job BalusC! Please continue to give us more of
this kind of tutorial.

October 27, 2008 11:28 AM


aris said...

Hi BalusC, thanks for the really helpful tutorial. Keep up the good work!!!
I want to ask you about different encodings than just plain English. I use Greek
and even if i changed Window-Preferences-Web-JSP Pages-Encoding to utf8 or
greek, i 'm still getting invalid characters on the screen.

October 30, 2008 3:29 AM


Rams said...

I followed the tutorial and completed the setup with sample program. When I
started the Server by right click on the server I received the error message
java.lang.ClassNotFoundException: javax.faces.webapp.FacesServlet:
SEVERE: Error loading WebappClassLoader
delegate: false
repositories:
/WEB-INF/classes/
----------> Parent Classloader:
org.apache.catalina.loader.StandardClassLoader@4a65e0
javax.faces.webapp.FacesServlet
java.lang.ClassNotFoundException: javax.faces.webapp.FacesServlet

Web.xml under WebContent folder has the following content:

:servlet:
:servlet-name:Faces Servlet::/servlet-name:
:servlet-class:javax.faces.webapp.FacesServlet:servlet-class/:
:load-on-startup:1:load-on-startup/:
:servlet/:
:servlet-mapping/:
servlet-name>Faces Servlet:/servlet-name:
:url-pattern:*.jsf:/url-pattern:
:/servlet-mapping:"

Please help me to resolve this.

November 8, 2008 4:00 PM


BalusC said...

The JSF libraries are missing in the classpath. Redo the tutorial from "Run and
configure Eclipse" on and verify if you did every step correct and didn't miss a
step.

November 8, 2008 4:09 PM


Raams said...

I fixed the previous error. Now I received the below error in red color while
running a server after added playground project.

java.lang.RuntimeException: Cannot find FacesContext

ov 9, 2008 10:30:30 PM org.apache.tomcat.util.digester.SetPropertiesRule begin


WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting
property 'source' to 'org.eclipse.jst.jee.server:Playground' did not find a matching
property.
Nov 9, 2008 10:30:30 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal
performance in production environments was not found on the java.library.path:
C:\Java\jre1.5.0_01\bin;.;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDO
WS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program
Files\Common Files\Nero\Lib\
Nov 9, 2008 10:30:31 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-80
Nov 9, 2008 10:30:31 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 2359 ms
Nov 9, 2008 10:30:31 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Nov 9, 2008 10:30:31 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.16
Nov 9, 2008 10:30:33 PM com.sun.faces.config.ConfigureListener
contextInitialized
INFO: Initializing Mojarra (1.2_10-b01-FCS) for context '/playground'
Nov 9, 2008 10:30:35 PM org.apache.catalina.core.StandardContext
addApplicationListener
INFO: The listener "listeners.ContextListener" is already configured for this
context. The duplicate definition has been ignored.
Nov 9, 2008 10:30:35 PM org.apache.catalina.core.StandardContext
addApplicationListener
INFO: The listener "listeners.SessionListener" is already configured for this
context. The duplicate definition has been ignored.
Nov 9, 2008 10:30:36 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Nov 9, 2008 10:30:36 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
Nov 9, 2008 10:30:36 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: attributeAdded('org.apache.catalina.Registry',
'org.apache.tomcat.util.modeler.Registry@384065')
Nov 9, 2008 10:30:36 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: attributeAdded('org.apache.catalina.MBeanServer',
'com.sun.jmx.mbeanserver.JmxMBeanServer@10bbf9e')
Nov 9, 2008 10:30:36 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-80
Nov 9, 2008 10:30:37 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Nov 9, 2008 10:30:37 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/140 config=null
Nov 9, 2008 10:30:37 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 5868 ms
Nov 9, 2008 10:31:42 PM org.apache.catalina.core.StandardWrapperValve
invoke
SEVERE: Servlet.service() for servlet jsp threw exception
java.lang.RuntimeException: Cannot find FacesContext
at
javax.faces.webapp.UIComponentClassicTagBase.getFacesContext(UICompone
ntClassicTagBase.java:1855)
at
javax.faces.webapp.UIComponentClassicTagBase.setJspId(UIComponentClassi
cTagBase.java:1672)
at org.apache.jsp.test_jsp._jspx_meth_f_005fview_005f0(test_jsp.java:105)
at org.apache.jsp.test_jsp._jspService(test_jsp.java:82)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:37
4)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilt
erChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain
.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.
java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:175)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:12
8)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102
)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.jav
a:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Ht
tp11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Unknown Source)

November 9, 2008 1:07 PM


Raams said...

Hi I resolved the above issue. Typo error in url, typed test.jsp instead of giving
.jsf in the url.

Thanks ya.
A good approach and very useful for newbies.
Please put more & more examples and reusable components like tree +
datatable.
One more clarification, in a single jsf page, how to call multiple jsf pages. (For
example i divided the page into three part. First part having one jsf page, and
second part having another jsf page and third part having another jsf page.

November 9, 2008 2:35 PM


BalusC said...

There's already a datatable article at this blog. For including JSF pages use
jsp:include and f:subview. If you want to do this dynamically, there's another
article about that at this blog.
November 9, 2008 4:51 PM
jun said...

This best tutorial in this topic. Only problem I have is the same one Chris
mentioned:
-----
Great tutorial. Got it straight to the end withoug problems! Or almost,I had to
remove the "%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%" line
because I got an error on it. Have to check why (jstl-1.2.jar in tomcat\lib
though=. Any ideas ?

July 6, 2008 9:55 AM


chris said...
The reason of having problems with the jstl taglib in the proposed template is
that the JSTL library was not registred. It should be done after point 4 of the
"Run and configure Eclipse" section.

Could chris or someone give more detail how to register JSTL

November 10, 2008 6:57 PM


shiva said...

Hai BalusC,
Thanks a lot for posting such a useful material..
I was struggling hard to program in JSF but after seeing this i configured and
tried..
Its working ...again Thanks for helping people like me

SIVA.L

December 3, 2008 6:17 AM


learncards said...

THANK YOU!!! these by far the best tutorial I've encountered this year. Every
thing was explained to details, its meaning and intentions. everything was
accurate.
However, I had to copy the jars from Mojarra to the TOMCAT/lib folder. That
solved it for me.
Thanks again

December 10, 2008 10:55 AM


javafrak said...

Hi,
That's a good Tutorial for a learner like me,i did exactly as you told and i can
run the project in inside eclipse browser,but the problem appears when i run it in
separate Browser(FF) and the error is
HTTP Status 500 -

type Exception report


message

description The server encountered an internal error () that prevented it from


fulfilling this request.

exception

org.apache.jasper.JasperException: java.lang.RuntimeException: Cannot find


FacesContext
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWra
pper.java:522)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:41
6)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

root cause

java.lang.RuntimeException: Cannot find FacesContext


javax.faces.webapp.UIComponentClassicTagBase.getFacesContext(UICompone
ntClassicTagBase.java:1855)
javax.faces.webapp.UIComponentClassicTagBase.setJspId(UIComponentClassi
cTagBase.java:1672)
org.apache.jsp.test_jsp._jspx_meth_f_005fview_005f0(test_jsp.java:105)
org.apache.jsp.test_jsp._jspService(test_jsp.java:82)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:37
4)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

note The full stack trace of the root cause is available in the Apache
Tomcat/6.0.18 logs.

Help me what to do

December 18, 2008 9:01 AM


BalusC said...

You need to pass the request through the FacesServlet. Also see point 3 of "Run
JSF web project in Tomcat".

December 18, 2008 9:04 AM


Czym są fraszki? said...
How should I change the project to get the result without adding 'test.jsf' in a
URL address. Best regards.

December 18, 2008 10:29 AM


BalusC said...

Not. You need to pass the request through the FacesServlet anyway.

If your problem is rather that you don't want that the user can access JSP files
directly without passing it through the FacesServlet, then add the following
entry to the web.xml.

<security-constraint>
<display-name>Restrict direct access to JSP</display-name>
<web-resource-collection>
<web-resource-name>JSP</web-resource-name>
<url-pattern>*.jsp</url-pattern>
</web-resource-collection>
<auth-constraint />
</security-constraint>

December 18, 2008 10:45 AM


javafreak said...

Hi,
Thanks
It works

December 19, 2008 1:59 AM


blog4scs said...

Nice tutorial for a newbie. Would you please extend this to be full fledged
tutorial on JSF.

December 26, 2008 11:13 AM


blog4scs said...

Can we add the JSTL libraries also in the step # 4 under Run and configure
section eclipse instead of in Step #4 under Download and Install JSTL 1.2
(moving the jstl-1.2.jar section under C:\Java\apache-tomcat-6.0.18\lib
directory)?

December 26, 2008 11:26 AM


BalusC said...

You can, yes.

December 26, 2008 11:59 AM


Bossie said...
This
Is
AWESOME!

Thanks mate, perfect read when taking first steps into the world that is JSF :)

December 30, 2008 10:43 AM


Gupta said...

Hi,This is a good tutorial. Just a suggestion, it will be good if you can add some
information about running tomcat inbuilt sample applications.

I did follow all ur instructions. The only problem is, I am not able to run any
sample application if I have started the server from eclipse. Sample application
works fine if I will start the server from outside.

Kishor

January 11, 2009 10:11 PM


BalusC said...

Are you able to access its manager homepage at http://localhost:8080 anyway?


Maybe you missed step 2 of "Integrate Tomcat in Eclipse".

January 12, 2009 8:57 PM


SmaJLe said...

THANK YOU !!!! It saved my day :)

January 14, 2009 9:02 AM


eggy said...

On section:
"Prepare JSF web project in Eclipse"
step 6: my directory structure doesn't look like the one in your picture, infact I
don't have the folder "Java Resources:src" with the 5 things in it, but a simple
src folder with nothing in it. So i can't go further with the example...i am
followed all of the steps before, do you have any idea of what could be the
problem?
Thanks a lot.

January 15, 2009 7:46 AM


BalusC said...

Are you in the "Project Explorer" view of the "Java EE" perspective? Sounds
like that you´re in the "Navigator" view or probably in the "Java" perspective.

January 15, 2009 8:17 AM


tripleaxel said...
hi,
i'm stuck at the step 6 of the section "Create JSF hello world in Eclipse - The
Backing Bean". The problem is, when i doubleclick the file WebContent/WEB-
INF/faces-config.xml it doesn't open the Faces Config Editor but the actual xml
file (the code)
...What is wrong?

January 16, 2009 5:30 AM


tripleaxel said...

oh ok i found it :)

January 16, 2009 6:23 AM


tripleaxel said...

Ok, i followed the entire procedure. The only problem that keeps me from
execute successfully the example is this:
at the point described in the part "Create JSF hello world in Eclipse - The JSF
file" step 2, in the code of the file test.jsp i have an error in the third row. it says:
Multiple annotations found at this line:
- Tag (jsp:directive.taglib) should be an empty-element tag.
- Cannot find the tag library descriptor for "http://java.sun.com/jsp/
jstl/core"
I tried to continue anyway and execute the rest, but as i try to open the url:
http://localhost:8080/playground/test.jsf i get the page with this error:
HTTP Status 500 -

type Exception report

message

description The server encountered an internal error () that prevented it from


fulfilling this request.

exception

javax.servlet.ServletException: Servlet execution threw an exception

root cause

java.lang.NoClassDefFoundError: javax/servlet/jsp/jstl/core/Config
com.sun.faces.application.ViewHandlerImpl.executePageToBuildView(ViewHa
ndlerImpl.java:457)
com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java
:141)
com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.ja
va:109)
com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
root cause

java.lang.ClassNotFoundException: javax.servlet.jsp.jstl.core.Config
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.j
ava:1387)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.j
ava:1233)
java.lang.ClassLoader.loadClassInternal(Unknown Source)
com.sun.faces.application.ViewHandlerImpl.executePageToBuildView(ViewHa
ndlerImpl.java:457)
com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java
:141)
com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.ja
va:109)
com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)

note The full stack trace of the root cause is available in the Apache
Tomcat/6.0.18 logs.

instead of the result.

Can you help me? I'd be very grateful...thanks.

January 16, 2009 10:18 AM


BalusC said...

JSTL is missing in classpath.

Make sure that you read and follow every step carefully.

January 16, 2009 11:13 AM


blog4scs said...

Hey BalusC,
All of your articles are really helpful. Would you please publish a tutorial on JSF
and tiles?

Thanks

January 17, 2009 11:31 PM


Anandhu said...

That was very great introduction... thanks balu

January 24, 2009 12:16 PM


jack daniel's said...
Thank you for your tutorial BalusC. As the others, i got http 404 error for
http://localhost:8080/TestJSF/test.jsf link.
But it worked for http://localhost:8080/TestJSF/faces/test.jsp

Thanks again.

March 3, 2009 4:07 PM


BalusC said...

Carefully read step 4 of "Prepare JSF web project in Eclipse" chapter.

March 3, 2009 8:51 PM


majestic said...

Hi,
Thanks a lot for all your efforts for this tutorial. I could run the application
server(apache tomcat 6.0.18)also.(Configurations;apache tomcat 6.0.18,eclipse
SDK 3.4.1,mojarra 1.2_10)and I added richfaces-api,richfaces-impl,richfaces-ui
under WEB-INF/lib .
I see an error when I try to run my JSF project :

SEVERE: Exception sending context initialized event to listener instance of


class com.sun.faces.config.ConfigureListener
java.lang.NoClassDefFoundError: javax/faces/lifecycle/LifecycleFactory
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$000(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.j
ava:1374)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.j
ava:1233)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at
javax.faces.FactoryFinder.getImplGivenPreviousImpl(FactoryFinder.java:514)
at
javax.faces.FactoryFinder.getImplementationInstance(FactoryFinder.java:405)
at javax.faces.FactoryFinder.access$400(FactoryFinder.java:135)
at
javax.faces.FactoryFinder$FactoryManager.getFactory(FactoryFinder.java:717)
at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:239)
at
com.sun.faces.config.processor.FactoryConfigProcessor.verifyFactoriesExist(Fa
ctoryConfigProcessor.java:186)
at
com.sun.faces.config.processor.FactoryConfigProcessor.process(FactoryConfig
Processor.java:131)
at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:203)
at
com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.jav
a:196)
at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:38
43)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4342)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:79
1)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
at
org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:627)
at
org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.j
ava:117)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)

March 5, 2009 4:36 AM


ringo said...

Thanks BalusC, your article helps me a lot. I'm new to JSF. Good job man.

March 19, 2009 2:00 AM


mark said...

Hi BalusC,

really great work, thanks.

My problem: I use Eclipse 3.4.2 with tomcat 6.0 (n this combination even for
some other projects, but without JSF).

Follwoing your article, chapter "Prepare JSF web project in Eclipse", I click
"Finish" to create the project.
This results in an error message: "Failed while installing Dynamic Web Module
2.5". Reason: (the same). Details: NullPointerException.

After confirming this message, the created project is incomplete (just src, JRE
system libs, and build). View "problems" shows a new entry: "This project
needs to migrate WTP metadata".

Any idea?

Thanks a lot
Mark

April 2, 2009 6:33 PM


sraley said...

This part of your code where I'm running the test.jsp program for the first time

I get this error from Tomcat


HTTP Status 500 -

--------------------------------------------------------------------------------

type Exception report

message

description The server encountered an internal error () that prevented it from


fulfilling this request.

exception

org.apache.jasper.JasperException: /test.jsp(15,37) #{..} is not allowed in


template text
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.j
ava:40)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:102)
org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:713)
org.apache.jasper.compiler.Node$ELExpression.accept(Node.java:940)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2343)
org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2393)
org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2399)
org.apache.jasper.compiler.Node$Root.accept(Node.java:489)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2343)
org.apache.jasper.compiler.Validator.validate(Validator.java:1739)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:166)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:315)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:295)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:282)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:
586)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:31
7)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:
410)
com.sun.faces.application.ViewHandlerImpl.executePageToBuildView(ViewHa
ndlerImpl.java:468)
com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java
:140)
com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.ja
va:110)
com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)

April 11, 2009 8:01 PM


Alejandro said...

TY ;)

It's a really nice job, BalusC, thanx man.

April 11, 2009 10:18 PM


Deepu said...

Am using tomcat 5.5.23 and JSF 1.1 and Icefaces 1.7.2 in my project.

Consider the following code snipet :

ice:outputText value="#{fn:toLowerCase('Deepak')}" /ice:outputText


When i tried to use jstl functions in jsp page, its working fine but when i tried it
with jspx file(i.e., along with Icefaces), i got the following error.

SEVERE: No function is mapped to the name "fn:toLowerCase"


Mar 15, 2009 11:44:23 AM com.icesoft.faces.webapp.parser.Parser parse
SEVERE: Failed to execute JSP lifecycle.
javax.servlet.jsp.JspException: com.sun.faces.el.impl.ElException: No function
is mapped to the name "fn:toLowerCase"
at
com.icesoft.faces.component.OutputTextTag.doEndTag(OutputTextTag.java:39
8)
at com.icesoft.faces.webapp.parser.Parser.executeJspLifecycle(Parser.java:240)
at com.icesoft.faces.webapp.parser.Parser.executeJspLifecycle(Parser.java:223)
at com.icesoft.faces.webapp.parser.Parser.executeJspLifecycle(Parser.java:223)
at com.icesoft.faces.webapp.parser.Parser.executeJspLifecycle(Parser.java:223)
at com.icesoft.faces.webapp.parser.Parser.executeJspLifecycle(Parser.java:223)
at com.icesoft.faces.webapp.parser.Parser.parse(Parser.java:160)
at
com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHan
dler.java:528)
at
com.icesoft.faces.application.D2DViewHandler.renderView(D2DViewHandler.j
ava:159)
at
com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.ja
va:107)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:245)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:137)
at
com.icesoft.faces.webapp.http.core.JsfLifecycleExecutor.apply(JsfLifecycleExe
cutor.java:18)
at com.icesoft.faces.context.View$2.respond(View.java:44)
at
com.icesoft.faces.webapp.http.servlet.ServletRequestResponse.respondWith(Ser
vletRequestResponse.java:167)
at
com.icesoft.faces.webapp.http.servlet.ThreadBlockingAdaptingServlet$ThreadB
lockingRequestResponse.respondWith(ThreadBlockingAdaptingServlet.java:36)
at com.icesoft.faces.context.View.servePage(View.java:274)
at
com.icesoft.faces.webapp.http.core.SingleViewServer.service(SingleViewServer
.java:52)
at
com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer.service(
PathDispatcherServer.java:24)
at
com.icesoft.faces.webapp.http.servlet.MainSessionBoundServlet.service(MainS
essionBoundServlet.java:160)
at
com.icesoft.faces.webapp.http.servlet.SessionDispatcher$1.service(SessionDisp
atcher.java:38)
at
com.icesoft.faces.webapp.http.servlet.ThreadBlockingAdaptingServlet.service(T
hreadBlockingAdaptingServlet.java:19)
at
com.icesoft.faces.webapp.http.servlet.EnvironmentAdaptingServlet.service(Envi
ronmentAdaptingServlet.java:63)
at
com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatc
her.java:55)
at
com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.jav
a:23)
at
com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:91)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilt
erChain.java:269)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain
.java:188)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.
java:210)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:174)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:12
7)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117
)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.jav
a:108)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.proces
sConnection(Http11BaseProtocol.java:665)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.ja
va:528)
at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollower
WorkerThread.java:81)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:685)
at java.lang.Thread.run(Unknown Source)
Mar 15, 2009 11:44:23 AM org.apache.catalina.core.StandardWrapperValve
invoke
SEVERE: Servlet.service() for servlet Persistent Faces Servlet threw exception
April 15, 2009 3:20 AM
Deepu said...
This post has been removed by the author.
April 15, 2009 3:21 AM
David said...

BalusC, you rock! This is the first JSF tutorial that I've gotten to work.....thanks
a lot!!!!!

April 21, 2009 12:43 PM


Christian said...

Hi!

First everything was working fine and then I started playing around. All of a
sudden the following error occured.

type Exception report

message

description The server encountered an internal error () that prevented it from


fulfilling this request.

exception

javax.servlet.ServletException: /test.jsp(16,8) '#{myBean.input}' Property 'input'


not readable on type java.lang.String
javax.faces.webapp.FacesServlet.service(FacesServlet.java:277)

root cause

org.apache.jasper.el.JspPropertyNotFoundException: /test.jsp(16,8)
'#{myBean.input}' Property 'input' not readable on type java.lang.String
org.apache.jasper.el.JspValueExpression.getValue(JspValueExpression.java:104
)
javax.faces.component.UIOutput.getValue(UIOutput.java:184)
com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getValue(HtmlBas
icInputRenderer.java:201)
com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.getCurrentValue(HtmlB
asicRenderer.java:284)
com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeEnd(HtmlBasicR
enderer.java:154)
javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:
861)
javax.faces.component.UIComponent.encodeAll(UIComponent.java:937)
javax.faces.render.Renderer.encodeChildren(Renderer.java:148)
javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.j
ava:837)
javax.faces.component.UIComponent.encodeAll(UIComponent.java:930)
javax.faces.component.UIComponent.encodeAll(UIComponent.java:933)
com.sun.faces.application.ViewHandlerImpl.doRenderView(ViewHandlerImpl.j
ava:266)
com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java
:197)
com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.ja
va:110)
com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)

note The full stack trace of the root cause is available in the Apache
Tomcat/6.0.18 logs.

I would appreciate your help!

May 7, 2009 3:56 PM


remco said...

Great tutorial.
I started out using the introduction in JSF: The Complete Reference. There they
build the jsf app on the command line and run it directly in tomcat. What about
all the commons-*.jar libraries ? are they included in the eclipse WTP
somewhere ?

Remco

May 8, 2009 4:14 PM


BalusC said...

Since Mojarra 1.2_05 there's no need for the commons libraries. Besides, most
of them are already included in the Tomcat library.

May 8, 2009 6:17 PM


cedric said...

Uitstekend! Me gusto mucho el tutorial!

Very well done.

To those having the error java.lang.AbstractMethodError:


gnu.xml.dom.DomElement.getTextContent()Ljava/lang/String when starting
Tomcat: clean your classpath! In my case, an old library called gnujaxp.jar
caused the problem.

Cedric, from Nicaragua.

May 21, 2009 12:45 PM


qwe said...

Wonderful article for starting with jsf!!!

But,
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting
property 'source' to 'org.eclipse.jst.jee.server:Playground' did not find a matching
property.

Why do i get this warning while trying to start Tomcat???

June 1, 2009 7:38 AM


BalusC said...

Check my reply at October 4, 2008 10:04 PM.

June 1, 2009 7:40 AM


Roberto Melo Cavalcante said...

Balus,

This article is very well written. Congratulations!

It is very clear, very direct. Perfect!

June 3, 2009 7:25 AM


Blogarhythm said...

I'm adding my thanks. Also, I was getting exceptions thrown by Tomcat when it
was started. I had to copy all the MyFaces (which I'm using instead of Mojarra)
jars into the tomcat/lib dir to solve the problem.

FYI, your tutorial also works using the MyFaces implementation. One just uses
the MyFaces jars instead of the Mojarra jars.

Thanks again!

June 4, 2009 4:08 PM


Artur k. Vieira said...

Hey man, i am here to congratulate you, this is a wonderfull tutorial and the only
one I could complete successfully...you did a GREAT job, keep like that! ;)

June 8, 2009 8:20 AM


nilesh said...

Too good for a beginner...

June 8, 2009 5:25 PM


Abdul Ahad said...
It was a greate article for newbeas to JSF. Nice job

keep it doing bro...

Take Care

June 23, 2009 1:11 PM


Miguel D said...

I have a little problem with JSF and tomcat. Sometimes the server just crash
when I execute some action on the JSF application. Inside the tomcat logs the
only usefull line that I find is:
Current CompileTask:
com.sun.faces.renderkit.html_basic.HtmlResponseWriter.flushAttributes()

June 24, 2009 5:18 AM

Post a Comment

Newer Post Older Post Home


Subscribe to: Post Comments (Atom)

About

BalusC
A deaf web application specialist who is currently employing for a company in
Curaçao. Having B.Sc. degree in Biomedical Science since may 2000. A
computer programming autodidact who started with C64 Simons Basic around
1989. Also a hardware geek since august 1996. Having Java experiences since
april 2003. Born in The Netherlands at march 1978 and living in Curaçao since
march 2008. Married with two children. Having two dog breed opposites, a
Golden Retriever and a Rhodesian Ridgeback.
View my complete profile

Tags
 Ajax
 Communication
 Converter
 CSV
 DAO
 DataTable
 Download File
 DTO
 Dutch
 Eclipse
 Filter
 Focus
 Friendly URL
 Highlight
 Immediate
 Include
 JavaScript
 JDBC
 JSF
 JSP
 Managed Bean
 PhaseListener
 POST-Redirect-GET
 Rant
 Renderer
 SelectBooleanCheckbox
 SelectOneMenu
 Servlet
 TabbedPanel
 Tomahawk
 Tomcat
 Tutorial
 Unicode
 Upload File
 UseBean
 Utility
 Validator
 ValueChangeListener
 Whitespace

 Ajax (1)
 Communication (2)
 Converter (3)
 CSV (1)
 DAO (4)
 DataTable (2)
 Download File (3)
 DTO (7)
 Dutch (7)
 Eclipse (3)
 Filter (5)
 Focus (3)
 Friendly URL (1)
 Highlight (3)
 Immediate (2)
 Include (2)
 JavaScript (6)
 JDBC (3)
 JSF (26)
 JSP (7)
 Managed Bean (12)
 PhaseListener (5)
 POST-Redirect-GET (3)
 Rant (2)
 Renderer (1)
 SelectBooleanCheckbox (1)
 SelectOneMenu (3)
 Servlet (7)
 TabbedPanel (1)
 Tomahawk (2)
 Tomcat (2)
 Tutorial (6)
 Unicode (1)
 Upload File (3)
 UseBean (1)
 Utility (7)
 Validator (5)
 ValueChangeListener (2)
 Whitespace (1)

Articles
 ▼ 3000 (1)
o ▼ January (1)
 Welcome

 ► 2009 (3)
o ► May (2)
 Java/JSP/JSF and JavaScript
 Unicode - How to get the characters right?
o ► February (1)
 FileServlet supporting resume and caching and GZIP...

 ► 2008 (9)
o ► October (1)
 Effective datatable paging and sorting
o ► September (1)
 Validate required checkbox
o ► August (1)
 Styling options in h:selectOneMenu
o ► July (3)
 DAO tutorial - use in JSF
 DAO tutorial - use in JSP/Servlet
 DAO tutorial - the data layer
o ► June (1)
 What is it with roseindia?
o ► February (1)
 Uploading files with JSF
o ► January (1)
 JSF tutorial with Eclipse and Tomcat

 ► 2007 (20)
o ► December (4)
 Action dependent requireness
 Set focus and highlight in JSF
 Validator for multiple fields
 WhitespaceFilter
o ► November (2)
 Friendly URL's in JSF
 MultipartFilter
o ► October (1)
 Populate child menu's
o ► September (4)
 DateUtil
 CalendarUtil
 FileUtil
 Objects in h:selectOneMenu
o ► August (1)
 Generic object converter
o ► July (1)
 FileServlet
o ► April (1)
 ImageServlet
o ► March (4)
 User session filter
 Facade POST by GET
 POST-Redirect-GET pattern
 JDBC tutorial (Dutch)
o ► January (2)
 Generics (Dutch)
 Dynamic JSF subviews

 ► 2006 (25)
o ► October (2)
 StringUtil
 MathUtil
o ► September (1)
 Debug JSF lifecycle
o ► June (8)
 Bestandsbewerkingen (Dutch)
 Parse CSV upload
 Using datatables
 Collecties en mappen (Dutch)
 Data conversies (Dutch)
 DB2 LOWER() bug
 Datum en tijd (Dutch)
 Communication in JSF
o ► May (3)
 HttpServletUtil
 PDF handling
 Restore tabbedpanel
o ► April (11)
 Java tutorial (all Dutch)
 Java tutorial - Basics
 Java tutorial - Elementen

Favorites
 Use the right keywords
 How to write good code
 How to write bad code
 Java SE 6.0 API documentation
 Java EE 5.0 API documentation
 Servlet home page
 Servlet 2.5 specification (JSR154)
 Servlet 2.5 API documentation
 JSP home page
 JSP 2.1 specification (JSR245)
 JSP 2.1 API documentation
 JSP 2.1 / JSF 1.2 EL API documentation
 JSTL home page
 JSTL 1.2 specification (JSR052)
 JSTL 1.1 TLD documentation (1.2 isn't avail??)
 JSF home page
 JSF 1.2 specification (JSR252)
 JSF 1.2 API documentation
 JSF 1.2 TLD documentation
 JSF tutorial (Java EE tutorial chpt 10 and on)
 JSF tutorials overview
 JSF tutorials (somewhat outdated but complete)
 JSF custom components
 JSF The Complete Reference (book)
 Eclipse IDE for Java EE developers
 Eclipse Web Tools Platform
 Hibernate API Reference Documentation
 Hibernate Tools Reference Guide
 IBM DB2 SQL message reference
 HTML Doctype explained
 LinkedIn

Followers

You might also like