You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pluto-dev@portals.apache.org by "Shinsuke SUGAYA (JIRA)" <ji...@apache.org> on 2006/02/09 00:34:00 UTC

[jira] Commented: (PLUTO-203) IllegalArgumentException is thrown when using mailto:.. at PortletResponse#encodeURL(String)

    [ http://issues.apache.org/jira/browse/PLUTO-203?page=comments#action_12365658 ] 

Shinsuke SUGAYA commented on PLUTO-203:
---------------------------------------

Okay, I found the IllegalArgumentExeption in JavaDoc(but I could not find it in portlet-1_0-fr-spec.pdf).

This problem is the diffrent behavior from Servlet API. 
For example, in JSF, ExternalContext.html#encodeActionURL(String) calls HttpServletResponse#encodeURL(String) if Servlet or PortletResponse#encodeURL(String) if Portlet. But HttpServletResponse#encodeURL(String) does NOT return the exception. Therefore, JSF developer in Portlet will encounters it on the portlet environment.. 

http://java.sun.com/j2ee/javaserverfaces/1.1_01/docs/api/javax/faces/context/ExternalContext.html#encodeActionURL(java.lang.String)
http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/http/HttpServletResponse.html#encodeURL(java.lang.String)
http://www.bluesunrise.com/portlet-api/javax/portlet/PortletResponse.html#encodeURL(java.lang.String)

Is javadoc correct??

> IllegalArgumentException is thrown when using mailto:.. at PortletResponse#encodeURL(String)
> --------------------------------------------------------------------------------------------
>
>          Key: PLUTO-203
>          URL: http://issues.apache.org/jira/browse/PLUTO-203
>      Project: Pluto
>         Type: Bug
>   Components: portlet container
>     Versions: 1.0.1
>  Environment: J2SE 1.4 on Linux
>     Reporter: Shinsuke SUGAYA
>     Assignee: David DeWolf
>     Priority: Critical
>  Attachments: PortletResponseImpl.patch
>
> For example, this problem occurs when you use the following JSF tag on MyFaces and Portlet environment:
> <h:outputLink value="mailto:test@test.com">...
> and also you will encounter IllegalArgumentException when using values other than ...://... and /...
> I think that the simple solution is:
> $ svn diff ./pluto-container/src/main/java/org/apache/pluto/core/impl/PortletResponseImpl.java
> Index: pluto-container/src/main/java/org/apache/pluto/core/impl/PortletResponseImpl.java
> ===================================================================
> --- pluto-container/src/main/java/org/apache/pluto/core/impl/PortletResponseImpl.java   (revision 372353)
> +++ pluto-container/src/main/java/org/apache/pluto/core/impl/PortletResponseImpl.java   (working copy)
> @@ -98,8 +98,7 @@
>      public String encodeURL(String path) {
>          if (path.indexOf("://") == -1 && !path.startsWith("/")) {
> -            throw new IllegalArgumentException(
> -                "only absolute URLs or full path URIs are allowed");
> +            return path;
>          }
>          PortletContainerServices services = getContainer()

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Re: [jira] Commented: (PLUTO-203) IllegalArgumentException is thrown when using mailto:.. at PortletResponse#encodeURL(String)

Posted by Shinsuke SUGAYA <sh...@yahoo.co.jp>.
Stefan Hepper wrote:
> Yes, we are not planning to change this behavior.

Thanks! I see.
I'll handle it as MyFaces's issue.

-shinsuke

> Stefan
> 
> Shinsuke SUGAYA wrote:
>> Stefan Hepper wrote:
>>   
>>> This was considerate something that the servlet spec missed. If you
>>> provide params that do not comply to specification in the javadocs you
>>> should get an exc back and not accept the call and do nothing or respond
>>> with an internal server error.
>>>     
>> Thank you for your answer!
>> It means that the portlet spec is correct and also the future portlet spec
>> (JSR 286) will have the same behavior, is it correct? If yes, I'll need to
>> bring this issue to MyFaces..
>>
>> Regards,
>>  shinsuke
>>
>>
>>   
>>> Stefan
>>>
>>> Shinsuke SUGAYA wrote:
>>>     
>>>> Thank you for double-checking it and your comment!
>>>> I'll send this issue to jsr-168-comments@jcp.org
>>>>
>>>> Thanks,
>>>>  shinsuke
>>>>
>>>> --- "David H. DeWolf" <dd...@apache.org> wrote:
>>>>   
>>>>       
>>>>> You're right, there's definately a disconnect between the specs though
>>>>> I think it probably has to do more with the restrictions on portlets
>>>>> than it does with pure stupidity :)
>>>>>
>>>>> For now I would recomend that you code to the lowest commen
>>>>> denominator, however, you may want to forward a request to the jsr
>>>>> specification teams  - specifically the jsf team since they're the one
>>>>> that tied everything else together.  You may also want to ping
>>>>> jsr-168-comments@jcp.org just to ask what the motivations were to
>>>>> being different than the servlet spec (my guess is it has to do with
>>>>> the constraints of being a fragement and potentially within a
>>>>> different context).
>>>>>
>>>>> David
>>>>>
>>>>> On 2/8/06, Shinsuke SUGAYA (JIRA) <ji...@apache.org> wrote:
>>>>>     
>>>>>         
>>>>>>     [ http://issues.apache.org/jira/browse/PLUTO-203?page=comments#action_12365658 ]
>>>>>>
>>>>>> Shinsuke SUGAYA commented on PLUTO-203:
>>>>>> ---------------------------------------
>>>>>>
>>>>>> Okay, I found the IllegalArgumentExeption in JavaDoc(but I could not find it in
>>>>>>       
>>>>>>           
>>>>> portlet-1_0-fr-spec.pdf).
>>>>>     
>>>>>         
>>>>>> This problem is the diffrent behavior from Servlet API.
>>>>>> For example, in JSF, ExternalContext.html#encodeActionURL(String) calls
>>>>>>       
>>>>>>           
>>>>> HttpServletResponse#encodeURL(String) if Servlet or PortletResponse#encodeURL(String) if
>>>>> Portlet. But HttpServletResponse#encodeURL(String) does NOT return the exception. Therefore, JSF
>>>>> developer in Portlet will encounters it on the portlet environment..
>>>>>     
>>>>>         
>>>>>>       
>>>>>>           
>>>> http://java.sun.com/j2ee/javaserverfaces/1.1_01/docs/api/javax/faces/context/ExternalContext.html#encodeActionURL(java.lang.String)
>>>>   
>>>> http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/http/HttpServletResponse.html#encodeURL(java.lang.String)
>>>>   
>>>> http://www.bluesunrise.com/portlet-api/javax/portlet/PortletResponse.html#encodeURL(java.lang.String)
>>>>   
>>>>       
>>>>>> Is javadoc correct??
>>>>>>
>>>>>>       
>>>>>>           
>>>>>>> IllegalArgumentException is thrown when using mailto:.. at PortletResponse#encodeURL(String)
>>>>>>> --------------------------------------------------------------------------------------------
>>>>>>>
>>>>>>>          Key: PLUTO-203
>>>>>>>          URL: http://issues.apache.org/jira/browse/PLUTO-203
>>>>>>>      Project: Pluto
>>>>>>>         Type: Bug
>>>>>>>   Components: portlet container
>>>>>>>     Versions: 1.0.1
>>>>>>>  Environment: J2SE 1.4 on Linux
>>>>>>>     Reporter: Shinsuke SUGAYA
>>>>>>>     Assignee: David DeWolf
>>>>>>>     Priority: Critical
>>>>>>>  Attachments: PortletResponseImpl.patch
>>>>>>>
>>>>>>> For example, this problem occurs when you use the following JSF tag on MyFaces and Portlet
>>>>>>>         
>>>>>>>             
>>>>> environment:
>>>>>     
>>>>>         
>>>>>>> <h:outputLink value="mailto:test@test.com">...
>>>>>>> and also you will encounter IllegalArgumentException when using values other than ...://...
>>>>>>>         
>>>>>>>             
>>>>> and /...
>>>>>     
>>>>>         
>>>>>>> I think that the simple solution is:
>>>>>>> $ svn diff
>>>>>>>         
>>>>>>>             
>>>>> ./pluto-container/src/main/java/org/apache/pluto/core/impl/PortletResponseImpl.java
>>>>>     
>>>>>         
>>>>>>> Index: pluto-container/src/main/java/org/apache/pluto/core/impl/PortletResponseImpl.java
>>>>>>> ===================================================================
>>>>>>> --- pluto-container/src/main/java/org/apache/pluto/core/impl/PortletResponseImpl.java  
>>>>>>>         
>>>>>>>             
>>>>> (revision 372353)
>>>>>     
>>>>>         
>>>>>>> +++ pluto-container/src/main/java/org/apache/pluto/core/impl/PortletResponseImpl.java  
>>>>>>>         
>>>>>>>             
>>>>> (working copy)
>>>>>     
>>>>>         
>>>>>>> @@ -98,8 +98,7 @@
>>>>>>>      public String encodeURL(String path) {
>>>>>>>          if (path.indexOf("://") == -1 && !path.startsWith("/")) {
>>>>>>> -            throw new IllegalArgumentException(
>>>>>>> -                "only absolute URLs or full path URIs are allowed");
>>>>>>> +            return path;
>>>>>>>          }
>>>>>>>          PortletContainerServices services = getContainer()
>>>>>>>         
>>>>>>>             
>>>>>> --
>>>>>> This message is automatically generated by JIRA.
>>>>>> -
>>>>>> If you think it was sent incorrectly contact one of the administrators:
>>>>>>    http://issues.apache.org/jira/secure/Administrators.jspa
>>>>>> -
>>>>>> For more information on JIRA, see:
>>>>>>    http://www.atlassian.com/software/jira
>>>>>>
>>>>>>
>>>>>>       
>>>>>>           
>>>> --------------------------------------
>>>> GANBARE! NIPPON!
>>>> Yahoo! JAPAN JOC OFFICIAL INTERNET PORTAL SITE PARTNER
>>>> http://pr.mail.yahoo.co.jp/ganbare-nippon/
>>>>
>>>>
>>>>   
>>>>       
>>>     
>> --------------------------------------
>> GANBARE! NIPPON!
>> Yahoo! JAPAN JOC OFFICIAL INTERNET PORTAL SITE PARTNER
>> http://pr.mail.yahoo.co.jp/ganbare-nippon/
>>
>>
>>   
> 
> 
> 

--------------------------------------
GANBARE! NIPPON!
Yahoo! JAPAN JOC OFFICIAL INTERNET PORTAL SITE PARTNER
http://pr.mail.yahoo.co.jp/ganbare-nippon/

Re: [jira] Commented: (PLUTO-203) IllegalArgumentException is thrown when using mailto:.. at PortletResponse#encodeURL(String)

Posted by Stefan Hepper <st...@apache.org>.
Yes, we are not planning to change this behavior.

Stefan

Shinsuke SUGAYA wrote:
> Stefan Hepper wrote:
>   
>> This was considerate something that the servlet spec missed. If you
>> provide params that do not comply to specification in the javadocs you
>> should get an exc back and not accept the call and do nothing or respond
>> with an internal server error.
>>     
>
> Thank you for your answer!
> It means that the portlet spec is correct and also the future portlet spec
> (JSR 286) will have the same behavior, is it correct? If yes, I'll need to
> bring this issue to MyFaces..
>
> Regards,
>  shinsuke
>
>
>   
>> Stefan
>>
>> Shinsuke SUGAYA wrote:
>>     
>>> Thank you for double-checking it and your comment!
>>> I'll send this issue to jsr-168-comments@jcp.org
>>>
>>> Thanks,
>>>  shinsuke
>>>
>>> --- "David H. DeWolf" <dd...@apache.org> wrote:
>>>   
>>>       
>>>> You're right, there's definately a disconnect between the specs though
>>>> I think it probably has to do more with the restrictions on portlets
>>>> than it does with pure stupidity :)
>>>>
>>>> For now I would recomend that you code to the lowest commen
>>>> denominator, however, you may want to forward a request to the jsr
>>>> specification teams  - specifically the jsf team since they're the one
>>>> that tied everything else together.  You may also want to ping
>>>> jsr-168-comments@jcp.org just to ask what the motivations were to
>>>> being different than the servlet spec (my guess is it has to do with
>>>> the constraints of being a fragement and potentially within a
>>>> different context).
>>>>
>>>> David
>>>>
>>>> On 2/8/06, Shinsuke SUGAYA (JIRA) <ji...@apache.org> wrote:
>>>>     
>>>>         
>>>>>     [ http://issues.apache.org/jira/browse/PLUTO-203?page=comments#action_12365658 ]
>>>>>
>>>>> Shinsuke SUGAYA commented on PLUTO-203:
>>>>> ---------------------------------------
>>>>>
>>>>> Okay, I found the IllegalArgumentExeption in JavaDoc(but I could not find it in
>>>>>       
>>>>>           
>>>> portlet-1_0-fr-spec.pdf).
>>>>     
>>>>         
>>>>> This problem is the diffrent behavior from Servlet API.
>>>>> For example, in JSF, ExternalContext.html#encodeActionURL(String) calls
>>>>>       
>>>>>           
>>>> HttpServletResponse#encodeURL(String) if Servlet or PortletResponse#encodeURL(String) if
>>>> Portlet. But HttpServletResponse#encodeURL(String) does NOT return the exception. Therefore, JSF
>>>> developer in Portlet will encounters it on the portlet environment..
>>>>     
>>>>         
>>>>>       
>>>>>           
>>> http://java.sun.com/j2ee/javaserverfaces/1.1_01/docs/api/javax/faces/context/ExternalContext.html#encodeActionURL(java.lang.String)
>>>   
>>> http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/http/HttpServletResponse.html#encodeURL(java.lang.String)
>>>   
>>> http://www.bluesunrise.com/portlet-api/javax/portlet/PortletResponse.html#encodeURL(java.lang.String)
>>>   
>>>       
>>>>> Is javadoc correct??
>>>>>
>>>>>       
>>>>>           
>>>>>> IllegalArgumentException is thrown when using mailto:.. at PortletResponse#encodeURL(String)
>>>>>> --------------------------------------------------------------------------------------------
>>>>>>
>>>>>>          Key: PLUTO-203
>>>>>>          URL: http://issues.apache.org/jira/browse/PLUTO-203
>>>>>>      Project: Pluto
>>>>>>         Type: Bug
>>>>>>   Components: portlet container
>>>>>>     Versions: 1.0.1
>>>>>>  Environment: J2SE 1.4 on Linux
>>>>>>     Reporter: Shinsuke SUGAYA
>>>>>>     Assignee: David DeWolf
>>>>>>     Priority: Critical
>>>>>>  Attachments: PortletResponseImpl.patch
>>>>>>
>>>>>> For example, this problem occurs when you use the following JSF tag on MyFaces and Portlet
>>>>>>         
>>>>>>             
>>>> environment:
>>>>     
>>>>         
>>>>>> <h:outputLink value="mailto:test@test.com">...
>>>>>> and also you will encounter IllegalArgumentException when using values other than ...://...
>>>>>>         
>>>>>>             
>>>> and /...
>>>>     
>>>>         
>>>>>> I think that the simple solution is:
>>>>>> $ svn diff
>>>>>>         
>>>>>>             
>>>> ./pluto-container/src/main/java/org/apache/pluto/core/impl/PortletResponseImpl.java
>>>>     
>>>>         
>>>>>> Index: pluto-container/src/main/java/org/apache/pluto/core/impl/PortletResponseImpl.java
>>>>>> ===================================================================
>>>>>> --- pluto-container/src/main/java/org/apache/pluto/core/impl/PortletResponseImpl.java  
>>>>>>         
>>>>>>             
>>>> (revision 372353)
>>>>     
>>>>         
>>>>>> +++ pluto-container/src/main/java/org/apache/pluto/core/impl/PortletResponseImpl.java  
>>>>>>         
>>>>>>             
>>>> (working copy)
>>>>     
>>>>         
>>>>>> @@ -98,8 +98,7 @@
>>>>>>      public String encodeURL(String path) {
>>>>>>          if (path.indexOf("://") == -1 && !path.startsWith("/")) {
>>>>>> -            throw new IllegalArgumentException(
>>>>>> -                "only absolute URLs or full path URIs are allowed");
>>>>>> +            return path;
>>>>>>          }
>>>>>>          PortletContainerServices services = getContainer()
>>>>>>         
>>>>>>             
>>>>> --
>>>>> This message is automatically generated by JIRA.
>>>>> -
>>>>> If you think it was sent incorrectly contact one of the administrators:
>>>>>    http://issues.apache.org/jira/secure/Administrators.jspa
>>>>> -
>>>>> For more information on JIRA, see:
>>>>>    http://www.atlassian.com/software/jira
>>>>>
>>>>>
>>>>>       
>>>>>           
>>> --------------------------------------
>>> GANBARE! NIPPON!
>>> Yahoo! JAPAN JOC OFFICIAL INTERNET PORTAL SITE PARTNER
>>> http://pr.mail.yahoo.co.jp/ganbare-nippon/
>>>
>>>
>>>   
>>>       
>>
>>     
>
> --------------------------------------
> GANBARE! NIPPON!
> Yahoo! JAPAN JOC OFFICIAL INTERNET PORTAL SITE PARTNER
> http://pr.mail.yahoo.co.jp/ganbare-nippon/
>
>
>   



Re: [jira] Commented: (PLUTO-203) IllegalArgumentException is thrown when using mailto:.. at PortletResponse#encodeURL(String)

Posted by Shinsuke SUGAYA <sh...@yahoo.co.jp>.
Stefan Hepper wrote:
> This was considerate something that the servlet spec missed. If you
> provide params that do not comply to specification in the javadocs you
> should get an exc back and not accept the call and do nothing or respond
> with an internal server error.

Thank you for your answer!
It means that the portlet spec is correct and also the future portlet spec
(JSR 286) will have the same behavior, is it correct? If yes, I'll need to
bring this issue to MyFaces..

Regards,
 shinsuke


> Stefan
> 
> Shinsuke SUGAYA wrote:
>> Thank you for double-checking it and your comment!
>> I'll send this issue to jsr-168-comments@jcp.org
>>
>> Thanks,
>>  shinsuke
>>
>> --- "David H. DeWolf" <dd...@apache.org> wrote:
>>   
>>> You're right, there's definately a disconnect between the specs though
>>> I think it probably has to do more with the restrictions on portlets
>>> than it does with pure stupidity :)
>>>
>>> For now I would recomend that you code to the lowest commen
>>> denominator, however, you may want to forward a request to the jsr
>>> specification teams  - specifically the jsf team since they're the one
>>> that tied everything else together.  You may also want to ping
>>> jsr-168-comments@jcp.org just to ask what the motivations were to
>>> being different than the servlet spec (my guess is it has to do with
>>> the constraints of being a fragement and potentially within a
>>> different context).
>>>
>>> David
>>>
>>> On 2/8/06, Shinsuke SUGAYA (JIRA) <ji...@apache.org> wrote:
>>>     
>>>>     [ http://issues.apache.org/jira/browse/PLUTO-203?page=comments#action_12365658 ]
>>>>
>>>> Shinsuke SUGAYA commented on PLUTO-203:
>>>> ---------------------------------------
>>>>
>>>> Okay, I found the IllegalArgumentExeption in JavaDoc(but I could not find it in
>>>>       
>>> portlet-1_0-fr-spec.pdf).
>>>     
>>>> This problem is the diffrent behavior from Servlet API.
>>>> For example, in JSF, ExternalContext.html#encodeActionURL(String) calls
>>>>       
>>> HttpServletResponse#encodeURL(String) if Servlet or PortletResponse#encodeURL(String) if
>>> Portlet. But HttpServletResponse#encodeURL(String) does NOT return the exception. Therefore, JSF
>>> developer in Portlet will encounters it on the portlet environment..
>>>     
>>>>       
>> http://java.sun.com/j2ee/javaserverfaces/1.1_01/docs/api/javax/faces/context/ExternalContext.html#encodeActionURL(java.lang.String)
>>   
>> http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/http/HttpServletResponse.html#encodeURL(java.lang.String)
>>   
>> http://www.bluesunrise.com/portlet-api/javax/portlet/PortletResponse.html#encodeURL(java.lang.String)
>>   
>>>> Is javadoc correct??
>>>>
>>>>       
>>>>> IllegalArgumentException is thrown when using mailto:.. at PortletResponse#encodeURL(String)
>>>>> --------------------------------------------------------------------------------------------
>>>>>
>>>>>          Key: PLUTO-203
>>>>>          URL: http://issues.apache.org/jira/browse/PLUTO-203
>>>>>      Project: Pluto
>>>>>         Type: Bug
>>>>>   Components: portlet container
>>>>>     Versions: 1.0.1
>>>>>  Environment: J2SE 1.4 on Linux
>>>>>     Reporter: Shinsuke SUGAYA
>>>>>     Assignee: David DeWolf
>>>>>     Priority: Critical
>>>>>  Attachments: PortletResponseImpl.patch
>>>>>
>>>>> For example, this problem occurs when you use the following JSF tag on MyFaces and Portlet
>>>>>         
>>> environment:
>>>     
>>>>> <h:outputLink value="mailto:test@test.com">...
>>>>> and also you will encounter IllegalArgumentException when using values other than ...://...
>>>>>         
>>> and /...
>>>     
>>>>> I think that the simple solution is:
>>>>> $ svn diff
>>>>>         
>>> ./pluto-container/src/main/java/org/apache/pluto/core/impl/PortletResponseImpl.java
>>>     
>>>>> Index: pluto-container/src/main/java/org/apache/pluto/core/impl/PortletResponseImpl.java
>>>>> ===================================================================
>>>>> --- pluto-container/src/main/java/org/apache/pluto/core/impl/PortletResponseImpl.java  
>>>>>         
>>> (revision 372353)
>>>     
>>>>> +++ pluto-container/src/main/java/org/apache/pluto/core/impl/PortletResponseImpl.java  
>>>>>         
>>> (working copy)
>>>     
>>>>> @@ -98,8 +98,7 @@
>>>>>      public String encodeURL(String path) {
>>>>>          if (path.indexOf("://") == -1 && !path.startsWith("/")) {
>>>>> -            throw new IllegalArgumentException(
>>>>> -                "only absolute URLs or full path URIs are allowed");
>>>>> +            return path;
>>>>>          }
>>>>>          PortletContainerServices services = getContainer()
>>>>>         
>>>> --
>>>> This message is automatically generated by JIRA.
>>>> -
>>>> If you think it was sent incorrectly contact one of the administrators:
>>>>    http://issues.apache.org/jira/secure/Administrators.jspa
>>>> -
>>>> For more information on JIRA, see:
>>>>    http://www.atlassian.com/software/jira
>>>>
>>>>
>>>>       
>> --------------------------------------
>> GANBARE! NIPPON!
>> Yahoo! JAPAN JOC OFFICIAL INTERNET PORTAL SITE PARTNER
>> http://pr.mail.yahoo.co.jp/ganbare-nippon/
>>
>>
>>   
> 
> 
> 

--------------------------------------
GANBARE! NIPPON!
Yahoo! JAPAN JOC OFFICIAL INTERNET PORTAL SITE PARTNER
http://pr.mail.yahoo.co.jp/ganbare-nippon/

Re: [jira] Commented: (PLUTO-203) IllegalArgumentException is thrown when using mailto:.. at PortletResponse#encodeURL(String)

Posted by Stefan Hepper <st...@apache.org>.
This was considerate something that the servlet spec missed. If you
provide params that do not comply to specification in the javadocs you
should get an exc back and not accept the call and do nothing or respond
with an internal server error.

Stefan

Shinsuke SUGAYA wrote:
> Thank you for double-checking it and your comment!
> I'll send this issue to jsr-168-comments@jcp.org
>
> Thanks,
>  shinsuke
>
> --- "David H. DeWolf" <dd...@apache.org> wrote:
>   
>> You're right, there's definately a disconnect between the specs though
>> I think it probably has to do more with the restrictions on portlets
>> than it does with pure stupidity :)
>>
>> For now I would recomend that you code to the lowest commen
>> denominator, however, you may want to forward a request to the jsr
>> specification teams  - specifically the jsf team since they're the one
>> that tied everything else together.  You may also want to ping
>> jsr-168-comments@jcp.org just to ask what the motivations were to
>> being different than the servlet spec (my guess is it has to do with
>> the constraints of being a fragement and potentially within a
>> different context).
>>
>> David
>>
>> On 2/8/06, Shinsuke SUGAYA (JIRA) <ji...@apache.org> wrote:
>>     
>>>     [ http://issues.apache.org/jira/browse/PLUTO-203?page=comments#action_12365658 ]
>>>
>>> Shinsuke SUGAYA commented on PLUTO-203:
>>> ---------------------------------------
>>>
>>> Okay, I found the IllegalArgumentExeption in JavaDoc(but I could not find it in
>>>       
>> portlet-1_0-fr-spec.pdf).
>>     
>>> This problem is the diffrent behavior from Servlet API.
>>> For example, in JSF, ExternalContext.html#encodeActionURL(String) calls
>>>       
>> HttpServletResponse#encodeURL(String) if Servlet or PortletResponse#encodeURL(String) if
>> Portlet. But HttpServletResponse#encodeURL(String) does NOT return the exception. Therefore, JSF
>> developer in Portlet will encounters it on the portlet environment..
>>     
>>>       
> http://java.sun.com/j2ee/javaserverfaces/1.1_01/docs/api/javax/faces/context/ExternalContext.html#encodeActionURL(java.lang.String)
>   
> http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/http/HttpServletResponse.html#encodeURL(java.lang.String)
>   
> http://www.bluesunrise.com/portlet-api/javax/portlet/PortletResponse.html#encodeURL(java.lang.String)
>   
>>> Is javadoc correct??
>>>
>>>       
>>>> IllegalArgumentException is thrown when using mailto:.. at PortletResponse#encodeURL(String)
>>>> --------------------------------------------------------------------------------------------
>>>>
>>>>          Key: PLUTO-203
>>>>          URL: http://issues.apache.org/jira/browse/PLUTO-203
>>>>      Project: Pluto
>>>>         Type: Bug
>>>>   Components: portlet container
>>>>     Versions: 1.0.1
>>>>  Environment: J2SE 1.4 on Linux
>>>>     Reporter: Shinsuke SUGAYA
>>>>     Assignee: David DeWolf
>>>>     Priority: Critical
>>>>  Attachments: PortletResponseImpl.patch
>>>>
>>>> For example, this problem occurs when you use the following JSF tag on MyFaces and Portlet
>>>>         
>> environment:
>>     
>>>> <h:outputLink value="mailto:test@test.com">...
>>>> and also you will encounter IllegalArgumentException when using values other than ...://...
>>>>         
>> and /...
>>     
>>>> I think that the simple solution is:
>>>> $ svn diff
>>>>         
>> ./pluto-container/src/main/java/org/apache/pluto/core/impl/PortletResponseImpl.java
>>     
>>>> Index: pluto-container/src/main/java/org/apache/pluto/core/impl/PortletResponseImpl.java
>>>> ===================================================================
>>>> --- pluto-container/src/main/java/org/apache/pluto/core/impl/PortletResponseImpl.java  
>>>>         
>> (revision 372353)
>>     
>>>> +++ pluto-container/src/main/java/org/apache/pluto/core/impl/PortletResponseImpl.java  
>>>>         
>> (working copy)
>>     
>>>> @@ -98,8 +98,7 @@
>>>>      public String encodeURL(String path) {
>>>>          if (path.indexOf("://") == -1 && !path.startsWith("/")) {
>>>> -            throw new IllegalArgumentException(
>>>> -                "only absolute URLs or full path URIs are allowed");
>>>> +            return path;
>>>>          }
>>>>          PortletContainerServices services = getContainer()
>>>>         
>>> --
>>> This message is automatically generated by JIRA.
>>> -
>>> If you think it was sent incorrectly contact one of the administrators:
>>>    http://issues.apache.org/jira/secure/Administrators.jspa
>>> -
>>> For more information on JIRA, see:
>>>    http://www.atlassian.com/software/jira
>>>
>>>
>>>       
>
> --------------------------------------
> GANBARE! NIPPON!
> Yahoo! JAPAN JOC OFFICIAL INTERNET PORTAL SITE PARTNER
> http://pr.mail.yahoo.co.jp/ganbare-nippon/
>
>
>   



Re: [jira] Commented: (PLUTO-203) IllegalArgumentException is thrown when using mailto:.. at PortletResponse#encodeURL(String)

Posted by Shinsuke SUGAYA <sh...@yahoo.co.jp>.
Thank you for double-checking it and your comment!
I'll send this issue to jsr-168-comments@jcp.org

Thanks,
 shinsuke

--- "David H. DeWolf" <dd...@apache.org> wrote:
> You're right, there's definately a disconnect between the specs though
> I think it probably has to do more with the restrictions on portlets
> than it does with pure stupidity :)
> 
> For now I would recomend that you code to the lowest commen
> denominator, however, you may want to forward a request to the jsr
> specification teams  - specifically the jsf team since they're the one
> that tied everything else together.  You may also want to ping
> jsr-168-comments@jcp.org just to ask what the motivations were to
> being different than the servlet spec (my guess is it has to do with
> the constraints of being a fragement and potentially within a
> different context).
> 
> David
> 
> On 2/8/06, Shinsuke SUGAYA (JIRA) <ji...@apache.org> wrote:
> >     [ http://issues.apache.org/jira/browse/PLUTO-203?page=comments#action_12365658 ]
> >
> > Shinsuke SUGAYA commented on PLUTO-203:
> > ---------------------------------------
> >
> > Okay, I found the IllegalArgumentExeption in JavaDoc(but I could not find it in
> portlet-1_0-fr-spec.pdf).
> >
> > This problem is the diffrent behavior from Servlet API.
> > For example, in JSF, ExternalContext.html#encodeActionURL(String) calls
> HttpServletResponse#encodeURL(String) if Servlet or PortletResponse#encodeURL(String) if
> Portlet. But HttpServletResponse#encodeURL(String) does NOT return the exception. Therefore, JSF
> developer in Portlet will encounters it on the portlet environment..
> >
> >
>
http://java.sun.com/j2ee/javaserverfaces/1.1_01/docs/api/javax/faces/context/ExternalContext.html#encodeActionURL(java.lang.String)
> >
>
http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/http/HttpServletResponse.html#encodeURL(java.lang.String)
> >
>
http://www.bluesunrise.com/portlet-api/javax/portlet/PortletResponse.html#encodeURL(java.lang.String)
> >
> > Is javadoc correct??
> >
> > > IllegalArgumentException is thrown when using mailto:.. at PortletResponse#encodeURL(String)
> > > --------------------------------------------------------------------------------------------
> > >
> > >          Key: PLUTO-203
> > >          URL: http://issues.apache.org/jira/browse/PLUTO-203
> > >      Project: Pluto
> > >         Type: Bug
> > >   Components: portlet container
> > >     Versions: 1.0.1
> > >  Environment: J2SE 1.4 on Linux
> > >     Reporter: Shinsuke SUGAYA
> > >     Assignee: David DeWolf
> > >     Priority: Critical
> > >  Attachments: PortletResponseImpl.patch
> > >
> > > For example, this problem occurs when you use the following JSF tag on MyFaces and Portlet
> environment:
> > > <h:outputLink value="mailto:test@test.com">...
> > > and also you will encounter IllegalArgumentException when using values other than ...://...
> and /...
> > > I think that the simple solution is:
> > > $ svn diff
> ./pluto-container/src/main/java/org/apache/pluto/core/impl/PortletResponseImpl.java
> > > Index: pluto-container/src/main/java/org/apache/pluto/core/impl/PortletResponseImpl.java
> > > ===================================================================
> > > --- pluto-container/src/main/java/org/apache/pluto/core/impl/PortletResponseImpl.java  
> (revision 372353)
> > > +++ pluto-container/src/main/java/org/apache/pluto/core/impl/PortletResponseImpl.java  
> (working copy)
> > > @@ -98,8 +98,7 @@
> > >      public String encodeURL(String path) {
> > >          if (path.indexOf("://") == -1 && !path.startsWith("/")) {
> > > -            throw new IllegalArgumentException(
> > > -                "only absolute URLs or full path URIs are allowed");
> > > +            return path;
> > >          }
> > >          PortletContainerServices services = getContainer()
> >
> > --
> > This message is automatically generated by JIRA.
> > -
> > If you think it was sent incorrectly contact one of the administrators:
> >    http://issues.apache.org/jira/secure/Administrators.jspa
> > -
> > For more information on JIRA, see:
> >    http://www.atlassian.com/software/jira
> >
> >
> 

--------------------------------------
GANBARE! NIPPON!
Yahoo! JAPAN JOC OFFICIAL INTERNET PORTAL SITE PARTNER
http://pr.mail.yahoo.co.jp/ganbare-nippon/

Re: [jira] Commented: (PLUTO-203) IllegalArgumentException is thrown when using mailto:.. at PortletResponse#encodeURL(String)

Posted by "David H. DeWolf" <dd...@apache.org>.
You're right, there's definately a disconnect between the specs though
I think it probably has to do more with the restrictions on portlets
than it does with pure stupidity :)

For now I would recomend that you code to the lowest commen
denominator, however, you may want to forward a request to the jsr
specification teams  - specifically the jsf team since they're the one
that tied everything else together.  You may also want to ping
jsr-168-comments@jcp.org just to ask what the motivations were to
being different than the servlet spec (my guess is it has to do with
the constraints of being a fragement and potentially within a
different context).

David

On 2/8/06, Shinsuke SUGAYA (JIRA) <ji...@apache.org> wrote:
>     [ http://issues.apache.org/jira/browse/PLUTO-203?page=comments#action_12365658 ]
>
> Shinsuke SUGAYA commented on PLUTO-203:
> ---------------------------------------
>
> Okay, I found the IllegalArgumentExeption in JavaDoc(but I could not find it in portlet-1_0-fr-spec.pdf).
>
> This problem is the diffrent behavior from Servlet API.
> For example, in JSF, ExternalContext.html#encodeActionURL(String) calls HttpServletResponse#encodeURL(String) if Servlet or PortletResponse#encodeURL(String) if Portlet. But HttpServletResponse#encodeURL(String) does NOT return the exception. Therefore, JSF developer in Portlet will encounters it on the portlet environment..
>
> http://java.sun.com/j2ee/javaserverfaces/1.1_01/docs/api/javax/faces/context/ExternalContext.html#encodeActionURL(java.lang.String)
> http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/http/HttpServletResponse.html#encodeURL(java.lang.String)
> http://www.bluesunrise.com/portlet-api/javax/portlet/PortletResponse.html#encodeURL(java.lang.String)
>
> Is javadoc correct??
>
> > IllegalArgumentException is thrown when using mailto:.. at PortletResponse#encodeURL(String)
> > --------------------------------------------------------------------------------------------
> >
> >          Key: PLUTO-203
> >          URL: http://issues.apache.org/jira/browse/PLUTO-203
> >      Project: Pluto
> >         Type: Bug
> >   Components: portlet container
> >     Versions: 1.0.1
> >  Environment: J2SE 1.4 on Linux
> >     Reporter: Shinsuke SUGAYA
> >     Assignee: David DeWolf
> >     Priority: Critical
> >  Attachments: PortletResponseImpl.patch
> >
> > For example, this problem occurs when you use the following JSF tag on MyFaces and Portlet environment:
> > <h:outputLink value="mailto:test@test.com">...
> > and also you will encounter IllegalArgumentException when using values other than ...://... and /...
> > I think that the simple solution is:
> > $ svn diff ./pluto-container/src/main/java/org/apache/pluto/core/impl/PortletResponseImpl.java
> > Index: pluto-container/src/main/java/org/apache/pluto/core/impl/PortletResponseImpl.java
> > ===================================================================
> > --- pluto-container/src/main/java/org/apache/pluto/core/impl/PortletResponseImpl.java   (revision 372353)
> > +++ pluto-container/src/main/java/org/apache/pluto/core/impl/PortletResponseImpl.java   (working copy)
> > @@ -98,8 +98,7 @@
> >      public String encodeURL(String path) {
> >          if (path.indexOf("://") == -1 && !path.startsWith("/")) {
> > -            throw new IllegalArgumentException(
> > -                "only absolute URLs or full path URIs are allowed");
> > +            return path;
> >          }
> >          PortletContainerServices services = getContainer()
>
> --
> This message is automatically generated by JIRA.
> -
> If you think it was sent incorrectly contact one of the administrators:
>    http://issues.apache.org/jira/secure/Administrators.jspa
> -
> For more information on JIRA, see:
>    http://www.atlassian.com/software/jira
>
>