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=12564834#action_12564834
] 

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

Starting in Sevlet API 2.5, you can get the context path from the ServletContext.

> 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