You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Shawn Church <sh...@boxity.com> on 2005/10/12 17:35:26 UTC
Engine service needs cookies
I have an IEngineService implementation called "userservice" which needs
access to HTTP request cookie values, but unfortunately they do not seem
available. Here's my configuration:
<service-point id="userservice"
interface="org.apache.tapestry.engine.IEngineService">
<invoke-factory>
<construct class="com.mcelroy.auth.UserService">
<set-object property="response"
value="service:tapestry.globals.WebResponse"/>
<set-object property="exceptionReporter"
value="service:tapestry.error.RequestExceptionReporter"/>
<set-object property="linkFactory"
value="infrastructure:linkFactory"/>
<set-object property="applicationStateManager"
value="infrastructure:applicationStateManager"/>
<set-object property="cookieSource"
value="infrastructure:cookieSource"/>
</construct>
</invoke-factory>
<interceptor service-id="hivemind.LoggingInterceptor"/>
</service-point>
Stepping through a debugger, CookieSourceImpl gets invoked just fine,
but the _request.getCookies() call within the readCookieValue method
always returns null.
Pages I have which implement IExternalPage and use the external service
work fine.
I like the way engine services are defined in HiveMind, so I hope I
don't have to go back to using the external service just to get cookie
values. This particular service returns an xml response, so it makes
sense to not use IExternalPage.
Can anyone see anything I'm doing wrong? I'm using beta-10.
Thanks,
Shawn
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
RE: Engine service needs cookies
Posted by Shawn Church <sh...@boxity.com>.
I'm thinking of converting my userservice back to IExternalPage since the
normal external service has no trouble getting cookie values. Has anyone
else run across this? I'm not sure if this is a bug or if Tapestry is
working as designed.
Thanks,
Shawn
-----Original Message-----
From: Shawn Church [mailto:shawn@boxity.com]
Sent: Wednesday, October 12, 2005 10:35 AM
To: tapestry-user@jakarta.apache.org
Subject: Engine service needs cookies
I have an IEngineService implementation called "userservice" which needs
access to HTTP request cookie values, but unfortunately they do not seem
available. Here's my configuration:
<service-point id="userservice"
interface="org.apache.tapestry.engine.IEngineService">
<invoke-factory>
<construct class="com.mcelroy.auth.UserService">
<set-object property="response"
value="service:tapestry.globals.WebResponse"/>
<set-object property="exceptionReporter"
value="service:tapestry.error.RequestExceptionReporter"/>
<set-object property="linkFactory"
value="infrastructure:linkFactory"/>
<set-object property="applicationStateManager"
value="infrastructure:applicationStateManager"/>
<set-object property="cookieSource"
value="infrastructure:cookieSource"/>
</construct>
</invoke-factory>
<interceptor service-id="hivemind.LoggingInterceptor"/>
</service-point>
Stepping through a debugger, CookieSourceImpl gets invoked just fine,
but the _request.getCookies() call within the readCookieValue method
always returns null.
Pages I have which implement IExternalPage and use the external service
work fine.
I like the way engine services are defined in HiveMind, so I hope I
don't have to go back to using the external service just to get cookie
values. This particular service returns an xml response, so it makes
sense to not use IExternalPage.
Can anyone see anything I'm doing wrong? I'm using beta-10.
Thanks,
Shawn
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org