Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 1.5.3
-
Fix Version/s: 1.6.1
-
Component/s: None
-
Labels:None
-
Environment:Operating System: Windows XP
Platform: PC
-
Workaround Exists:Yes
-
Workaround Description:
Description
In FileUploadServlet.java the execute() method doesn't pass the RESTORE_VIEW phase because the VIEW_STATE_PARAM parameter required by GlassFish JSF 1.2 implementation to think it's a postBack, is not encoded in FileUploadServlet.
There should have been a similar code in FileUploadServlet.java like in BlockingServlet.java where you have:
BlockingServlet.java:
static {
//We will place VIEW_STATE_PARAM in the requestMap so that
//JSF 1.2 doesn't think the request is a postback and skip
//execution
try {
Field field = javax.faces.render.ResponseStateManager.class.getField("VIEW_STATE_PARAM");
if (null != field) {
postBackKey = (String) field.get(javax.faces.render.ResponseStateManager.class);
}
} catch (Exception e) {
}
}
....
void renderCycle(BridgeFacesContext context, Lifecycle lifecycle) {
synchronized (context) {
context.setCurrentInstance();
DOMResponseWriter.applyBrowserDOMChanges(context);
//Here is where the key is being set into the external context
if (null != postBackKey) {
context.getExternalContext().getRequestParameterMap()
.put(postBackKey, "not reload");
}
lifecycle.execute(context);
lifecycle.render(context);
context.release();
}
}
There should have been a similar code in FileUploadServlet.java like in BlockingServlet.java where you have:
BlockingServlet.java:
static {
//We will place VIEW_STATE_PARAM in the requestMap so that
//JSF 1.2 doesn't think the request is a postback and skip
//execution
try {
Field field = javax.faces.render.ResponseStateManager.class.getField("VIEW_STATE_PARAM");
if (null != field) {
postBackKey = (String) field.get(javax.faces.render.ResponseStateManager.class);
}
} catch (Exception e) {
}
}
....
void renderCycle(BridgeFacesContext context, Lifecycle lifecycle) {
synchronized (context) {
context.setCurrentInstance();
DOMResponseWriter.applyBrowserDOMChanges(context);
//Here is where the key is being set into the external context
if (null != postBackKey) {
context.getExternalContext().getRequestParameterMap()
.put(postBackKey, "not reload");
}
lifecycle.execute(context);
lifecycle.render(context);
context.release();
}
}
Activity
Dan Leahu
created issue -
Ken Fyten
made changes -
Field | Original Value | New Value |
---|---|---|
Fix Version/s | 1.7 [ 10080 ] | |
Assignee | Mark Collette [ mark.collette ] |
Ken Fyten
made changes -
Assignee | Mark Collette [ mark.collette ] | Sam Xiao [ sam.xiao ] |
Ken Fyten
made changes -
Status | Open [ 1 ] | Resolved [ 5 ] |
Fix Version/s | 1.6.1 [ 10070 ] | |
Fix Version/s | 1.7 [ 10080 ] | |
Resolution | Fixed [ 1 ] | |
Assignee | Sam Xiao [ sam.xiao ] |
Ken Fyten
made changes -
Status | Resolved [ 5 ] | Closed [ 6 ] |
This issue pre-dates work done on inputFile in 1.6. Please review to determine if it's still relevant.