If I remove the leading slash, i.e. templates/template.xhtml, the error disappears.
But this is not as it should be, so I assume that is a bug in jboss tools.
VPE resolves the relative path templates/template.xhtml without any problems since it is relative to the current file.
/templates/template.xhtml is on the other hand absolute and thus it needs to know the root of your webapp to resolve it.
A couple of ways to do that:
1) Edit VPE page settings for the xhtml to set the root webcontent.
2) Right click project and click Configure > Enable JSF which will setup WTP on the project
3) install Jboss tools maven integration and Maven > Update Project Configuration and it shuold be enabled on its own.
#3 is probably your best option here since you are using Maven.
Thanks for the reply.
I had JSF Capabilities already enabled and JBoss Maven integration installed, but the problem persists.
Could you please explain your point 1 a bit more detailed? Where do I edit the page settings?
Could you check what you have in .settings/org.eclipse.wst.common.component file? I'm curious what is in wb-resource element with deploy-path="/" attribute?
Alexej, your third option worked. And after restarting Eclipse, now it works even without setting the absolute folder!
Denis, the file content is:
<?xml version="1.0" encoding="UTF-8"?>
<project-modules id="moduleCoreId" project-version="1.5.0">
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
<wb-resource deploy-path="/" source-path="/src/main/webapp"/>
<property name="context-root" value="smsurbano"/>
<property name="java-output-path" value="/smsurbano/target/classes"/>
Before, I had another line in the file (see thread http://community.jboss.org/thread/162518?tstart=0) which was always recreated when I right-clicked on the project and chose Maven>Update Project Configuration. Now I deleted it again and this time it was not recreated (due to the restart of Eclipse?). Maybe this was the reason that the path was not resolved correctly.