Re: [T5] 5.0.17 URLEncoderImpl.decode error

2008-12-11 Thread Thiago H. de Paula Figueiredo
Em Thu, 11 Dec 2008 16:37:31 -0300, Blower, Andy  
 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-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



RE: [T5] 5.0.17 URLEncoderImpl.decode error

2008-12-11 Thread Blower, Andy
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:thiag...@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 
> escreveu:
>
> > Hello
>
> Hi!
>
> > I do get an java.lang.IllegalArgumentException
> > It says: "Input string 'u...@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-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>


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



Re: [T5] 5.0.17 URLEncoderImpl.decode error

2008-12-11 Thread Jan Vissers
> 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:
> 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.

---> Are you sure about this. Looks to me you *can* use it.

Take a look at:

http://freemarker.sourceforge.net/docs/api/freemarker/template/TemplateMethodModelEx.html

http://freemarker.sourceforge.net/docs/ref_directive_function.html

>
> 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/[EMAIL PROTECTED]
>
> I do get an java.lang.IllegalArgumentException
> It says: "Input string '[EMAIL PROTECTED]' 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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 __ NOD32 3682 (20081210) Informatie __

 Dit bericht is gecontroleerd door het NOD32 Antivirus Systeem.
 http://www.nod32.nl





>>> -
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>
>> __ NOD32 3682 (20081210) Informatie __
>>
>> Dit bericht is gecontroleerd door het NOD32 Antivirus Systeem.
>> http://www.nod32.nl
>>
>>
>>
>>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [T5] 5.0.17 URLEncoderImpl.decode error

2008-12-11 Thread Martijn Brinkers
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:
> 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/[EMAIL PROTECTED]
> 
>  I do get an java.lang.IllegalArgumentException
>  It says: "Input string '[EMAIL PROTECTED]' 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: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
> 
>  
>  
> >>> -
> >>> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>> For additional commands, e-mail: [EMAIL PROTECTED]
> >>>
> >>>
> >>> __ NOD32 3682 (20081210) Informatie __
> >>>
> >>> Dit bericht is gecontroleerd door het NOD32 Antivirus Systeem.
> >>> http://www.nod32.nl
> >>>
> >>>
> >>>
> >>>   
> >>>   
> >> -
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >> 
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> > __ NOD32 3682 (20081210) Informatie __
> >
> > Dit bericht is gecontroleerd door het NOD32 Antivirus Systeem.
> > http://www.nod32.nl
> >
> >
> >
> >   
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECT

Re: [T5] 5.0.17 URLEncoderImpl.decode error

2008-12-11 Thread Leon Derks

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:

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/[EMAIL PROTECTED]

I do get an java.lang.IllegalArgumentException
It says: "Input string '[EMAIL PROTECTED]' 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


__ NOD32 3682 (20081210) Informatie __

Dit bericht is gecontroleerd door het NOD32 Antivirus Systeem.
http://www.nod32.nl



  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



__ NOD32 3682 (20081210) Informatie __

Dit bericht is gecontroleerd door het NOD32 Antivirus Systeem.
http://www.nod32.nl



  



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [T5] 5.0.17 URLEncoderImpl.decode error

2008-12-10 Thread Martijn Brinkers
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/[EMAIL PROTECTED]
> >>
> >> I do get an java.lang.IllegalArgumentException
> >> It says: "Input string '[EMAIL PROTECTED]' 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: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >> 
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> > __ NOD32 3682 (20081210) Informatie __
> >
> > Dit bericht is gecontroleerd door het NOD32 Antivirus Systeem.
> > http://www.nod32.nl
> >
> >
> >
> >   
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [T5] 5.0.17 URLEncoderImpl.decode error

2008-12-10 Thread Leon Derks

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/[EMAIL PROTECTED]

I do get an java.lang.IllegalArgumentException
It says: "Input string '[EMAIL PROTECTED]' 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


__ NOD32 3682 (20081210) Informatie __

Dit bericht is gecontroleerd door het NOD32 Antivirus Systeem.
http://www.nod32.nl



  



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [T5] 5.0.17 URLEncoderImpl.decode error

2008-12-10 Thread Martijn Brinkers
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/[EMAIL PROTECTED]
> 
> I do get an java.lang.IllegalArgumentException
> It says: "Input string '[EMAIL PROTECTED]' 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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [T5] 5.0.17 URLEncoderImpl.decode error

2008-12-10 Thread Thiago H. de Paula Figueiredo
Em Wed, 10 Dec 2008 19:19:44 -0300, Leon Derks <[EMAIL PROTECTED]>  
escreveu:



Hello


Hi!


I do get an java.lang.IllegalArgumentException
It says: "Input string '[EMAIL PROTECTED]' 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]