Install Oracle Java JDK on CentOS 6.4

1. Download Oracle Java JDK  7u45 32-bit/64-bit RPM packages
#http://www.oracle.com/technetwork/java/javase/downloads/index.html. Select rpm

2.  Installation
2.1) rpm -Uvh jdk-7u45-linux-i586.rpm
2.2) Install Alternatives
alternatives –install /usr/bin/java java /usr/java/latest/jre/bin/java 200000
alternatives –install /usr/bin/javaws javaws /usr/java/latest/jre/bin/javaws 200000
alternatives –install /usr/bin/javac javac /usr/java/latest/bin/javac 200000
alternatives –install /usr/bin/jar jar /usr/java/latest/bin/jar 200000
2.3) More Alternatives 🙂
alternatives –install /usr/bin/java java /usr/java/jdk1.7.0_45/jre/bin/java 200000
alternatives –install /usr/bin/javaws javaws /usr/java/jdk1.7.0_45/jre/bin/javaws 200000
alternatives –install /usr/bin/javac javac /usr/java/jdk1.7.0_45/bin/javac 200000
alternatives –install /usr/bin/jar jar /usr/java/jdk1.7.0_45/bin/jar 200000
2.4)  Install new Java as alternative
alternatives –install /usr/bin/java java /usr/java/latest/bin/java 200000
alternatives –install /usr/bin/javaws javaws /usr/java/latest/bin/javaws 200000
3) Sanity check
java -version
java version “1.7.0_45”
Java(TM) SE Runtime Environment (build 1.7.0_45-b18)
Java HotSpot(TM) Client VM (build 24.45-b08, mixed mode, sharing)

[Solved] “The entity name must immediately follow the ‘&’ in the entity reference.” : JSF error

You’re editing a scripted page and get this message when saving:

The entity name must immediately follow the ‘&’ in the entity reference.

If you are trying to add a condition inside your if loop like

if(aa && bb)

For the javascript to be valid it must be used within CDATA tag:

<script type="text/javascript">
<![CDATA[
// code goes here
]]>
</script>

reference: http://wiki.editme.com/EscapingAmersandsInPageScripts