eclipse-ee4j / mojarra-jsf-extensions

Other
1 stars 3 forks source link

nested CDATA sections in response #63

Closed glassfishrobot closed 17 years ago

glassfishrobot commented 17 years ago

The page below causes the Javascript error "components has no properties". Appears to be related to a parse error, probably caused by nested CDATA sections in the AJAX response.

sayhello.jsp:

<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%> <%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%> <%@taglib prefix="jsfExt" uri="http://java.sun.com/jsf/extensions/dynafaces"%>

AJAX Response (from Firebug):

Hello Bob
]]>

Backing Bean:

public class Bean {

private String name;

public String getName()

{ return name; }

public void setName(String firstName)

{ this.name = firstName; }

}

Environment

Operating System: All Platform: All

Affected Versions

[current]

glassfishrobot commented 5 years ago
glassfishrobot commented 17 years ago

@glassfishrobot Commented Reported by iamnoah

glassfishrobot commented 17 years ago

@glassfishrobot Commented iamnoah said: It seems that the probably might be that call to startElement for script and style tags as the underlying ResponseWriter emits the CDATA sections on it's own by calling write on an instance of Writer that it has wrapped. e.g. in com.sun.faces.renderkit.html_basic.HtmlResponseWriter, line 818.

glassfishrobot commented 17 years ago

@glassfishrobot Commented @rlubke said: What version of JSF 1.2 are you using?

glassfishrobot commented 17 years ago

@glassfishrobot Commented @rlubke said: CC'ing myself.

glassfishrobot commented 17 years ago

@glassfishrobot Commented iamnoah said: 1.2_03

glassfishrobot commented 17 years ago

@glassfishrobot Commented @rlubke said: Could you also provide the JSF build number?

glassfishrobot commented 17 years ago

@glassfishrobot Commented iamnoah said: Not entirely sure what you mean but I'm guessing when the log says "Initializing Sun's JavaServer Faces implementation (1.2-b20-FCS)" that means build 20, yes?

glassfishrobot commented 17 years ago

@glassfishrobot Commented @rlubke said: Hmm, that would be the original release of 1.2, not 1.2_03 (FCS was build 9).

If you're using GlassFish, I'd recommend grabbing the 1.2_03 GlassFish updater [1], otherwise grab the binaries [1] and replace the existing libraries.

Ensure you see the 1.2_03-b09-FCS in the log and try your example again.

[1] https://javaserverfaces.dev.java.net/servlets/ProjectDocumentList?folderID=6481&expandFolder=6481&folderID=1504

glassfishrobot commented 17 years ago

@glassfishrobot Commented @rlubke said: Any update on this?

glassfishrobot commented 17 years ago

@glassfishrobot Commented @edburns said: I thought we handled the nested CDATA problem but I'll see if I can reproduce this.

glassfishrobot commented 17 years ago

@glassfishrobot Commented @rlubke said: I thought it was fixed too.

I was able to reproduce the JS error reported using 1.2_03, but I haven't had a chance to check the wire data.

glassfishrobot commented 17 years ago

@glassfishrobot Commented @edburns said: I am unable to reproduce this bug using the following hardware/software stack

Apple Powerbook G4 Mac OS X 10.4.8 Apple Java 1.5.0_06 SJSAS 9.1 beta Sun's JavaServer Faces implementation (1.2_03-b09-FCS) DynaFaces 0.1 rc2

I will attach the war.

glassfishrobot commented 17 years ago

@glassfishrobot Commented @edburns said: Created an attachment (id=16) WAR of this example

glassfishrobot commented 17 years ago

@glassfishrobot Commented iamnoah said: If you look at the jsf-api-1.2.jar in your war, it doesn't contain any class files, only source, although that doesn't seem to matter on glassfish. For tomcat6 I had to add my copy of jsf-api and jsf-impl and the jstl jar. Once it was running, I had the same problem as described in issue 64, which prevents me from reproducing this issue.

On glassfish, it worked fine and I didn't add any jars.

My stack: Tomcat 6.0.9 jstl 1.1.0 JSF 1.2_03-b09-FCS (api and impl) jsf-extensions rc2 Kubuntu 6.10 Firefox 2.0.0.1

I also binary diffed the jsf-impl.jar from glassfish with my copy and they do differ (but both say they are 1.2_03-b09-FCS) as do my copy of the dynafaces jars from rc2 with the ones in your WAR.

Additionally, if I replace my copy of the jsf-impl.jar with the one from the glassfish lib dirrectory I get NoClassDefFoundError: com/sun/org/apache/commons/digester/RuleSet on startup.

So, in short, we are not working with the same jars, although how different they are, I don't know. I got mine from https://javaserverfaces.dev.java.net/files/documents/1866/44998/jsf-1_2_03.zip and https://jsf-extensions.dev.java.net/files/documents/4613/50755/jsf-extensions-0.1.tar.gz The jstl jar is from Maven.

glassfishrobot commented 17 years ago

@glassfishrobot Commented @rlubke said:

Additionally, if I replace my copy of the jsf-impl.jar with the one from the glassfish lib dirrectory I get NoClassDefFoundError: com/sun/org/apache/commons/digester/RuleSet on startup.

Just to clear the difference between the jsf-impl.jar and that from the javaserverfaces site - the GlassFish version of the jar doesn't include any of the com.sun.org clases as those classes are included in the appserv-rt.jar. The standlone build however does include them.

glassfishrobot commented 17 years ago

@glassfishrobot Commented iamnoah said: Can close this issue. Other than having to use the workaround in issue 64, this example works. Sorry for the confusion.

glassfishrobot commented 17 years ago

@glassfishrobot Commented mode said: Closing the bug per user comments.

glassfishrobot commented 17 years ago

@glassfishrobot Commented File: dynafaces-63.war Attached By: @edburns

glassfishrobot commented 17 years ago

@glassfishrobot Commented Issue-Links: depends on JSF_EXTENSIONS-64

glassfishrobot commented 7 years ago

@glassfishrobot Commented This issue was imported from java.net JIRA JSF_EXTENSIONS-63

glassfishrobot commented 17 years ago

@glassfishrobot Commented Marked as fixed on Friday, March 2nd 2007, 2:31:18 am