• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JSF File not found

 
Ranch Hand
Posts: 514
1
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Saloon Keeper
Posts: 27808
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Bin Smith
Ranch Hand
Posts: 514
1
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 27808
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 27808
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Volodymyr Levytskyi,
Your post was moved to a new topic.
 
joke time: What is brown and sticky? ... ... ... A stick! Use it to beat this tiny ad!
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic