You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by "Thomas Burns (JIRA)" <co...@jakarta.apache.org> on 2005/05/03 21:36:07 UTC
[jira] Created: (JELLY-212) JellyContext mishandles custom URLs
JellyContext mishandles custom URLs
-----------------------------------
Key: JELLY-212
URL: http://issues.apache.org/jira/browse/JELLY-212
Project: jelly
Type: Bug
Components: core / taglib.core
Versions: 1.0-RC1
Reporter: Thomas Burns
Attachments: URLFriendlyJellyContext.java
The JellyContext assumes all URLs can be decomposed into a String, and then recomposed via a simple "new URL(urlString)" invocation. This causes significant problems when custom URL handlers are involved, since a user may have created a URL and passed in a custom URLHandler. In a case such as this, if the URL is reduced to a String any subsequent reification may result in either a MalformedURLException, or in a new URL with the default system URLHandler rather than the custom handler.
Of primary concern are the following methods:
createRelativeURL(URL, String)
getJellyContextURL(InputSource)
getJellyContextURL(URL)
runScript(URL, XMLOutput, boolean, boolean)
Attached is a subclass of JellyContext, URLFriendlyJellyContext, that resolves many URL-handling issues, assuming that the context is created with a valid URL, and subsequent operations (such as runScript()) pass String arguments that are either absolute or relative paths to be based upon the URL used to initialize the context.
The content of URLFriendlyJellyContext can easily be merged into the JellyContext class, making JellyContext much more robust when handling custom URLs.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
[jira] Updated: (JELLY-212) JellyContext mishandles custom URLs
Posted by "Thomas Burns (JIRA)" <co...@jakarta.apache.org>.
[ http://issues.apache.org/jira/browse/JELLY-212?page=all ]
Thomas Burns updated JELLY-212:
-------------------------------
Attachment: URLFriendlyJellyContext.java
Sample solution to many of JellyContext's URL-handling issues
> JellyContext mishandles custom URLs
> -----------------------------------
>
> Key: JELLY-212
> URL: http://issues.apache.org/jira/browse/JELLY-212
> Project: jelly
> Type: Bug
> Components: core / taglib.core
> Versions: 1.0-RC1
> Reporter: Thomas Burns
> Attachments: URLFriendlyJellyContext.java
>
> The JellyContext assumes all URLs can be decomposed into a String, and then recomposed via a simple "new URL(urlString)" invocation. This causes significant problems when custom URL handlers are involved, since a user may have created a URL and passed in a custom URLHandler. In a case such as this, if the URL is reduced to a String any subsequent reification may result in either a MalformedURLException, or in a new URL with the default system URLHandler rather than the custom handler.
> Of primary concern are the following methods:
> createRelativeURL(URL, String)
> getJellyContextURL(InputSource)
> getJellyContextURL(URL)
> runScript(URL, XMLOutput, boolean, boolean)
> Attached is a subclass of JellyContext, URLFriendlyJellyContext, that resolves many URL-handling issues, assuming that the context is created with a valid URL, and subsequent operations (such as runScript()) pass String arguments that are either absolute or relative paths to be based upon the URL used to initialize the context.
> The content of URLFriendlyJellyContext can easily be merged into the JellyContext class, making JellyContext much more robust when handling custom URLs.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org