jsf - /index.xhtml Not Found in ExternalContext as a Resource -


my jsf web application shows following error:

/index.xhtml not found in externalcontext resource.

my directory structure is:

 - java resource -- src --- br.com.k19.controle ---- numeroaleatoriobean.java --- resources - javascript resources - build - webcontent -- meta-inf -- web pages --- index.xhtml --- formulario.xhtml -- web-inf 

where need put /index.xhtml in structure?

the webcontent folder represents web content. placed index.xhtml file inside web pages subfolder right url be

http://localhost:8080/projectname/web pages/index.xhtml 

and not

http://localhost:8080/projectname/index.xhtml 

as seemed expect.

if want have on context root, rid of web pages folder altogether , move .xhtml files directly inside webcontent folder, in same level meta-inf , web-inf:

projectname  |-- java resources  |    `-- src  |         `-- br.com.k19.controle  |              `-- numeroaleatoriobean.java  |-- resources  |-- javascript resources  |-- build  `-- webcontent       |-- meta-inf       |-- web-inf       |    |-- faces-config.xml       |    `-- web.xml       |-- index.xhtml       `-- formulario.xhtml 

note: java case sensitive. web-inf not same web-inf. careful or you'll have security hole.


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -