You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Kevin Menard (JIRA)" <de...@tapestry.apache.org> on 2007/11/09 16:16:50 UTC
[jira] Created: (TAPESTRY-1896) Paths wrong for context assets in
root context.
Paths wrong for context assets in root context.
-----------------------------------------------
Key: TAPESTRY-1896
URL: https://issues.apache.org/jira/browse/TAPESTRY-1896
Project: Tapestry
Issue Type: Bug
Components: Framework
Affects Versions: 5.0.6
Environment: Java 5, MacOS X 10.5, Jetty 6.1.
Reporter: Kevin Menard
Calling asset.getResource().getPath() on a context asset in a webapp mapped to the root context yields an incorrect path. The path does not have the leading "/", which represents the context. As a result, linked in assets (e.g., CSS or images) will work fine if at the root level of the webapp, but if you go down to a deeper level, the asset path doesn't work and Tapestry thinks you're trying to load in non-existent pages.
When mapped to any other context, there is no problem.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org
[jira] Commented: (TAPESTRY-1896) Paths wrong for context assets in
root context.
Posted by "Kevin Menard (JIRA)" <de...@tapestry.apache.org>.
[ https://issues.apache.org/jira/browse/TAPESTRY-1896?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12547491 ]
Kevin Menard commented on TAPESTRY-1896:
----------------------------------------
I think it's a case of confusion. According to the documentation for getPath() it "Return the path (the combination of folder and file)." It appears to be a difference between relative and absolute.
FWIW, I actually ran into this problem taking the code from an "Image" component off the T5 wiki. Undoubtedly that's where I got confused first, but at least one other has as well. So, adding some extra langage to the javadoc to disambiguate would probably help.
> Paths wrong for context assets in root context.
> -----------------------------------------------
>
> Key: TAPESTRY-1896
> URL: https://issues.apache.org/jira/browse/TAPESTRY-1896
> Project: Tapestry
> Issue Type: Bug
> Components: Framework
> Affects Versions: 5.0.6
> Environment: Java 5, MacOS X 10.5, Jetty 6.1.
> Reporter: Kevin Menard
> Assignee: Howard M. Lewis Ship
>
> Calling asset.getResource().getPath() on a context asset in a webapp mapped to the root context yields an incorrect path. The path does not have the leading "/", which represents the context. As a result, linked in assets (e.g., CSS or images) will work fine if at the root level of the webapp, but if you go down to a deeper level, the asset path doesn't work and Tapestry thinks you're trying to load in non-existent pages.
> When mapped to any other context, there is no problem.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org
[jira] Commented: (TAPESTRY-1896) Paths wrong for context assets in
root context.
Posted by "Howard M. Lewis Ship (JIRA)" <de...@tapestry.apache.org>.
[ https://issues.apache.org/jira/browse/TAPESTRY-1896?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12546399 ]
Howard M. Lewis Ship commented on TAPESTRY-1896:
------------------------------------------------
I'm having trouble reproducing this.
I've taken the AssetDemo class from the integration test app and moved it into a nested package. I even changed the context from "/" to "/app1" and still everything lined up correctly.
I can reference context assets (using a path relative to the context root).
It's not important what Resource.getPath() returns, it's all about what Asset.toClientURL returns and that is working correctly.
> Paths wrong for context assets in root context.
> -----------------------------------------------
>
> Key: TAPESTRY-1896
> URL: https://issues.apache.org/jira/browse/TAPESTRY-1896
> Project: Tapestry
> Issue Type: Bug
> Components: Framework
> Affects Versions: 5.0.6
> Environment: Java 5, MacOS X 10.5, Jetty 6.1.
> Reporter: Kevin Menard
>
> Calling asset.getResource().getPath() on a context asset in a webapp mapped to the root context yields an incorrect path. The path does not have the leading "/", which represents the context. As a result, linked in assets (e.g., CSS or images) will work fine if at the root level of the webapp, but if you go down to a deeper level, the asset path doesn't work and Tapestry thinks you're trying to load in non-existent pages.
> When mapped to any other context, there is no problem.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org
[jira] Closed: (TAPESTRY-1896) Paths wrong for context assets in
root context.
Posted by "Howard M. Lewis Ship (JIRA)" <de...@tapestry.apache.org>.
[ https://issues.apache.org/jira/browse/TAPESTRY-1896?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Howard M. Lewis Ship closed TAPESTRY-1896.
------------------------------------------
Resolution: Invalid
Assignee: Howard M. Lewis Ship
I've updated the tests to prove that this is not valid. It may be that I misunderstood the problem, if so please re-open and provide an example that shows the broken behavior.
> Paths wrong for context assets in root context.
> -----------------------------------------------
>
> Key: TAPESTRY-1896
> URL: https://issues.apache.org/jira/browse/TAPESTRY-1896
> Project: Tapestry
> Issue Type: Bug
> Components: Framework
> Affects Versions: 5.0.6
> Environment: Java 5, MacOS X 10.5, Jetty 6.1.
> Reporter: Kevin Menard
> Assignee: Howard M. Lewis Ship
>
> Calling asset.getResource().getPath() on a context asset in a webapp mapped to the root context yields an incorrect path. The path does not have the leading "/", which represents the context. As a result, linked in assets (e.g., CSS or images) will work fine if at the root level of the webapp, but if you go down to a deeper level, the asset path doesn't work and Tapestry thinks you're trying to load in non-existent pages.
> When mapped to any other context, there is no problem.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org