9. Java for Web Development for PHP developer – a rant

In the 9th hours, I have learned about Expression Language on JSP pages. Expression Language (EL) is a scripting language which allows access to Java components (JavaBeans) through JSP.

<%@ page isElIgnored=TRUE|FALSE %>

${23E4} for 23 * 10^4.

Declaration section:

<%!

int a = 10, b = 20;

%>

<% pageContext.setAttribute("Num1", a); %>

By using scriptlet
<%=a%>

By using EL
${pageScope["Num1"]}, or
${pageScope.Num1}
Single quote is acceptable.

---

<form method=post>
<input type="text" name="Ename">
</form>

After submit: Using Expression Language, value of Ename
${param["Ename"]}

Inside Expression Language, expression can be used

http://www.ibm.com/developerworks/java/library/j-jstl0211.html
http://java.boot.by/wcd-guide/ch06s02.html
http://www.jsptutorial.net/expression-language-jsp.aspx
http://en.wikipedia.org/wiki/Expression_Language
http://download.oracle.com/javaee/1.4/tutorial/doc/JSPIntro7.html