You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "János Cserép (JIRA)" <ji...@apache.org> on 2007/06/26 16:35:26 UTC

[jira] Issue Comment Edited: (WICKET-631) Resource.getParameters() empty when resource is mounted

    [ https://issues.apache.org/jira/browse/WICKET-631?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12508188 ] 

János Cserép edited comment on WICKET-631 at 6/26/07 7:35 AM:
--------------------------------------------------------------

I think I've found the line that causes this problem. In Resource.java:

finally
		{
			// Really really really make sure parameters are cleared
			parameters.set(null);
		}

is called in onResourceRequested(). This is called in the PROCESS_EVENTS step.

So in the RESPOND step my application doesn't see the parameters anymore.

If the page is not mounted then Resource.getParameters() can still access the parameters through RequestCycle.get().getRequest().getParameters(), but when the resource is mounted, this fails.

Can someone check out why you really really really have to make sure that the parameters are cleared in the PROCESS_EVENTS step? I guess you didn't want to have objects lying around in the ThreadLocal, but that should really be moved after the resource finished assembling the response to the request.

Thanks,

janos


 was:
I think I've found the line that causes this problem. In Resource.java:

finally
		{
			// Really really really make sure parameters are cleared
			parameters.set(null);
		}

is called in onResourceRequested(). This is called in the PROCESS_EVENTS step.

So in the RESPOND step my application doesn't see the parameters anymore.

If the page is not mounted then Resource.getParameters() can still access the parameters through RequestCycle.get().getRequest().getParameters(), but when the resource is mounted, this fails.

Can someone check out why you really really really have to make sure that the parameters are cleared in the PROCESS_EVENTS step?

Thanks,

janos

> Resource.getParameters() empty when resource is mounted
> -------------------------------------------------------
>
>                 Key: WICKET-631
>                 URL: https://issues.apache.org/jira/browse/WICKET-631
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.0-beta1
>         Environment: wicket 1.3.0-incubating-SNAPSHOT running on Glassfish and JDK 1.6.0
>            Reporter: János Cserép
>             Fix For: 1.3.0-beta3
>
>
> After migrating my application from 1.2.6 to 1.3.0-incubating-SNAPSHOT mounted shared resources (rss feeds, uploaded images) stopped working.
> DynamicWebResource.getParameters().getXXX() returns with null if the resource is mounted via Application.mountSharedResource but it works fine when the resource is not mounted.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.