You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by matt22 <s1...@zoznam.sk> on 2007/09/30 00:14:42 UTC

Cookies in filter not working

Cookies in app-filter in AppModule not working(not saved):

running:
_cookies.writeCookieValue("erweter","xxx"); - get exception \/
_cookies.writeCookieValue("erweter","xxx","/abc/"); - is ok but not working

Exception:
00:12:42.703 ERROR! [SocketListener0-1]
org.apache.tapestry.internal.services.DefaultRequestExceptionHandler.handleRequestException(DefaultRequestExceptionHandler.java:50)
>64> Processing of request failed with uncaught exception:
java.lang.NullPointerException
java.lang.NullPointerException
	at $Request_11553537285.getContextPath($Request_11553537285.java)
	at $Request_1155353726f.getContextPath($Request_1155353726f.java)
	at
org.apache.tapestry.internal.services.CookiesImpl.writeCookieValue(CookiesImpl.java:73)
	at
org.apache.tapestry.internal.services.CookiesImpl.writeCookieValue(CookiesImpl.java:67)
	at $Cookies_11553537281.writeCookieValue($Cookies_11553537281.java)
	at com.iproshop.services.AppModule$2.service(AppModule.java:108)
	at $RequestFilter_1155353727d.service($RequestFilter_1155353727d.java)



Filter - CODE - appModule.java:
     public RequestFilter buildAffiliateFilter(final Log 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");
                    log.error("buildAffiliateFilter: affParam: "+affParam);
                    
                    _cookies.writeCookieValue("erweter","xxx","/abc/");
                    //System.out.println("LocalFilter!!!_cookies:"+_cookies
);


                    /* ............  */

                     return handler.service(request, response);

                }
              }
      }

-- 
View this message in context: http://www.nabble.com/Cookies-in-filter-not-working-tf4541398.html#a12960519
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