Solved

JBoss with JSF

Posted on 2007-11-28
6
3,273 Views
Last Modified: 2012-06-27
Hi all,

I would like to learn development in JSF, since I only knew JSP and older Java Servlet.
I've deployed the JBoss system on My Windows Xp machine, and am using it as a dev server. I can easily host JSPs on it. However, I don't know how to host JSF on it.
I was reading over RoseIndia.net's tutorial, which aided me in a good night's rest for the last 3 to 4 days, with that I started on a new JSP file with the traditional 'hello world' in a text box.

The problem arose when I try to deploy it, I am not sure how. Is it just like your normal JSP file? Or do I need to include some special directories. Then I went online to search for some help, and I found out that JBoss 4.0.5 GA (the version I am using) support MyFaces.

Does anyone have a step by step tutorial to deployment of JSF on JBoss 4.0.5 GA and a guide to what else I need to do to tweak that JBoss system so it works fine with the latest JSF?
0
Comment
Question by:SamsonChung
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 

Expert Comment

by:princedudley
ID: 20388036
JSF is actually a framework to help J2EE applications that use JSP and Enterprize Java Beans. Its not the same as JSP, however it does use JSP files. Page navigation in JSF is controlled in the faces-config.xml file and other configurations are controlled in web.xml file. JSF was created because Enterprize applications need to decouple the web tier from the application tier when deployed in the production environment. Advisable if you could get a book on JSF instead. Pay close attention to the JSF lifecycle.
0
 
LVL 8

Expert Comment

by:mhunts
ID: 20394027
It is really a similar process, as it's based on JSP. The additional step is that you will need to deploy your JSF jar files, such as the myfaces files. Try these links.

http://wiki.apache.org/myfaces/Getting_Started

Try this step-by-step tutorial. . .

http://www.coreservlets.com/JSF-Tutorial/

0
 
LVL 6

Author Comment

by:SamsonChung
ID: 20397561
The problem I am running into is actually simple, yet difficult.

I have JBoss 4.0.5 G.A. JSP works perfectly.

I took the tutorials from Coreservlets.com, roseindia.net, etc.. and attempted to deploy it on the JBoss GA.. all ends up Exception Generation.

Would it be because I don't have 'my faces' jar?
0
 
LVL 6

Accepted Solution

by:
SamsonChung earned 0 total points
ID: 20406755
I solved the problem....

Apparently Stupid JBoss 4.0.3  to 4.0.5 is packaged with MyFaces from Apache. which is equivalent to JSF 1.1.

The reason I was able to run my JSF application on the Sun application Server and not on JBoss 4.0.5 is simply because of this.

SAS is on 1.2 already, and the J2EE of SAS 9 is J2EE 5, while JBoss is still on J2EE 1.4

To allow the jsf program to run normally, edit web.xml and add the following lines.

This redirects the listener to myfaces and not standard JSF 1.2

A side note, if you bundle your WAR with JSF 1.2 files, it might fail. Mine did.
<listener>
<listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
</listener>

Open in new window

0
 
LVL 1

Expert Comment

by:Computer101
ID: 20858993
Closed, 500 points refunded.
Computer101
EE Admin
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Setting strict transport security header in header not working 1 126
netstat -ano | find "8000" and taskkill /f /pid 2984 3 101
table example 4 33
jmss example java 2 34
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
The viewer will learn how to implement Singleton Design Pattern in Java.
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question