bugdb 18168998

I assert the cause of this bug is the dontEscape ivar of
HtmlResponseWriter is too agressively set as a side effect in
isScriptOrStyle(String name).  I don't even understand why the ivar is
set as a side effect, but I'm not going to change that.  What I will do
is add an extra assignment of false to the value of that ivar in
endElement(String).

SECTION: Modified Files
----------------------------
M       jsf-ri/src/main/java/com/sun/faces/renderkit/html_basic/HtmlResponseWriter.java

- in endElement(String) set dontEscape to false after writing the
  closing script block.

M jsf-ri/src/main/java/com/sun/faces/util/HtmlUtils.java

- Backport 2721. 


git-svn-id: https://svn.java.net/svn/mojarra~svn/branches/2.1.5@12817 761efcf2-d34d-6b61-9145-99dcacc3edf1
Bugdb 18093306

See https://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-1262 for
the related spec work.


SECTION: Modified Files
----------------------------
M       jsf-api/src/main/java/javax/faces/context/PartialResponseWriter.java

- add an inUpdate ivar.

- use the inUpdate ivar to keep track of if an </update> needs to be
  written.  This is necessary if there as a handled exception while
  rendering the partial response.  An endUpdateIfNecessary() is added for
  this purpose.

M       jsf-ri/src/main/java/com/sun/faces/context/AjaxExceptionHandlerImpl.java

- Ensure the response is marked Http 500.  We are in the
  ExceptionHandler after all.


git-svn-id: https://svn.java.net/svn/mojarra~svn/branches/2.1.5@12828 761efcf2-d34d-6b61-9145-99dcacc3edf1
BugDb 17355930: Apply suggested workaround from customer after tested in
customer environment.


SECTION: Modified Files
----------------------------
M       jsf-ri/src/main/java/com/sun/faces/renderkit/ServerSideStateHelper.java


- in writeState() make it so new LRUMap() is enclosed within
  Collections.synchronizedMap().

                   (Map) sessionMap
                         .get(LOGICAL_VIEW_MAP), String.class, Map.class);
             if (logicalMap == null) {
-                logicalMap = new LRUMap<String, Map>(numberOfLogicalViews);
+                logicalMap = Collections.synchronizedMap(new LRUMap<String, Map>(numberOfLogicalViews));
                 sessionMap.put(LOGICAL_VIEW_MAP, logicalMap);
             }
 
@@ -209,7 +210,7 @@
                   TypedCollections.dynamicallyCastMap(
                         logicalMap.get(idInLogicalMap), String.class, Object[].class);
             if (actualMap == null) {
-                actualMap = new LRUMap<String, Object[]>(numberOfViews);
+                actualMap = Collections.synchronizedMap(new LRUMap<String, Object[]>(numberOfViews));
                 logicalMap.put(idInLogicalMap, actualMap);
             }


git-svn-id: https://svn.java.net/svn/mojarra~svn/branches/2.1.5@12833 761efcf2-d34d-6b61-9145-99dcacc3edf1
Revert fix for 18168998 to isolate TCK failure.

SECTION: Modified Files
----------------------------
M       jsf-ri/src/main/java/com/sun/faces/renderkit/html_basic/HtmlResponseWriter.java
M       jsf-ri/src/main/java/com/sun/faces/util/HtmlUtils.java

svn merge -r 12817:12816 https://svn.java.net/svn/mojarra~svn/branches/2.1.5


git-svn-id: https://svn.java.net/svn/mojarra~svn/branches/2.1.5@12840 761efcf2-d34d-6b61-9145-99dcacc3edf1
Reverting the fix for 18093306 to determine cause of TCK breakage.

SECTION: Modified Files
----------------------------
M       jsf-api/src/main/java/javax/faces/context/PartialResponseWriter.java
M       jsf-ri/src/main/java/com/sun/faces/context/AjaxExceptionHandlerImpl.java

svn merge -r 12828:12827 https://svn.java.net/svn/mojarra~svn/branches/2.1.5


git-svn-id: https://svn.java.net/svn/mojarra~svn/branches/2.1.5@12843 761efcf2-d34d-6b61-9145-99dcacc3edf1
Revert fix from BugDb 17355930 to isolate TCK failure.

svn merge -r 12833:12832 https://svn.java.net/svn/mojarra~svn/branches/2.1.5

SECTION: Modified Files
----------------------------
M       jsf-ri/src/main/java/com/sun/faces/renderkit/ServerSideStateHelper.java



git-svn-id: https://svn.java.net/svn/mojarra~svn/branches/2.1.5@12845 761efcf2-d34d-6b61-9145-99dcacc3edf1
bugdb 18168998

Reapply r12817 to fix bugdb 18168998 after determining the fix for
17355930, committed in r12833, was the cause of the TCK failure.  

SECTION: Modified Files
----------------------------
M       jsf-ri/src/main/java/com/sun/faces/renderkit/html_basic/HtmlResponseWriter.java

- in endElement(String) set dontEscape to false after writing the
  closing script block.

M jsf-ri/src/main/java/com/sun/faces/util/HtmlUtils.java

- Backport 2721. 



git-svn-id: https://svn.java.net/svn/mojarra~svn/branches/2.1.5@12846 761efcf2-d34d-6b61-9145-99dcacc3edf1
Backporting https://java.net/jira/browse/JAVASERVERFACES-2277 to 2.1.5 for bugdb 17355930

git-svn-id: https://svn.java.net/svn/mojarra~svn/branches/2.1.5@12851 761efcf2-d34d-6b61-9145-99dcacc3edf1
Make sure we can create the 2 jar variant from the top-level

git-svn-id: https://svn.java.net/svn/mojarra~svn/branches/2.1.5@12852 761efcf2-d34d-6b61-9145-99dcacc3edf1
http://java.net/jira/browse/JAVASERVERFACES-3171 bugdb 18093306


SECTION: Modified Files
----------------------------
M       jsf-api/src/main/java/javax/faces/context/PartialResponseWriter.java

- assuming PartialResponseWriter.startError() is called, make so the
  current <update> section, if any was in progress at the time of the
  error, is closed out.  This is necessary if an exception is thrown
  during the ajax rendering.  For example, the following is an ajax
  response made possible by this change.

<?xml version='1.0' encoding='UTF-8'?>
  <partial-response>
    <changes>
      <update id="theForm">
        <![CDATA[
    <form id="theForm" name="theForm" method="post"
action="/web.test/exceptionHandlerTest.xhtml"
enctype="application/x-www-form-urlencoded">
    <input type="hidden" name="theForm" value="theForm" />

        <div class="message">JSF default messages in and before form:
            <br /><div
id="theForm:globalMessagesJsfDefaultBeforeInForm"></div>
        </div>
        <br />
        <div class="message">Rich faces messages in and before form:
            <br /><span class="rf-msgs "
id="theForm:globalMessagesRichBefore"></span>
        </div>

        <div style="float: right;">
            <br /><?xml version='1.0' encoding='UTF-8'?> <partial-response>
        ]]>
      </update>
    </changes>
    <error>
      <error-name>class java.lang.RuntimeException</error-name>
      <error-message>
        <![CDATA[enableExceptionInGetMessage is true, so I throw an
exception]]>
      </error-message>
    </error>
</partial-response>

Note that you still have to have your ajax code correctly handle the
error message in order for this change to be of any use.

M       jsf-api/src/main/resources/jsf.js

- in response, make it so the preceding partial-response is consider
  acceptable and treated as an error.


git-svn-id: https://svn.java.net/svn/mojarra~svn/branches/2.1.5@12855 761efcf2-d34d-6b61-9145-99dcacc3edf1
Get javax.inject from Maven repo

git-svn-id: https://svn.java.net/svn/mojarra~svn/branches/2.1.5@12867 761efcf2-d34d-6b61-9145-99dcacc3edf1