Mostafa Jamareh
Mostafa Jamareh

Reputation: 1439

jsf:The requested resource is not available

i tried to create a new jsf project, after creating the project i tried to see that the base is correct or not , so i made a test.xhtml to check it ,

test.xhtml:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
  xmlns:h="http://xmlns.jcp.org/jsf/html"
    >
<h:outputLabel value="yes that's work "/>
</html>

and my web.xml is:

<?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_3_0.xsd"
     version="3.0">

<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>*.xhtml</url-pattern>
</servlet-mapping>
<servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>*.jsf</url-pattern>
</servlet-mapping>

but after running , it shows me :

enter image description here

what can i do to make it to work ?

thank's in advance,


i am using intellij idea with tomcat 7.0.50

java version "1.7.0_25"

os: ubuntu

Upvotes: 0

Views: 5145

Answers (1)

Mostafa Jamareh
Mostafa Jamareh

Reputation: 1439

thanks all

it does not find the resources ( lib folder) , so i tried to copy the lib folder under WEB-INF path , so it works now ,

the another reason to use maven :)

Upvotes: 2

Related Questions