Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JSF NewBie

 
Rajkumar balakrishnan
Ranch Hand
Posts: 445
Android Eclipse IDE Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi fiends,
i am newbie to JSF and i develop a simple hello world application. When i try to run this i got this error...


I don't know exactly what is the problem.. Please let me know whats wrong in it... Here is the code of index.jsp


Please help me ranchers... :roll:
 
Sergey Smirnov
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Each request to JSF page should pass the Faces Servlet.
What the URL you print in the browser to access the page?
 
Rajkumar balakrishnan
Ranch Hand
Posts: 445
Android Eclipse IDE Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Sergey Smirnov:
Each request to JSF page should pass the Faces Servlet.
What the URL you print in the browser to access the page?


http://localhost:8080/jsft/faces/index.jsp
 
Marimuthu Madasamy
Ranch Hand
Posts: 72
Java Monad Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Verify that this url matches with the url-pattern that you would have configured in web.xml for FacesServlet.
 
Bassam Al-Sarori
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you post your web.xml file? To make sure that JSF is configured properly.
 
Rajkumar balakrishnan
Ranch Hand
Posts: 445
Android Eclipse IDE Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Bassam Al-Sarori:
Can you post your web.xml file? To make sure that JSF is configured properly.


<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
version="2.5">
<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>/faces/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>
<error-page>
<exception-type>java.lang.SecurityException</exception-type>
<location>/login.jsf</location>
</error-page>
</web-app>


:roll:
 
Bassam Al-Sarori
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Remove this part from your web.xml file

<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>/faces/*</url-pattern>
</servlet-mapping>

Then try accessing your index.jsp file using the following url:

http://localhost:8080/jsft/index.jsf
 
Rajkumar balakrishnan
Ranch Hand
Posts: 445
Android Eclipse IDE Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Bassam Al-Sarori:
Remove this part from your web.xml file

<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>/faces/*</url-pattern>
</servlet-mapping>

Then try accessing your index.jsp file using the following url:

http://localhost:8080/jsft/index.jsf

Sorry for the late reply and i checked it and it won't help me.. So i use Netbeans and now the problem seems to be far away from me...
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!