You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Ritesh_121 <ri...@avibha.com> on 2009/09/22 19:13:44 UTC

T5.1 How to support non English characters in url

Hello Everyone,

In our application we were supporting other non English characters in url
in Tapestry 5.0.5. 

At that time it was working fine without any problem but now after upgrading
to 5.1 
we are getting an exception as below -


java.lang.IllegalArgumentException :
Input string 'niño' is not valid; the character 'ñ' at position 3 is not
valid.

#
org.apache.tapestry5.internal.services.URLEncoderImpl.decode(URLEncoderImpl.java:143)
# $URLEncoder_123e2454158.decode($URLEncoder_123e2454158.java)
#
org.apache.tapestry5.internal.services.ContextPathEncoderImpl.decodePath(ContextPathEncoderImpl.java:86)
#
$ContextPathEncoder_123e2454150.decodePath($ContextPathEncoder_123e2454150.java)
#
org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.checkIfPage(ComponentEventLinkEncoderImpl.java:333)
#
org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodePageRenderRequest(ComponentEventLinkEncoderImpl.java:313)
#
$ComponentEventLinkEncoder_123e245414e.decodePageRenderRequest($ComponentEventLinkEncoder_123e245414e.java)
#
org.apache.tapestry5.internal.services.PageRenderDispatcher.dispatch(PageRenderDispatcher.java:41)
# $Dispatcher_123e245414f.dispatch($Dispatcher_123e245414f.java)
# $Dispatcher_123e2454144.dispatch($Dispatcher_123e2454144.java)
#
org.apache.tapestry5.services.TapestryModule$RequestHandlerTerminator.service(TapestryModule.java:245)
#
org.apache.tapestry5.internal.services.RequestErrorFilter.service(RequestErrorFilter.java:26)
# $RequestHandler_123e2454145.service($RequestHandler_123e2454145.java)
#
org.apache.tapestry5.services.TapestryModule$4.service(TapestryModule.java:778)
# $RequestHandler_123e2454145.service($RequestHandler_123e2454145.java)
#
org.apache.tapestry5.services.TapestryModule$3.service(TapestryModule.java:767)
# $RequestHandler_123e2454145.service($RequestHandler_123e2454145.java)
#
org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:85)
# $RequestHandler_123e2454145.service($RequestHandler_123e2454145.java)
#
org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:90)
#
org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:81)
#
org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:85)
#
org.apache.tapestry5.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:103)
# $RequestHandler_123e2454145.service($RequestHandler_123e2454145.java)
# $RequestHandler_123e245413b.service($RequestHandler_123e245413b.java)
#
org.apache.tapestry5.services.TapestryModule$HttpServletRequestHandlerTerminator.service(TapestryModule.java:197)
# org.apache.tapestry5.internal.gzip.GZipFilter.service(GZipFilter.java:53)
#
$HttpServletRequestHandler_123e245413d.service($HttpServletRequestHandler_123e245413d.java)
#
org.apache.tapestry5.upload.internal.services.MultipartServletRequestFilter.service(MultipartServletRequestFilter.java:44)
#
$HttpServletRequestHandler_123e245413d.service($HttpServletRequestHandler_123e245413d.java)
#
org.apache.tapestry5.internal.services.IgnoredPathsFilter.service(IgnoredPathsFilter.java:62)
#
$HttpServletRequestFilter_123e245413a.service($HttpServletRequestFilter_123e245413a.java)
#
$HttpServletRequestHandler_123e245413d.service($HttpServletRequestHandler_123e245413d.java)
#
org.apache.tapestry5.services.TapestryModule$2.service(TapestryModule.java:726)
#
$HttpServletRequestHandler_123e245413d.service($HttpServletRequestHandler_123e245413d.java)
#
$HttpServletRequestHandler_123e2454137.service($HttpServletRequestHandler_123e2454137.java)
# org.apache.tapestry5.TapestryFilter.doFilter(TapestryFilter.java:127) 


Is there any configuration I am missing to support non English characters in
url?

I have also set the url encoding for request as "UTF-8" in filter, still it
is not working.

I am trying to find solution for this from couple hours now, if any one have
solution
for this it will be great help.  :-)

Thanks in advance.

From,
Ritesh

-- 
View this message in context: http://www.nabble.com/T5.1-How-to-support-non-English-characters-in-url-tp25530831p25530831.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


Re: T5.1 How to support non English characters in url

Posted by Ritesh_121 <ri...@avibha.com>.
Hello Thiago,

Thanks for reply.  :-)

> You'll need to override the URLEncoder service with one of your own.

Ok, so I will need to override the URLEncoder service with my own.

By looking at the Tapestry source of existing URLEncoderImpl I found that
only 
English alphabets (small and capital case), digits and some punctuation
("-", "_", ".", ":") 
are allowed in url.

I know this is as per the standards specified by W3C for a URL.

Is it possible to find  non English as well as English characters which
should not be allowed in url ?

Thanks in advance.

From,
Ritesh
-- 
View this message in context: http://www.nabble.com/T5.1-How-to-support-non-English-characters-in-url-tp25530831p25609615.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


Re: T5.1 How to support non English characters in url

Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
Em Tue, 22 Sep 2009 14:13:44 -0300, Ritesh_121 <ri...@avibha.com>  
escreveu:

> Hello Everyone,

Hi!

> In our application we were supporting other non English characters in url
> in Tapestry 5.0.5. At that time it was working fine without any problem  
> but now after upgrading to 5.1 we are getting an exception as below -

You'll need to override the URLEncoder service with one of your own.

-- 
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago

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