Details
Description
stacktrace
- org.apache.tapestry.util.xml.DocumentParseException.<init>(DocumentParseException.java:45)
- org.apache.tapestry.parse.SpecificationParser.parseDocument(SpecificationParser.java:1676)
- org.apache.tapestry.parse.SpecificationParser.parsePageSpecification(SpecificationParser.java:1736
Looking at the code (and running it through the debugger), I found out that the url was null even though the resouce is not.
URL resourceURL = resource.getResourceURL();
if (resourceURL == null)
throw new DocumentParseException(ParseMessages.missingResource(resource), resource,null);
I'm using Tap 4.0, my application file contains the following :
<page name="Home" specification-path="/test/web/pages/Home.page"/>
and the Home.page looks like
<?xml version="1.0"?>
<page-specification class="org.apache.tapestry.html.BasePage"/>
the problem is .
according to the DTD the specification-path attribute in the page element is the "resource classpath". So this should be something like /my/package/name, alas the ContextResource class of Hivemind obtains the URL of the Resource via the ServletContext, which is NOT by classpath but by path in the servletcontext so like /WEB-INF/classes/my/package/name. Prefixing it with classpath or context don't seem to work.
<!-- =======================================================
Element: page
Contained by: application, library-specification
Defines a single page within the application. Each application will contain
at least one of these, to define the Home page.
Attributes:
name: A unique name for the application.
specification-path: The resource classpath of the component specification for the page.
-->
Attachments
Issue Links
- is cloned by
-
TAPESTRY-595 Resource prefixes not honored inside <page>'s specification-path attribute
- Closed
- is duplicated by
-
TAPESTRY-548 Poor reporting for missing script file
- Resolved