You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Robert Zeigler (JIRA)" <ta...@jakarta.apache.org> on 2007/03/12 15:54:09 UTC
[jira] Created: (TAPESTRY-1343) StringIndexOutOfBoundsException
thrown when trying to find page name when request.getPath() returns an
empty string.
StringIndexOutOfBoundsException thrown when trying to find page name when request.getPath() returns an empty string.
--------------------------------------------------------------------------------------------------------------------
Key: TAPESTRY-1343
URL: https://issues.apache.org/jira/browse/TAPESTRY-1343
Project: Tapestry
Issue Type: Bug
Affects Versions: 5.0.3
Environment: linux, tomcat4 ("connected" to apache1.3 via modjk), java 1.5
Reporter: Robert Zeigler
Fix For: 5.0.3
PageRenderDispatcher.dispatch assumes that request.getPath() will always return at least "/". However, it is possible with tomcat for getPath() to return an empty string.
http://www.foo.com/context will return an empty string in tomcat (not in jetty).
--
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] Updated: (TAPESTRY-1343) Under Tomcat, a root path URL such
as http://.../context (without a trailing slash) causes a
StringIndexOutOfBoundsException inside PageRenderDispatcher
Posted by "Howard M. Lewis Ship (JIRA)" <de...@tapestry.apache.org>.
[ https://issues.apache.org/jira/browse/TAPESTRY-1343?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Howard M. Lewis Ship updated TAPESTRY-1343:
-------------------------------------------
Summary: Under Tomcat, a root path URL such as http://.../context (without a trailing slash) causes a StringIndexOutOfBoundsException inside PageRenderDispatcher (was: StringIndexOutOfBoundsException thrown when trying to find page name when request.getPath() returns an empty string.)
> Under Tomcat, a root path URL such as http://.../context (without a trailing slash) causes a StringIndexOutOfBoundsException inside PageRenderDispatcher
> --------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: TAPESTRY-1343
> URL: https://issues.apache.org/jira/browse/TAPESTRY-1343
> Project: Tapestry
> Issue Type: Bug
> Affects Versions: 5.0.3
> Environment: linux, tomcat4 ("connected" to apache1.3 via modjk), java 1.5
> Reporter: Robert Zeigler
> Fix For: 5.0.3
>
> Attachments: TAPESTRY-1343.patch, TestPageRenderDispatcher.java
>
>
> PageRenderDispatcher.dispatch assumes that request.getPath() will always return at least "/". However, it is possible with tomcat for getPath() to return an empty string.
> http://www.foo.com/context will return an empty string in tomcat (not in jetty).
--
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] Updated: (TAPESTRY-1343) StringIndexOutOfBoundsException
thrown when trying to find page name when request.getPath() returns an
empty string.
Posted by "Robert Zeigler (JIRA)" <ta...@jakarta.apache.org>.
[ https://issues.apache.org/jira/browse/TAPESTRY-1343?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Robert Zeigler updated TAPESTRY-1343:
-------------------------------------
Attachment: TAPESTRY-1343.patch
patch to fix the issue. Uses ioc's Defense.notBlank to check for the blank string.
> StringIndexOutOfBoundsException thrown when trying to find page name when request.getPath() returns an empty string.
> --------------------------------------------------------------------------------------------------------------------
>
> Key: TAPESTRY-1343
> URL: https://issues.apache.org/jira/browse/TAPESTRY-1343
> Project: Tapestry
> Issue Type: Bug
> Affects Versions: 5.0.3
> Environment: linux, tomcat4 ("connected" to apache1.3 via modjk), java 1.5
> Reporter: Robert Zeigler
> Fix For: 5.0.3
>
> Attachments: TAPESTRY-1343.patch, TestPageRenderDispatcher.java
>
>
> PageRenderDispatcher.dispatch assumes that request.getPath() will always return at least "/". However, it is possible with tomcat for getPath() to return an empty string.
> http://www.foo.com/context will return an empty string in tomcat (not in jetty).
--
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] Updated: (TAPESTRY-1343) StringIndexOutOfBoundsException
thrown when trying to find page name when request.getPath() returns an
empty string.
Posted by "Robert Zeigler (JIRA)" <ta...@jakarta.apache.org>.
[ https://issues.apache.org/jira/browse/TAPESTRY-1343?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Robert Zeigler updated TAPESTRY-1343:
-------------------------------------
Attachment: TestPageRenderDispatcher.java
TestNG test class to illustrate the problem.
> StringIndexOutOfBoundsException thrown when trying to find page name when request.getPath() returns an empty string.
> --------------------------------------------------------------------------------------------------------------------
>
> Key: TAPESTRY-1343
> URL: https://issues.apache.org/jira/browse/TAPESTRY-1343
> Project: Tapestry
> Issue Type: Bug
> Affects Versions: 5.0.3
> Environment: linux, tomcat4 ("connected" to apache1.3 via modjk), java 1.5
> Reporter: Robert Zeigler
> Fix For: 5.0.3
>
> Attachments: TestPageRenderDispatcher.java
>
>
> PageRenderDispatcher.dispatch assumes that request.getPath() will always return at least "/". However, it is possible with tomcat for getPath() to return an empty string.
> http://www.foo.com/context will return an empty string in tomcat (not in jetty).
--
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-1343) Under Tomcat, a root path URL
such as http://.../context (without a trailing slash) causes a
StringIndexOutOfBoundsException inside PageRenderDispatcher
Posted by "Howard M. Lewis Ship (JIRA)" <de...@tapestry.apache.org>.
[ https://issues.apache.org/jira/browse/TAPESTRY-1343?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12480457 ]
Howard M. Lewis Ship commented on TAPESTRY-1343:
------------------------------------------------
Robert ... triggering a thrown exception to avoid a call to String.equals("") is not exactly efficient :-) Thanks for the problem description and I hope this fixes your issue.
> Under Tomcat, a root path URL such as http://.../context (without a trailing slash) causes a StringIndexOutOfBoundsException inside PageRenderDispatcher
> --------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: TAPESTRY-1343
> URL: https://issues.apache.org/jira/browse/TAPESTRY-1343
> Project: Tapestry
> Issue Type: Bug
> Affects Versions: 5.0.3
> Environment: linux, tomcat4 ("connected" to apache1.3 via modjk), java 1.5
> Reporter: Robert Zeigler
> Assigned To: Howard M. Lewis Ship
> Fix For: 5.0.3
>
> Attachments: TAPESTRY-1343.patch, TestPageRenderDispatcher.java
>
>
> PageRenderDispatcher.dispatch assumes that request.getPath() will always return at least "/". However, it is possible with tomcat for getPath() to return an empty string.
> http://www.foo.com/context will return an empty string in tomcat (not in jetty).
--
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-1343) Under Tomcat, a root path URL such
as http://.../context (without a trailing slash) causes a
StringIndexOutOfBoundsException inside PageRenderDispatcher
Posted by "Howard M. Lewis Ship (JIRA)" <de...@tapestry.apache.org>.
[ https://issues.apache.org/jira/browse/TAPESTRY-1343?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Howard M. Lewis Ship closed TAPESTRY-1343.
------------------------------------------
Resolution: Fixed
Assignee: Howard M. Lewis Ship
> Under Tomcat, a root path URL such as http://.../context (without a trailing slash) causes a StringIndexOutOfBoundsException inside PageRenderDispatcher
> --------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: TAPESTRY-1343
> URL: https://issues.apache.org/jira/browse/TAPESTRY-1343
> Project: Tapestry
> Issue Type: Bug
> Affects Versions: 5.0.3
> Environment: linux, tomcat4 ("connected" to apache1.3 via modjk), java 1.5
> Reporter: Robert Zeigler
> Assigned To: Howard M. Lewis Ship
> Fix For: 5.0.3
>
> Attachments: TAPESTRY-1343.patch, TestPageRenderDispatcher.java
>
>
> PageRenderDispatcher.dispatch assumes that request.getPath() will always return at least "/". However, it is possible with tomcat for getPath() to return an empty string.
> http://www.foo.com/context will return an empty string in tomcat (not in jetty).
--
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-1343) Under Tomcat, a root path URL
such as http://.../context (without a trailing slash) causes a
StringIndexOutOfBoundsException inside PageRenderDispatcher
Posted by "Robert Zeigler (JIRA)" <de...@tapestry.apache.org>.
[ https://issues.apache.org/jira/browse/TAPESTRY-1343?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12480466 ]
Robert Zeigler commented on TAPESTRY-1343:
------------------------------------------
My first version (which, obviously, I didn't use) just had a String.equals call. But then I remembered seeing the "notBlank" method elsewhere in the code, and wondered if that would be preferable for the sake of consistency in the code. Either way, it should fix the issue.
Robert
> Under Tomcat, a root path URL such as http://.../context (without a trailing slash) causes a StringIndexOutOfBoundsException inside PageRenderDispatcher
> --------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: TAPESTRY-1343
> URL: https://issues.apache.org/jira/browse/TAPESTRY-1343
> Project: Tapestry
> Issue Type: Bug
> Affects Versions: 5.0.3
> Environment: linux, tomcat4 ("connected" to apache1.3 via modjk), java 1.5
> Reporter: Robert Zeigler
> Assigned To: Howard M. Lewis Ship
> Fix For: 5.0.3
>
> Attachments: TAPESTRY-1343.patch, TestPageRenderDispatcher.java
>
>
> PageRenderDispatcher.dispatch assumes that request.getPath() will always return at least "/". However, it is possible with tomcat for getPath() to return an empty string.
> http://www.foo.com/context will return an empty string in tomcat (not in jetty).
--
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