In the view of a HTML dialog, I am trying to include footer that is located in the webcontent. Like this :

< ui:include src="#{resource['ivy-webcontent:layouts/includes/Footer.xhtml']}" />

doing this i have this error

 java.io.FileNotFoundException: /ivy/faces/javax.faces.resource/layouts/includes/Footer.xhtml?ln=xpertivy-5-webContent Not Found in ExternalContext as a Resource

I've tried to access the file directly :

http://localhost:8081/ivy/faces/javax.faces.resource/layouts/includes/Footer.xhtml?ln=xpertivy-5-webContent

and i got 404. But when i try to access an image that is also in the webcontent, it works fine.

http://localhost:8081/ivy/faces/javax.faces.resource/images/actions/add.png?ln=xpertivy-5-webContent

What am i doing wrong ?

asked 24.04.2015 at 20:01

dbalasse's gravatar image

dbalasse
(suspended)
accept rate: 25%


The following include should work:

<ui:include src="/layouts/includes/Footer.xhtml" />
To download an "xhtml resource" directly is not allowed, because then you could download the "source" of a xhtml. So with the resource framework you can only access images and script files.

link

answered 27.04.2015 at 08:53

Christian%20Strebel's gravatar image

Christian St... ♦
3.2k31338
accept rate: 88%

edited 27.04.2015 at 08:57

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×79
×58

Asked: 24.04.2015 at 20:01

Seen: 3,125 times

Last updated: 27.04.2015 at 08:57