You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Leon Derks <le...@cumquat.nl> on 2008/12/10 23:19:44 UTC
[T5] 5.0.17 URLEncoderImpl.decode error
Hello
This evening I tried tapestry 5.0.17
When I type in the following url in my application:
http://localhost:8090/tapestry/test/user/user@company.com
I do get an java.lang.IllegalArgumentException
It says: "Input string 'user@company.com' is not valid; the character
'@' at position 5 is not valid."
Stacktrace:
org.apache.tapestry5.internal.services.URLEncoderImpl.decode(URLEncoderImpl.java:143)
org.apache.tapestry5.internal.services.ContextPathEncoderImpl.decodePath(ContextPathEncoderImpl.java:70)
org.apache.tapestry5.internal.services.PageRenderDispatcher.process(PageRenderDispatcher.java:88)
org.apache.tapestry5.internal.services.PageRenderDispatcher.dispatch(PageRenderDispatcher.java:71)
org.apache.tapestry5.services.TapestryModule$17.service(TapestryModule.java:1029)
I didn't had this problem in tapestry 5.0.14.
I searched in the changes, but couldn't find a change that would cause
this error.
Any ideas?
Leon
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: [T5] 5.0.17 URLEncoderImpl.decode error
Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
Em Thu, 11 Dec 2008 16:37:31 -0300, Blower, Andy
<An...@proquest.co.uk> escreveu:
> The main reason for this is Tapestry's new encoding scheme makes some of
> my application's URL's incredibly ugly with its $00xx replacements
> everywhere.
>
> What do you all think?
I agree, and the $00XX replacement is even more particularly ugly for us
Brazilians and any other people with languages that have accented
characters. The URLs become unreadable, and one of the best selling points
is the beauty and cleaniness of their URLs.
--
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
RE: [T5] 5.0.17 URLEncoderImpl.decode error
Posted by "Blower, Andy" <An...@proquest.co.uk>.
I think the new URL encoding scheme should have some characters added to the safe list, including @.
According to the BNF for URLs (http://www.w3.org/Addressing/URL/url-spec.html), the following characters are perfectly valid for URLs:
$-_@.&+-!*"'(),
-_. are already in the safe list, and I'm proposing that the others from the list above are all added as well. (except $ of course)
The main reason for this is Tapestry's new encoding scheme makes some of my application's URL's incredibly ugly with its $00xx replacements everywhere.
What do you all think?
Andy
> -----Original Message-----
> From: Thiago H. de Paula Figueiredo [mailto:thiagohp@gmail.com]
> Sent: 10 December 2008 23:28
> To: Tapestry users
> Subject: Re: [T5] 5.0.17 URLEncoderImpl.decode error
>
> Em Wed, 10 Dec 2008 19:19:44 -0300, Leon Derks <le...@cumquat.nl>
> escreveu:
>
> > Hello
>
> Hi!
>
> > I do get an java.lang.IllegalArgumentException
> > It says: "Input string 'user@company.com' is not valid; the character
> > '@' at position 5 is not valid."
> > I didn't had this problem in tapestry 5.0.14.
> > I searched in the changes, but couldn't find a change that would
> cause
> > this error.
>
> That's here: https://issues.apache.org/jira/browse/TAP5-302. Look at
> the
> last comment. The default URL encoding used by Tapestry was changed in
> 5.0.16.
>
> --
> 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
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: [T5] 5.0.17 URLEncoderImpl.decode error
Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
Em Wed, 10 Dec 2008 19:19:44 -0300, Leon Derks <le...@cumquat.nl>
escreveu:
> Hello
Hi!
> I do get an java.lang.IllegalArgumentException
> It says: "Input string 'user@company.com' is not valid; the character
> '@' at position 5 is not valid."
> I didn't had this problem in tapestry 5.0.14.
> I searched in the changes, but couldn't find a change that would cause
> this error.
That's here: https://issues.apache.org/jira/browse/TAP5-302. Look at the
last comment. The default URL encoding used by Tapestry was changed in
5.0.16.
--
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
Re: [T5] 5.0.17 URLEncoderImpl.decode error
Posted by Martijn Brinkers <ma...@gmail.com>.
I had a similar requirement and decided not use the activation context
for this but do it the 'old fashioned' way with parameters
(ie. ?email=blabla) by injecting the Request service.
If your freemaker code runs inside a Tapestry application I guess you
can add the URLEncoder service to the freemaker context and use if from
a freemarker template
Martijn
On Thu, 2008-12-11 at 09:34 +0100, Leon Derks wrote:
> He Martijn,
>
> The URL is not really generated. I was playing with Freemarker (Java
> template engine).
> I tried it to send a mail...
> The URL is in the mail template and the email param is replaced by
> freemarker:
> <a href="http://localhost:8090/tapestry/test/user/${user.userEmail}"/>
>
> My test was to send an email with freemarker with a link in it. I want
> to be able to click that link and show the email on the screen.
> So for me it is not handy that the URL encoding has changed, because I
> can not use the org.apache.tapestry5.internal.services.URLEncoderImpl
> inside my template.
>
> Any ideas how I can solve this?
>
> greetz,
> Leon
>
>
> Martijn Brinkers wrote:
> > I guess the URL is generated outside of Tapestry? because if you
> > passivate or create a link from Tapestry the parameters are encoded with
> > the Tapestry 'special' encoding.
> >
> > You can probably use the default encoder implementation if you want to
> > encode from outside of Tapestry:
> >
> > org.apache.tapestry5.internal.services.URLEncoderImpl
> >
> > Martijn Brinkers
> >
> >
> > On Wed, 2008-12-10 at 23:43 +0100, Leon Derks wrote:
> >
> >> Hi Martijn,
> >>
> >> Thanks!
> >> Yes, http://localhost:8090/tapestry/test/user/user$0040company.com
> >> works, when I change the @ into $0040 manually.
> >>
> >> But how can I automatically translate @ into $0040, because my code
> >> still generates the '@' character in the url.
> >>
> >> greetz,
> >> Leon
> >>
> >>
> >> Martijn Brinkers wrote:
> >>
> >>> The URL encoder has been changed.
> >>>
> >>> @ for example is now encoded as $0040
> >>>
> >>> See https://issues.apache.org/jira/browse/TAP5-302
> >>>
> >>>
> >>> Search the archive for what and why things have changed
> >>> http://tapestry.markmail.org
> >>>
> >>> Martijn Brinkers
> >>>
> >>>
> >>>
> >>> On Wed, 2008-12-10 at 23:19 +0100, Leon Derks wrote:
> >>>
> >>>
> >>>> Hello
> >>>> This evening I tried tapestry 5.0.17
> >>>>
> >>>> When I type in the following url in my application:
> >>>> http://localhost:8090/tapestry/test/user/user@company.com
> >>>>
> >>>> I do get an java.lang.IllegalArgumentException
> >>>> It says: "Input string 'user@company.com' is not valid; the character
> >>>> '@' at position 5 is not valid."
> >>>> Stacktrace:
> >>>>
> >>>> org.apache.tapestry5.internal.services.URLEncoderImpl.decode(URLEncoderImpl.java:143)
> >>>>
> >>>> org.apache.tapestry5.internal.services.ContextPathEncoderImpl.decodePath(ContextPathEncoderImpl.java:70)
> >>>>
> >>>> org.apache.tapestry5.internal.services.PageRenderDispatcher.process(PageRenderDispatcher.java:88)
> >>>>
> >>>> org.apache.tapestry5.internal.services.PageRenderDispatcher.dispatch(PageRenderDispatcher.java:71)
> >>>>
> >>>> org.apache.tapestry5.services.TapestryModule$17.service(TapestryModule.java:1029)
> >>>>
> >>>> I didn't had this problem in tapestry 5.0.14.
> >>>> I searched in the changes, but couldn't find a change that would cause
> >>>> this error.
> >>>>
> >>>> Any ideas?
> >>>>
> >>>> Leon
> >>>>
> >>>> ---------------------------------------------------------------------
> >>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> >>>> For additional commands, e-mail: users-help@tapestry.apache.org
> >>>>
> >>>>
> >>>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> >>> For additional commands, e-mail: users-help@tapestry.apache.org
> >>>
> >>>
> >>> __________ NOD32 3682 (20081210) Informatie __________
> >>>
> >>> Dit bericht is gecontroleerd door het NOD32 Antivirus Systeem.
> >>> http://www.nod32.nl
> >>>
> >>>
> >>>
> >>>
> >>>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> >> For additional commands, e-mail: users-help@tapestry.apache.org
> >>
> >>
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
> >
> > __________ NOD32 3682 (20081210) Informatie __________
> >
> > Dit bericht is gecontroleerd door het NOD32 Antivirus Systeem.
> > http://www.nod32.nl
> >
> >
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: [T5] 5.0.17 URLEncoderImpl.decode error
Posted by Leon Derks <le...@cumquat.nl>.
He Martijn,
The URL is not really generated. I was playing with Freemarker (Java
template engine).
I tried it to send a mail...
The URL is in the mail template and the email param is replaced by
freemarker:
<a href="http://localhost:8090/tapestry/test/user/${user.userEmail}"/>
My test was to send an email with freemarker with a link in it. I want
to be able to click that link and show the email on the screen.
So for me it is not handy that the URL encoding has changed, because I
can not use the org.apache.tapestry5.internal.services.URLEncoderImpl
inside my template.
Any ideas how I can solve this?
greetz,
Leon
Martijn Brinkers wrote:
> I guess the URL is generated outside of Tapestry? because if you
> passivate or create a link from Tapestry the parameters are encoded with
> the Tapestry 'special' encoding.
>
> You can probably use the default encoder implementation if you want to
> encode from outside of Tapestry:
>
> org.apache.tapestry5.internal.services.URLEncoderImpl
>
> Martijn Brinkers
>
>
> On Wed, 2008-12-10 at 23:43 +0100, Leon Derks wrote:
>
>> Hi Martijn,
>>
>> Thanks!
>> Yes, http://localhost:8090/tapestry/test/user/user$0040company.com
>> works, when I change the @ into $0040 manually.
>>
>> But how can I automatically translate @ into $0040, because my code
>> still generates the '@' character in the url.
>>
>> greetz,
>> Leon
>>
>>
>> Martijn Brinkers wrote:
>>
>>> The URL encoder has been changed.
>>>
>>> @ for example is now encoded as $0040
>>>
>>> See https://issues.apache.org/jira/browse/TAP5-302
>>>
>>>
>>> Search the archive for what and why things have changed
>>> http://tapestry.markmail.org
>>>
>>> Martijn Brinkers
>>>
>>>
>>>
>>> On Wed, 2008-12-10 at 23:19 +0100, Leon Derks wrote:
>>>
>>>
>>>> Hello
>>>> This evening I tried tapestry 5.0.17
>>>>
>>>> When I type in the following url in my application:
>>>> http://localhost:8090/tapestry/test/user/user@company.com
>>>>
>>>> I do get an java.lang.IllegalArgumentException
>>>> It says: "Input string 'user@company.com' is not valid; the character
>>>> '@' at position 5 is not valid."
>>>> Stacktrace:
>>>>
>>>> org.apache.tapestry5.internal.services.URLEncoderImpl.decode(URLEncoderImpl.java:143)
>>>>
>>>> org.apache.tapestry5.internal.services.ContextPathEncoderImpl.decodePath(ContextPathEncoderImpl.java:70)
>>>>
>>>> org.apache.tapestry5.internal.services.PageRenderDispatcher.process(PageRenderDispatcher.java:88)
>>>>
>>>> org.apache.tapestry5.internal.services.PageRenderDispatcher.dispatch(PageRenderDispatcher.java:71)
>>>>
>>>> org.apache.tapestry5.services.TapestryModule$17.service(TapestryModule.java:1029)
>>>>
>>>> I didn't had this problem in tapestry 5.0.14.
>>>> I searched in the changes, but couldn't find a change that would cause
>>>> this error.
>>>>
>>>> Any ideas?
>>>>
>>>> Leon
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>
>>>>
>>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>
>>>
>>> __________ NOD32 3682 (20081210) Informatie __________
>>>
>>> Dit bericht is gecontroleerd door het NOD32 Antivirus Systeem.
>>> http://www.nod32.nl
>>>
>>>
>>>
>>>
>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
>
> __________ NOD32 3682 (20081210) Informatie __________
>
> Dit bericht is gecontroleerd door het NOD32 Antivirus Systeem.
> http://www.nod32.nl
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: [T5] 5.0.17 URLEncoderImpl.decode error
Posted by Martijn Brinkers <ma...@gmail.com>.
I guess the URL is generated outside of Tapestry? because if you
passivate or create a link from Tapestry the parameters are encoded with
the Tapestry 'special' encoding.
You can probably use the default encoder implementation if you want to
encode from outside of Tapestry:
org.apache.tapestry5.internal.services.URLEncoderImpl
Martijn Brinkers
On Wed, 2008-12-10 at 23:43 +0100, Leon Derks wrote:
> Hi Martijn,
>
> Thanks!
> Yes, http://localhost:8090/tapestry/test/user/user$0040company.com
> works, when I change the @ into $0040 manually.
>
> But how can I automatically translate @ into $0040, because my code
> still generates the '@' character in the url.
>
> greetz,
> Leon
>
>
> Martijn Brinkers wrote:
> > The URL encoder has been changed.
> >
> > @ for example is now encoded as $0040
> >
> > See https://issues.apache.org/jira/browse/TAP5-302
> >
> >
> > Search the archive for what and why things have changed
> > http://tapestry.markmail.org
> >
> > Martijn Brinkers
> >
> >
> >
> > On Wed, 2008-12-10 at 23:19 +0100, Leon Derks wrote:
> >
> >> Hello
> >> This evening I tried tapestry 5.0.17
> >>
> >> When I type in the following url in my application:
> >> http://localhost:8090/tapestry/test/user/user@company.com
> >>
> >> I do get an java.lang.IllegalArgumentException
> >> It says: "Input string 'user@company.com' is not valid; the character
> >> '@' at position 5 is not valid."
> >> Stacktrace:
> >>
> >> org.apache.tapestry5.internal.services.URLEncoderImpl.decode(URLEncoderImpl.java:143)
> >>
> >> org.apache.tapestry5.internal.services.ContextPathEncoderImpl.decodePath(ContextPathEncoderImpl.java:70)
> >>
> >> org.apache.tapestry5.internal.services.PageRenderDispatcher.process(PageRenderDispatcher.java:88)
> >>
> >> org.apache.tapestry5.internal.services.PageRenderDispatcher.dispatch(PageRenderDispatcher.java:71)
> >>
> >> org.apache.tapestry5.services.TapestryModule$17.service(TapestryModule.java:1029)
> >>
> >> I didn't had this problem in tapestry 5.0.14.
> >> I searched in the changes, but couldn't find a change that would cause
> >> this error.
> >>
> >> Any ideas?
> >>
> >> Leon
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> >> For additional commands, e-mail: users-help@tapestry.apache.org
> >>
> >>
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
> > __________ NOD32 3682 (20081210) Informatie __________
> >
> > Dit bericht is gecontroleerd door het NOD32 Antivirus Systeem.
> > http://www.nod32.nl
> >
> >
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: [T5] 5.0.17 URLEncoderImpl.decode error
Posted by Leon Derks <le...@cumquat.nl>.
Hi Martijn,
Thanks!
Yes, http://localhost:8090/tapestry/test/user/user$0040company.com
works, when I change the @ into $0040 manually.
But how can I automatically translate @ into $0040, because my code
still generates the '@' character in the url.
greetz,
Leon
Martijn Brinkers wrote:
> The URL encoder has been changed.
>
> @ for example is now encoded as $0040
>
> See https://issues.apache.org/jira/browse/TAP5-302
>
>
> Search the archive for what and why things have changed
> http://tapestry.markmail.org
>
> Martijn Brinkers
>
>
>
> On Wed, 2008-12-10 at 23:19 +0100, Leon Derks wrote:
>
>> Hello
>> This evening I tried tapestry 5.0.17
>>
>> When I type in the following url in my application:
>> http://localhost:8090/tapestry/test/user/user@company.com
>>
>> I do get an java.lang.IllegalArgumentException
>> It says: "Input string 'user@company.com' is not valid; the character
>> '@' at position 5 is not valid."
>> Stacktrace:
>>
>> org.apache.tapestry5.internal.services.URLEncoderImpl.decode(URLEncoderImpl.java:143)
>>
>> org.apache.tapestry5.internal.services.ContextPathEncoderImpl.decodePath(ContextPathEncoderImpl.java:70)
>>
>> org.apache.tapestry5.internal.services.PageRenderDispatcher.process(PageRenderDispatcher.java:88)
>>
>> org.apache.tapestry5.internal.services.PageRenderDispatcher.dispatch(PageRenderDispatcher.java:71)
>>
>> org.apache.tapestry5.services.TapestryModule$17.service(TapestryModule.java:1029)
>>
>> I didn't had this problem in tapestry 5.0.14.
>> I searched in the changes, but couldn't find a change that would cause
>> this error.
>>
>> Any ideas?
>>
>> Leon
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
> __________ NOD32 3682 (20081210) Informatie __________
>
> Dit bericht is gecontroleerd door het NOD32 Antivirus Systeem.
> http://www.nod32.nl
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: [T5] 5.0.17 URLEncoderImpl.decode error
Posted by Martijn Brinkers <ma...@gmail.com>.
The URL encoder has been changed.
@ for example is now encoded as $0040
See https://issues.apache.org/jira/browse/TAP5-302
Search the archive for what and why things have changed
http://tapestry.markmail.org
Martijn Brinkers
On Wed, 2008-12-10 at 23:19 +0100, Leon Derks wrote:
> Hello
> This evening I tried tapestry 5.0.17
>
> When I type in the following url in my application:
> http://localhost:8090/tapestry/test/user/user@company.com
>
> I do get an java.lang.IllegalArgumentException
> It says: "Input string 'user@company.com' is not valid; the character
> '@' at position 5 is not valid."
> Stacktrace:
>
> org.apache.tapestry5.internal.services.URLEncoderImpl.decode(URLEncoderImpl.java:143)
>
> org.apache.tapestry5.internal.services.ContextPathEncoderImpl.decodePath(ContextPathEncoderImpl.java:70)
>
> org.apache.tapestry5.internal.services.PageRenderDispatcher.process(PageRenderDispatcher.java:88)
>
> org.apache.tapestry5.internal.services.PageRenderDispatcher.dispatch(PageRenderDispatcher.java:71)
>
> org.apache.tapestry5.services.TapestryModule$17.service(TapestryModule.java:1029)
>
> I didn't had this problem in tapestry 5.0.14.
> I searched in the changes, but couldn't find a change that would cause
> this error.
>
> Any ideas?
>
> Leon
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org