Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem running a simple JSF application

 
Siddharth Bhargava
Ranch Hand
Posts: 280
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

faces-config.xml


index.jsp


web.xml


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
-->WEB-INF/src/java
-->WEB-INF
-->jsp
--greeting.jsp
--inputname.jsp
-->lib
-->src
faces-config.xml
web.xml
index.jsp
message.properties

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
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
<welcome-file-list>
<welcome-file>faces/welcomeJSF.jsp</welcome-file>
</welcome-file-list>
</web-app>


Maybe that's it! If you can't make it work i sugest you start using Netbeans 6, it's easier this way!
 
Siddharth Bhargava
Ranch Hand
Posts: 280
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This dosen't seem to work ... When I put the jsp folder outside of WEB-INF it works... Please clear my concepts .....
 
Balaji Natarajan
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

Regards,
Balaji N
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic