tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Howard M. Lewis Ship (JIRA)" <...@tapestry.apache.org>
Subject [jira] Commented: (TAPESTRY-2106) Cannot inject (and use) Request or RequestGlobals into app module contribution methods
Date Fri, 01 Feb 2008 17:23:09 GMT

    [ https://issues.apache.org/jira/browse/TAPESTRY-2106?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12564833#action_12564833
] 

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

An issue here is that the Request object (and underlying HttpServletRequest) is not available
yet at the time the ApplicationDefaults configuration is constructed ... the first request
will not have arrived yet.

> Cannot inject (and use) Request or RequestGlobals into app module contribution methods
> --------------------------------------------------------------------------------------
>
>                 Key: TAPESTRY-2106
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-2106
>             Project: Tapestry
>          Issue Type: Bug
>    Affects Versions: 5.0, 5.0.10
>            Reporter: Chris Lewis
>
> I have been trying to use Request or RequestGlobals in a contribution method for resolving
a path, but am unable to do so:
> public static void contributeApplicationDefaults(MappedConfiguration<String, String>
configuration, Request request) {
>     request.getContextPath(); //throws NPE!
> }
> I've tried these other methods of injection as well, with the same results:
> public static void contributeApplicationDefaults(MappedConfiguration<String, String>
configuration, Request request) {}
> public static void contributeApplicationDefaults(MappedConfiguration<String, String>
configuration, @Inject Request request) {}
> public static void contributeApplicationDefaults(MappedConfiguration<String, String>
configuration, @InjectService("Request") Request request) {} 

-- 
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


Mime
View raw message