• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSF File not found

 
Volodymyr Lysenko
Ranch Hand
Posts: 512
1
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello!

You were right about that invisible exception. I removed phase listener and did the same with javascript in a few lines, but not to the end so far.
It turned out that I caught worse exception:

This line:

points to false location of my template.xhtml. I have always had a template at - file:/D:/NBPr/Olympics/Olympics-war/src/main/webapp/template.xhtml.
Why did it decide to look in folder 'user'(which also is) for template.xhtml?
Why does it look for files at location where I have my source code which I modify from IDE - D:/NBPr/Olympics/Olympics-war/src/main/?
My deployed webapp is at C:\\glassfish3\glassfish\domains\domain2\applications\Olympics.
Very interesting is that I have this error if only I move to http://localhost:8989/Olympics/user/competition/detail.xhtml
I don't get this error if I move to http://localhost:8989/Olympics/user/detail.xhtml or any other location.
On the Internet I found that this might happen due to different locales - my webapp's locale and my default locale. I set locales to be identical and it didn't help.

Reply if you have met something similar otherwise I will remove folder competition. I even renamed it and it didn't help.
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18277
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have split this question off into a new topic because we were covering too many other questions in the old topic. We prefer to keep topics mostly about 1 subject so that it's easier for people to find information about specific questions.

My best guess - since this is a template - is that your template file path in a ui:include element isn't being referenced correctly. That would be in your View Definition XML (xhtml) file that includes the template.
 
Volodymyr Lysenko
Ranch Hand
Posts: 512
1
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are totally right!
I have my template.xhtml in webapp folder.
I have my template client in webapp/user/competition folder.
Correct path to my template in template client is:
<ui:composition template="./../../template.xhtml">

Thank you for help!
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18277
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You may find an absolute path (<ui:composition template="/template.xhtml">) to be more convenient. The absolute path is always relative to the root of the webapp (WAR) and never includes the context that the WAR is deployed under or the absolute filesystem path of the deployed WAR. So, for example, the absolute path for the web.xml file is "/WEB-INF/web.xml", although that one isn't something you'd use for a template!
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18277
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Volodymyr Levytskyi,
Your post was moved to a new topic.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic