0

I am working on a web application using JSF and Hibernate framework. I created the following sub folders views, products and users under the WEB-INF for my xhtml views as shown below WEB-INF --views -----products ---------createProduct.xhtml -----users ---------createUser.xhtml

Using tag, I specify "/WEB-INF/views/products/createProduct.xhtml" as the outcome attribute which the navigation case is matched. The problem is when I run the project and click on the link, it is not rendered or parsed appropriately, rather it appears as localhost:8080/appname/WEB-INF/views/products/createProduct.xhtml thereby returning Http 404 error.

Also, I have two template clients jsf created from a single template called "mainTemplate". The mainTemplate contains some with an action attribute bound to a bean method. However, I noticed that when I run the project and open two different pages, the commandButton mentioned earlier has two different action attribute which shows the viewID rather than the bean method it is bound to. Any suggestion to get me moving pass this stage will be appreciated.

Thanks kalis

mvg
  • 1,574
  • 4
  • 37
  • 63

1 Answers1

1

You cannot access files directly inside Web-Inf folder. So place your files outside WEB-INF folder.

Still if your problem is not solved, update the question with the code you have used.

Read this

What is WEB-INF used for in a Java EE web application?

for more details.

Community
  • 1
  • 1
mvg
  • 1,574
  • 4
  • 37
  • 63