[ 
https://issues.apache.org/jira/browse/TAPESTRY-2106?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

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

    Resolution: Won't Fix
      Assignee: Howard M. Lewis Ship

As the Tapestry filter is currently implemented, the HttpServletRequest is not 
available at application startup.  Although we could change the filter to defer 
initialization until the first request arrives, that is not ideal for other 
reasons.  I would suggest using a symbol to store the context path and just 
keeping that in sync with your actual deployment.

> 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
>            Assignee: Howard M. Lewis Ship
>
> 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to