Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 1.7DR#1
-
Component/s: ICE-Components
-
Labels:None
-
Environment:Portal
Description
One of the methods of OutputChart makes a cast to ServletContext. This causes an exception when running in a portal environment. The method is getPath:
public String getPath() {
String folder = "/";
if (getFacesContext() != null &&
getFacesContext().getExternalContext() != null) {
if (DOMResponseWriter.isStreamWriting()) {
folder = "./web/chart/images";
} else {
folder =
((ServletContext) getFacesContext().getExternalContext()
.getContext()).getRealPath("/charts");
}
}
return folder;
}
I did a quick search of the component section of the repository and only found one other reference in InputFile but it might be legitimate as file upload is handled in a servlet context.
public String getPath() {
String folder = "/";
if (getFacesContext() != null &&
getFacesContext().getExternalContext() != null) {
if (DOMResponseWriter.isStreamWriting()) {
folder = "./web/chart/images";
} else {
folder =
((ServletContext) getFacesContext().getExternalContext()
.getContext()).getRealPath("/charts");
}
}
return folder;
}
I did a quick search of the component section of the repository and only found one other reference in InputFile but it might be legitimate as file upload is handled in a servlet context.
Issue Links
- is duplicated by
-
ICE-2261 OutputChart NPE in WebLogic 9.2
- Closed
Activity
Deryk Sinotte
created issue -
Ken Fyten
made changes -
Field | Original Value | New Value |
---|---|---|
Fix Version/s | 1.7 [ 10080 ] | |
Assignee | Adnan Durrani [ adnan.durrani ] |
Jack Van Ooststroom
made changes -
Fix Version/s | 1.7DR#1 [ 10100 ] | |
Fix Version/s | 1.7 [ 10080 ] |
Adnan Durrani
made changes -
Status | Open [ 1 ] | In Progress [ 3 ] |
Repository | Revision | Date | User | Message |
ICEsoft Public SVN Repository | #14879 | Fri Sep 28 12:38:31 MDT 2007 | adnan.durrani | Fix for New ResourceRegistry API used. |
Files Changed | ||||
MODIFY
/icefaces/trunk/icefaces/component/src/com/icesoft/faces/component/outputchart/OutputChartRenderer.java
MODIFY /icefaces/trunk/icefaces/component/src/com/icesoft/faces/component/outputchart/AbstractChart.java MODIFY /icefaces/trunk/icefaces/component/src/com/icesoft/faces/component/outputchart/OutputChart.java |
Adnan Durrani
made changes -
Status | In Progress [ 3 ] | Resolved [ 5 ] |
Resolution | Fixed [ 1 ] |
Ken Fyten
made changes -
Fix Version/s | 1.7 [ 10080 ] |
Ken Fyten
made changes -
Status | Resolved [ 5 ] | Closed [ 6 ] |
Assignee | Adnan Durrani [ adnan.durrani ] |
Changed Fix Version to 1.7 DR#1.
As a tip Mircea suggested to look into a bit of refactoring of this method to use the ResourceRegistry instead of the ServletContext. Adnan, can you check to see if this is a feasible solution for ICEfaces 1.7 DR#1?