Subscribe

RSS Feed (xml)

Powered By

Skin Design:
Free Blogger Skins

Powered by Blogger

Saturday, December 1, 2007

java code for Expression Language Examples



<!-- be aware that this listing will not work<br />in Tomcat 4.1, or any other container that does<br />not support the use of the expression language outside<br />of tags --><br /><html><br /><head><br /><title>Expression Language Examples
<%
// set up a page context parameter for use later in the page
// normally this would have been set within the context of
// an application
pageContext.setAttribute("pageColor", "blue");
%>




Welcome to the ${param.department} Department



Here are some basic comparisons:


Is 1 less than 2? ${1<2}

Does 5 equal 5? ${5==5}

Is 6 greater than 7? ${6 gt 7}


Now for some math:

6 + 7 = ${6+7}

8 x 9 = ${8*9}




You appear to be using the following browser:
${header["user-agent"]}


No comments: