Comments (11)
Reported by adamwiner
from mojarra.
@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.
@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
<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
<f:view>
<h:form>
</h:form>
</f:view>
Ed Burns
from mojarra.
@edburns said:
Fix checked in. Thanks Adam.
from mojarra.
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.
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.
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.
@manfredriem said:
Closing issue out
from mojarra.
Was assigned to javaserverfowner
from mojarra.
This issue was imported from java.net JIRA JAVASERVERFACES-36
from mojarra.
Marked as fixed on Wednesday, April 19th 2006, 5:44:08 am
from mojarra.
Related Issues (20)
- Unable to save dynamic action with clientid HOT 2
- WELD-000321: No conversation found to restore for id 1 HOT 1
- Release 2.2.19 HOT 1
- Lost component value after validation failure with multiple forms HOT 4
- form loosing attribute after submit
- Option to have VIEW_LOCATION_KEY also in production stage
- ArrayIndexOutOfBoundsException in flash context ? HOT 2
- Backport to 2.2.x the fix for Payara-2506 (ViewScope)
- ExternalContext.redirect() for AJAX creates a new HttpSession and may throw a ClassCastException/NullPointerException
- JavaServer Faces logo
- Stuck thread at popComponentFromEL(UIComponent.java:2084) causing high cpu usage HOT 1
- Ajax listener doesn't work when using h:selectOneRadio with group attribute
- styleClass is ignored in h:selectOneRadio when using group attribute
- No escaping when <f:Selectitems> is used with a Map
- f:websocket problems in mixed secure/unsecure environment (ssl proxy with unsecure server)
- Ajax encoding problem caused by server provide a different type of encoding such as Windows-31j instead of UTF-8 HOT 1
- The first ajax call sets the view's parameters while subsequent ones do not. HOT 1
- UIRepeat skips last item when end is set and Ajax is used during visitTree
- Problem with state saving of dynamic components with/or without stateless view
- Planned legacy Mojarra repository transfer HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mojarra.