You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Geoffrey Wiseman <ge...@gmail.com> on 2009/03/17 17:21:56 UTC
URL Encoder
I'm having some URL encoder issues, and I'm not sure why. Here's the Jetty
log:127.0.0.1 - - [17/Mar/2009:11:17:53 -0500] "GET
/myapp/images/proposal%20review%20images/proposal-scale-neutral.jpg
HTTP/1.1" 500 9912
Here's the Tapestry exception:
ERROR RequestExceptionHandler - Processing of request failed with uncaught
exception: Input string 'proposal review images' is not valid; the character
' ' at position 9 is not valid.
java.lang.IllegalArgumentException: Input string 'proposal review images' is
not valid; the character ' ' at p
osition 9 is not valid.
at
org.apache.tapestry5.internal.services.URLEncoderImpl.decode(URLEncoderImpl.java:143)
at $URLEncoder_1201538154f.decode($URLEncoder_1201538154f.java)
at
org.apache.tapestry5.internal.services.ContextPathEncoderImpl.decodePath(ContextPathEncoderImpl.jav
a:70)
at
$ContextPathEncoder_1201538154c.decodePath($ContextPathEncoder_1201538154c.java)
at
org.apache.tapestry5.internal.services.PageRenderDispatcher.process(PageRenderDispatcher.java:88)
at
org.apache.tapestry5.internal.services.PageRenderDispatcher.dispatch(PageRenderDispatcher.java:71)
at $Dispatcher_1201538154d.dispatch($Dispatcher_1201538154d.java)
at $Dispatcher_12015381540.dispatch($Dispatcher_12015381540.java)
at
org.apache.tapestry5.services.TapestryModule$17.service(TapestryModule.java:1029)
at
org.apache.tapestry5.internal.services.LocalizationFilter.service(LocalizationFilter.java:42)
at
$RequestHandler_12015381541.service($RequestHandler_12015381541.java)
at
org.apache.tapestry5.internal.services.RequestErrorFilter.service(RequestErrorFilter.java:26)
at
$RequestHandler_12015381541.service($RequestHandler_12015381541.java)
at
org.apache.tapestry5.services.TapestryModule$3.service(TapestryModule.java:621)
at
$RequestHandler_12015381541.service($RequestHandler_12015381541.java)
at
org.apache.tapestry5.services.TapestryModule$2.service(TapestryModule.java:611)
at
$RequestHandler_12015381541.service($RequestHandler_12015381541.java)
at
org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:85)
at
$RequestHandler_12015381541.service($RequestHandler_12015381541.java)
at
org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:93
)
at
org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:84
)
at
org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:83)
at
org.apache.tapestry5.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:106
)
at
$RequestHandler_12015381541.service($RequestHandler_12015381541.java)
at
$RequestHandler_12015381538.service($RequestHandler_12015381538.java)
at
org.apache.tapestry5.services.TapestryModule$16.service(TapestryModule.java:1007)
at
org.apache.tapestry5.internal.services.IgnoredPathsFilter.service(IgnoredPathsFilter.java:62)
at
$HttpServletRequestFilter_12015381537.service($HttpServletRequestFilter_12015381537.java)
at
$HttpServletRequestHandler_12015381539.service($HttpServletRequestHandler_12015381539.java)
at
$HttpServletRequestHandler_12015381536.service($HttpServletRequestHandler_12015381536.java)
at
org.apache.tapestry5.TapestryFilter.doFilter(TapestryFilter.java:179)
at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1139)
at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:378)
at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
at
org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:417)
at
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
at
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:324)
at
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:535)
at
org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:865)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:539)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
at
org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:520)
It seems like Tapestry is complaining that the URL contains a space, when
jetty and firebug both agree that the request is being made with a %20.
Thoughts on what to do about this?
- Geoffrey
--
Geoffrey Wiseman
http://www.geoffreywiseman.ca/
Re: URL Encoder
Posted by Geoffrey Wiseman <ge...@gmail.com>.
On Tue, Mar 17, 2009 at 12:24 PM, Angelo Chen <an...@yahoo.com.hk>wrote:
> looks like you have exactly the same problem as mine. well, actually it is
> easier to adjust, problem is, when that links already given out, and you
> found out T5 did some changes in the new version not accepting the links,
> that's really problem.
>
No, in my case I've been on 5.0.18 the whole time (I've only been using T5
for a week or two now). At the moment, I've got some requests for assets
going to the wrong URLs. I'm looking into it, but at the same time, I'd
rather not have requests that start with a page name and have encoded spaces
in it cause a server exception, which is what's currently happening.
- Geoffrey
--
Geoffrey Wiseman
http://www.geoffreywiseman.ca/
Re: URL Encoder
Posted by Angelo Chen <an...@yahoo.com.hk>.
looks like you have exactly the same problem as mine. well, actually it is
easier to adjust, problem is, when that links already given out, and you
found out T5 did some changes in the new version not accepting the links,
that's really problem.
Geoffrey Wiseman wrote:
>
> I'm having some URL encoder issues, and I'm not sure why. Here's the
> Jetty
> log:127.0.0.1 - - [17/Mar/2009:11:17:53 -0500] "GET
> /myapp/images/proposal%20review%20images/proposal-scale-neutral.jpg
> HTTP/1.1" 500 9912
>
> Here's the Tapestry exception:
> ERROR RequestExceptionHandler - Processing of request failed with uncaught
> exception: Input string 'proposal review images' is not valid; the
> character
> ' ' at position 9 is not valid.
> java.lang.IllegalArgumentException: Input string 'proposal review images'
> is
> not valid; the character ' ' at p
> osition 9 is not valid.
> at
> org.apache.tapestry5.internal.services.URLEncoderImpl.decode(URLEncoderImpl.java:143)
> at $URLEncoder_1201538154f.decode($URLEncoder_1201538154f.java)
> at
> org.apache.tapestry5.internal.services.ContextPathEncoderImpl.decodePath(ContextPathEncoderImpl.jav
> a:70)
> at
> $ContextPathEncoder_1201538154c.decodePath($ContextPathEncoder_1201538154c.java)
> at
> org.apache.tapestry5.internal.services.PageRenderDispatcher.process(PageRenderDispatcher.java:88)
> at
> org.apache.tapestry5.internal.services.PageRenderDispatcher.dispatch(PageRenderDispatcher.java:71)
> at $Dispatcher_1201538154d.dispatch($Dispatcher_1201538154d.java)
> at $Dispatcher_12015381540.dispatch($Dispatcher_12015381540.java)
> at
> org.apache.tapestry5.services.TapestryModule$17.service(TapestryModule.java:1029)
> at
> org.apache.tapestry5.internal.services.LocalizationFilter.service(LocalizationFilter.java:42)
> at
> $RequestHandler_12015381541.service($RequestHandler_12015381541.java)
> at
> org.apache.tapestry5.internal.services.RequestErrorFilter.service(RequestErrorFilter.java:26)
> at
> $RequestHandler_12015381541.service($RequestHandler_12015381541.java)
> at
> org.apache.tapestry5.services.TapestryModule$3.service(TapestryModule.java:621)
> at
> $RequestHandler_12015381541.service($RequestHandler_12015381541.java)
> at
> org.apache.tapestry5.services.TapestryModule$2.service(TapestryModule.java:611)
> at
> $RequestHandler_12015381541.service($RequestHandler_12015381541.java)
> at
> org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:85)
> at
> $RequestHandler_12015381541.service($RequestHandler_12015381541.java)
> at
> org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:93
> )
> at
> org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:84
> )
> at
> org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:83)
> at
> org.apache.tapestry5.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:106
> )
> at
> $RequestHandler_12015381541.service($RequestHandler_12015381541.java)
> at
> $RequestHandler_12015381538.service($RequestHandler_12015381538.java)
> at
> org.apache.tapestry5.services.TapestryModule$16.service(TapestryModule.java:1007)
> at
> org.apache.tapestry5.internal.services.IgnoredPathsFilter.service(IgnoredPathsFilter.java:62)
> at
> $HttpServletRequestFilter_12015381537.service($HttpServletRequestFilter_12015381537.java)
> at
> $HttpServletRequestHandler_12015381539.service($HttpServletRequestHandler_12015381539.java)
> at
> $HttpServletRequestHandler_12015381536.service($HttpServletRequestHandler_12015381536.java)
> at
> org.apache.tapestry5.TapestryFilter.doFilter(TapestryFilter.java:179)
> at
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1139)
> at
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:378)
> at
> org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
> at
> org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
> at
> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
> at
> org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:417)
> at
> org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
> at
> org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
> at
> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
> at org.mortbay.jetty.Server.handle(Server.java:324)
> at
> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:535)
> at
> org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:865)
> at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:539)
> at
> org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
> at
> org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
> at
> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
> at
> org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:520)
>
> It seems like Tapestry is complaining that the URL contains a space, when
> jetty and firebug both agree that the request is being made with a %20.
> Thoughts on what to do about this?
>
> - Geoffrey
> --
> Geoffrey Wiseman
> http://www.geoffreywiseman.ca/
>
>
--
View this message in context: http://www.nabble.com/URL-Encoder-tp22562935p22562983.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org