Forums de discussion

Resource Serving does not work (HTTP 404)

Florian Huonder, modifié il y a 12 années.

Resource Serving does not work (HTTP 404)

New Member Publications: 11 Date d'inscription: 17/03/11 Publications récentes
Hi all

I have a Primefaces-Portlet running within a Pluto 2.0.2.
Portlet Faces Bridge is in version 2.0.0.

There I have the following JSF:
<p:ajaxstatus style="width:16px;height:16px;">
	<f:facet name="start">
		<h:graphicimage value="#{resource['graphic:ajax-loader.gif']}" />
	</f:facet>
	<f:facet name="complete">
		<h:outputtext value="" />
	</f:facet>
</p:ajaxstatus>


In my maven project the structure is:

src
-- main
    -- webapp
        -- resources
           -- grahpic
               -- ajax-loader.gif


The page renders and everything works as expected.
Just when an Ajax-Call happens, I do not see the image (named ajax-loader.gif). I see this broken-image image that tells me "image not found".
I tried then clicking on the link in the HTML and the file is not there (means a 404 occurs).

Does anybody have a hint?

Best regards,
Florian
thumbnail
Neil Griffin, modifié il y a 12 années.

RE: Resource Serving does not work (HTTP 404)

Liferay Legend Publications: 2655 Date d'inscription: 27/07/05 Publications récentes
Instead of src/main/resources try src/main/webapp/resources
Florian Huonder, modifié il y a 12 années.

RE: Resource Serving does not work (HTTP 404)

New Member Publications: 11 Date d'inscription: 17/03/11 Publications récentes
Hi,

Sorry when it does not look like it.
The folder is src > main > webapp > resources

Regards,
Florian
Florian Huonder, modifié il y a 12 années.

RE: Resource Serving does not work (HTTP 404)

New Member Publications: 11 Date d'inscription: 17/03/11 Publications récentes
Me again..

I just found out that the resource serving works on Liferay (6.0.6).
On pluto (2.0.2) the file is not found.
thumbnail
Neil Griffin, modifié il y a 12 années.

RE: Resource Serving does not work (HTTP 404)

Liferay Legend Publications: 2655 Date d'inscription: 27/07/05 Publications récentes
The example jsf2-portlet does this, and it works on Liferay and Pluto: http://www.liferay.com/community/liferay-projects/liferay-faces/demos#jsf2-portlet

You see the portletfaces.org logo image in the upper right hand corner? That's from an image in src/main/webapp/resources/example. See: https://github.com/liferay/liferay-faces/blob/master/demos/bridge/jsf2-portlet/src/main/webapp/resources/example/

And it's references from inside a Facelet composite component:
https://github.com/liferay/liferay-faces/blob/master/demos/bridge/jsf2-portlet/src/main/webapp/resources/example-cc/sponsorButton.xhtml