tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Howard M. Lewis Ship (JIRA)" <tapestry-...@jakarta.apache.org>
Subject [jira] Closed: (TAPESTRY-595) Resource prefixes not honored inside <page>'s specification-path attribute
Date Mon, 12 Sep 2005 00:05:31 GMT
     [ http://issues.apache.org/jira/browse/TAPESTRY-595?page=all ]
Howard M. Lewis Ship closed TAPESTRY-595:

    Fix Version: 4.0
     Resolution: Fixed

This now works for <library>, <page> and <component-type> elements in an
application or library specification.  You may now use classpath: or context: prefixes.

The old idiom, that a leading slash indicates a resource on the classpath, has been maintained.

> Resource prefixes not honored inside <page>'s specification-path attribute
> --------------------------------------------------------------------------
>          Key: TAPESTRY-595
>          URL: http://issues.apache.org/jira/browse/TAPESTRY-595
>      Project: Tapestry
>         Type: Bug
>   Components: Framework
>     Versions: 4.0
>  Environment: winxp, Java5, Jboss 4.0.2/Tomcat
>     Reporter: Howard M. Lewis Ship
>     Assignee: Howard M. Lewis Ship
>     Priority: Critical
>      Fix For: 4.0

> 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),
> 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
> -->

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org

View raw message