File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSF and the fly likes Problem running a simple JSF application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Problem running a simple JSF application" Watch "Problem running a simple JSF application" New topic

Problem running a simple JSF application

Siddharth Bhargava
Ranch Hand

Joined: Feb 23, 2007
Posts: 268
Hi All, I am a newbie to JSF and I am trying to run a simple application in JSF. I am using JBoss 4.2.2GA application server.




I have the following problem :
1) When I go to the url http://localhost:8080/jsfapplication it says :

description The requested resource (/jsfapplication/jsp/inputname.jsp) is not available.

My directory structure is as follows :
JSF Application

When I give the jspforward in index.jsp like this
<jsp:forward page="/WEB-INF/jsp/inputname.jsf"/>
it works ..........

Please tell me where i am going wrong and please clear my concepts... I would be very thankfull to you.... Thanks in advance .....
Marcelo Rodriguez

Joined: Feb 28, 2008
Posts: 6
Dude, I'm doing a huge thing in my new job using JSF but (tell no one...) I'm a newbie in jsf! I'm terrify with the idea of getting fired, but i think i know whatś wrong with your configuration:

Have you seen this code in your web.xml?

Maybe that's it! If you can't make it work i sugest you start using Netbeans 6, it's easier this way!

- The powerfull men can destroy one rose or two, they can even destroy the Spring (and Struts), but they will never defeat Java Server Faces (Only Tapestry can do that...) - 'Ctrl+C, Ctrl+V of Che Guevara Quote, with cH4n6Es'
Siddharth Bhargava
Ranch Hand

Joined: Feb 23, 2007
Posts: 268
This dosen't seem to work ... When I put the jsp folder outside of WEB-INF it works... Please clear my concepts .....
Balaji Natarajan

Joined: Nov 24, 2007
Posts: 29
Hi dude
In the index.jsp you included a forward to "/pages/inputname.jsp". Here the "/" before pages means the root of the web application i.e it locates upto your /Webcontent folder. hence by telling /pages/inputname.jsp you mean ../Webcontent/pages/inputname.jsp.. so only, when you moved your pages folder from WEB-INF to directly under /Webcontent it worked.

Balaji N

Best Regards,<br />Balaji Natarajan<br /> <br />SCJP 1.5 100%<br />SCWCD 1.5 92%<br />SCBCD (In Progress)
I agree. Here's the link:
subject: Problem running a simple JSF application
It's not a secret anymore!