Giter Club home page Giter Club logo

Comments (11)

javaserverfaces avatar javaserverfaces commented on July 30, 2024

Reported by adamwiner

from mojarra.

javaserverfaces avatar javaserverfaces commented on July 30, 2024

@edburns said:
Roger, I think an HTMLUnit testcase could demonstrate this fix. The webapp
would have two JSP pages. Page 1 would throw an exception, page 2 would not.
The HTMLUnit testcase would request page 1, then request page 2 and verifiy that
it displays correctly.

from mojarra.

javaserverfaces avatar javaserverfaces commented on July 30, 2024

@edburns said:
Issue: https://javaserverfaces.dev.java.net/issues/show_bug.cgi?id=36
Submitted by: Adam Winer
r=edburns

Clear out some ivars during the start render phase of the tag.

SECTION: API Changes

M jsf-api/src/javax/faces/webapp/UIComponentTag.java

  • clear out the created {Facets,Components}

    ivars in doStartTag(). This
    allows containers that re-use tag instances to not break.

SECTION: RI Changes

A jsf-ri/systest/src/com/sun/faces/jsptest/TagIvarTestCase.java
A jsf-ri/systest/web/tag-ivars1.jsp
A jsf-ri/systest/web/tag-ivars2.jsp

  • testcase content

SECTION: API Diffs

Index: jsf-api/src/javax/faces/webapp/UIComponentTag.java

RCS file:
/cvs/javaserverfaces-sources/jsf-api/src/javax/faces/webapp/UIComponentTag.java,v
retrieving revision 1.50
diff -u -r1.50 UIComponentTag.java
— jsf-api/src/javax/faces/webapp/UIComponentTag.java 13 Aug 2004 20:08:24
-0000 1.50
+++ jsf-api/src/javax/faces/webapp/UIComponentTag.java 31 Aug 2004 19:20:08 -0000
@@ -394,6 +394,10 @@

  • @exception JspException if an error occurs
    */
    public int doStartTag() throws JspException {
    • // make sure that these ivars are reset at the beginning of the
    • // lifecycle for this tag.
    • createdComponents = null;
    • createdFacets = null;

context =
(FacesContext) pageContext.getAttribute(CURRENT_FACES_CONTEXT);

SECTION: RI New Files

/*

  • $Id: TagIvarTestCase.java,v 1.6 2004/06/11 15:00:30 rogerk Exp $
    */

/*

  • Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  • SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
    */

package com.sun.faces.jsptest;

import com.gargoylesoftware.htmlunit.WebClient;
import com.gargoylesoftware.htmlunit.html.HtmlAnchor;
import com.gargoylesoftware.htmlunit.html.HtmlBody;
import com.gargoylesoftware.htmlunit.html.HtmlElement;
import com.gargoylesoftware.htmlunit.html.HtmlForm;
import com.gargoylesoftware.htmlunit.html.HtmlPage;
import com.gargoylesoftware.htmlunit.html.HtmlSubmitInput;
import com.gargoylesoftware.htmlunit.html.HtmlTextInput;
import com.sun.faces.htmlunit.AbstractTestCase;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;

import java.util.Locale;
import java.util.ResourceBundle;

/**

  • Test Case for JSP Interoperability.

    */

public class TagIvarTestCase extends AbstractTestCase {

// ------------------------------------------------------------ Constructors

/**

  • Construct a new instance of this test case.
    *
  • @param name Name of the test case
    */
    public TagIvarTestCase(String name) { super(name); }

// ------------------------------------------------------ Instance Variables

// ---------------------------------------------------- Overall Test Methods

/**

  • Set up instance variables required by this test case.
    */
    public void setUp() throws Exception { super.setUp(); }

/**

  • Return the tests included in this test suite.
    */
    public static Test suite() { return (new TestSuite(TagIvarTestCase.class)); }

/**

  • Tear down instance variables required by this test case.
    */
    public void tearDown() { super.tearDown(); }

// ------------------------------------------------- Individual Test Methods

public void testLocaleOnTagIvar() throws Exception

{ HtmlPage page; // ignore the exception intentionally thrown by the first page. client.setThrowExceptionOnFailingStatusCode(false); page = getPage("/faces/tag-ivars1.jsp"); client.setThrowExceptionOnFailingStatusCode(true); page = getPage("/faces/tag-ivars2.jsp"); }

}

<title>Test Tag ivars are cleared properly</title> <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %> <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>

Test Tag ivars are cleared properly

[https://javaserverfaces.dev.java.net/issues/show_bug.cgi?id=36](https://javaserverfaces.dev.java.net/issues/show_bug.cgi?id=36)

<f:view>

<h:form>

<% Object hello = ""; hello = null; Object goodBye = hello.toString(); %>

</h:form>

</f:view>


Ed Burns Last modified: Tue Aug 31 13:42:12 EDT 2004 <title>Test Tag ivars are cleared properly</title> <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %> <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>

Test Tag ivars are cleared properly

[https://javaserverfaces.dev.java.net/issues/show_bug.cgi?id=36](https://javaserverfaces.dev.java.net/issues/show_bug.cgi?id=36)

<f:view>

<h:form>

</h:form>

</f:view>


Ed Burns

from mojarra.

javaserverfaces avatar javaserverfaces commented on July 30, 2024

@edburns said:
Fix checked in. Thanks Adam.

from mojarra.

javaserverfaces avatar javaserverfaces commented on July 30, 2024

yoozd said:
We're running the weekly build from 14/10/2004 and we're still experiencing this
problem on OC4J.
We'd really appreciate a fix for this since any uncaught exception incapacitates
the whole appserver instance. We can't go into production with this problem.

Sincerely,
Joost de Vries
You can contact me at
joost de vries capgemini com

from mojarra.

javaserverfaces avatar javaserverfaces commented on July 30, 2024

jayashri said:
Hi Adam, would you mind checking if you can reproduce this problem on your end ?
You would have to grab weekly build. JSF 1.1_01 release doesn't include this
fix. I am unable to reproduce this with JWSDP or Sun AppServer.
Thanks a lot for your help.

from mojarra.

javaserverfaces avatar javaserverfaces commented on July 30, 2024

jayashri said:
Since I haven't heard from issue reporter further regarding this issue, I am
closing it. Please re open with more details if this problem this persists.

from mojarra.

javaserverfaces avatar javaserverfaces commented on July 30, 2024

@manfredriem said:
Closing issue out

from mojarra.

javaserverfaces avatar javaserverfaces commented on July 30, 2024

Was assigned to javaserverfowner

from mojarra.

javaserverfaces avatar javaserverfaces commented on July 30, 2024

This issue was imported from java.net JIRA JAVASERVERFACES-36

from mojarra.

javaserverfaces avatar javaserverfaces commented on July 30, 2024

Marked as fixed on Wednesday, April 19th 2006, 5:44:08 am

from mojarra.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.