You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Matthew (JIRA)" <de...@tapestry.apache.org> on 2007/10/12 23:48:50 UTC

[jira] Created: (TAPESTRY-1821) Cookies not working in RequestFilter in AppModule

Cookies not working in RequestFilter in AppModule
-------------------------------------------------

                 Key: TAPESTRY-1821
                 URL: https://issues.apache.org/jira/browse/TAPESTRY-1821
             Project: Tapestry
          Issue Type: Bug
    Affects Versions: 5.0.6
            Reporter: Matthew


Cookie not working in RequestFilter in AppModule, for example:
code of 
public class AppModule{ ......

     public RequestFilter buildAffiliateFilter(final Logger log, final AffiliateManager _affiliateManager, final Cookies _cookies )
        {
            return new RequestFilter()
            {
                public boolean service(Request request, Response response, RequestHandler handler)
                        throws IOException
                {
                    //@Inject
                    //AffiliateManager _affiliateManager;
                    
                    String affParam = request.getParameter("aid");
                    
                    //START Filter Affiliate
                    if( affParam != null){
                        Affiliate aff = _affiliateManager.getAffiliate(request.getParameter("aid"));
                        if(aff!=null){

                            String name = "aid";
                            String value = request.getParameter("aid");

                            _cookies.writeCookieValue("erweter","xxx","/153/");
                            //or
                            _cookies.writeCookieValue(name,value,60*60*24*31*12*10); 

                        }
                    }
                    //END Filter Affiliate                            
                                                   
                            
                    return handler.service(request, response);
                }
            };
        }




Cookies not saved!

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Closed: (TAPESTRY-1821) Cookies not working in RequestFilter in AppModule

Posted by "Howard M. Lewis Ship (JIRA)" <de...@tapestry.apache.org>.
     [ https://issues.apache.org/jira/browse/TAPESTRY-1821?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard M. Lewis Ship closed TAPESTRY-1821.
------------------------------------------

    Resolution: Incomplete
      Assignee: Howard M. Lewis Ship

Please provide a stack trace from a reasonably current (5.0.7 or 5.0.8) version of the library.

> Cookies not working in RequestFilter in AppModule
> -------------------------------------------------
>
>                 Key: TAPESTRY-1821
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-1821
>             Project: Tapestry
>          Issue Type: Bug
>    Affects Versions: 5.0.6
>            Reporter: Matthew
>            Assignee: Howard M. Lewis Ship
>
> Cookie not working in RequestFilter in AppModule, for example:
> code of 
> public class AppModule{ ......
>      public RequestFilter buildAffiliateFilter(final Logger log, final AffiliateManager _affiliateManager, final Cookies _cookies )
>         {
>             return new RequestFilter()
>             {
>                 public boolean service(Request request, Response response, RequestHandler handler)
>                         throws IOException
>                 {
>                     //@Inject
>                     //AffiliateManager _affiliateManager;
>                     
>                     String affParam = request.getParameter("aid");
>                     
>                     //START Filter Affiliate
>                     if( affParam != null){
>                         Affiliate aff = _affiliateManager.getAffiliate(request.getParameter("aid"));
>                         if(aff!=null){
>                             String name = "aid";
>                             String value = request.getParameter("aid");
>                             _cookies.writeCookieValue("erweter","xxx","/153/");
>                             //or
>                             _cookies.writeCookieValue(name,value,60*60*24*31*12*10); 
>                         }
>                     }
>                     //END Filter Affiliate                            
>                                                    
>                             
>                     return handler.service(request, response);
>                 }
>             };
>         }
> Cookies not saved!

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (TAPESTRY-1821) Cookies not working in RequestFilter in AppModule

Posted by "Howard M. Lewis Ship (JIRA)" <de...@tapestry.apache.org>.
    [ https://issues.apache.org/jira/browse/TAPESTRY-1821?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12546413 ] 

Howard M. Lewis Ship commented on TAPESTRY-1821:
------------------------------------------------

Have you contributed your filter into the RequestHandler service configuration?

Do you see an error or an exception?

What's with the underscores in your parameter names? :-)

Have you verified with FireBug whether the cookie value is being sent in the response?

> Cookies not working in RequestFilter in AppModule
> -------------------------------------------------
>
>                 Key: TAPESTRY-1821
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-1821
>             Project: Tapestry
>          Issue Type: Bug
>    Affects Versions: 5.0.6
>            Reporter: Matthew
>
> Cookie not working in RequestFilter in AppModule, for example:
> code of 
> public class AppModule{ ......
>      public RequestFilter buildAffiliateFilter(final Logger log, final AffiliateManager _affiliateManager, final Cookies _cookies )
>         {
>             return new RequestFilter()
>             {
>                 public boolean service(Request request, Response response, RequestHandler handler)
>                         throws IOException
>                 {
>                     //@Inject
>                     //AffiliateManager _affiliateManager;
>                     
>                     String affParam = request.getParameter("aid");
>                     
>                     //START Filter Affiliate
>                     if( affParam != null){
>                         Affiliate aff = _affiliateManager.getAffiliate(request.getParameter("aid"));
>                         if(aff!=null){
>                             String name = "aid";
>                             String value = request.getParameter("aid");
>                             _cookies.writeCookieValue("erweter","xxx","/153/");
>                             //or
>                             _cookies.writeCookieValue(name,value,60*60*24*31*12*10); 
>                         }
>                     }
>                     //END Filter Affiliate                            
>                                                    
>                             
>                     return handler.service(request, response);
>                 }
>             };
>         }
> Cookies not saved!

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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