Expression Language Examples : Basics « JSP « Java

Home
Java
1.2D Graphics GUI
2.3D
3.Advanced Graphics
4.Ant
5.Apache Common
6.Chart
7.Class
8.Collections Data Structure
9.Data Type
10.Database SQL JDBC
11.Design Pattern
12.Development Class
13.EJB3
14.Email
15.Event
16.File Input Output
17.Game
18.Generics
19.GWT
20.Hibernate
21.I18N
22.J2EE
23.J2ME
24.JavaFX
25.JDK 6
26.JDK 7
27.JNDI LDAP
28.JPA
29.JSP
30.JSTL
31.Language Basics
32.Network Protocol
33.PDF RTF
34.Reflection
35.Regular Expressions
36.Scripting
37.Security
38.Servlets
39.Spring
40.Swing Components
41.Swing JFC
42.SWT JFace Eclipse
43.Threads
44.Tiny Application
45.Velocity
46.Web Services SOA
47.XML
Java » JSP » Basics 




Expression Language Examples

<html>
<head>
<title><!-- be aware that this listing will not work
in Tomcat 4.1, or any other container that does
not support the use of the expression language outside
of tags -->
<html>
<head>
<title>Expression Language Examples</title>
<%
  // 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");
%>

</head>
<body bgcolor="${pageScope.pageColor}">

<h1>Welcome to the ${param.departmentDepartment</h1>

Here are some basic comparisons:
<p>
Is less than 2? ${1<2<br>
Does equal 5? ${5==5<br>
Is greater than 7? ${gt 7}<br>

<p>Now for some math:<br>
= ${6+7}<br>
= ${8*9}<br>


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

</body>
</html></title>

           
       














Related examples in the same category
1.JSP Passing Parameters
2.Simplest Jsp page: A Web Page
3.Output: Creating a Greeting
4.Simple JSP outputSimple JSP output
5.Simple JSP page to display the random number
6.Comments in JSP page
7.Declaration Tag Example
8.Declaration Tag - Methods
9.Passing parameters
10.JSP Initialization
11.Welcome page and top level URL
12.JSP Expression Language
13.JSP without beans
14.Request header display in a JSP
15.Multiple Declaration
16.Embedding Code
17.pwd -- print working directory
18.JSP post
19.JSP Post Data Viewer
20.JSP in J2EE
21.JSP Performance
22.JSP Best Practices and Tools
23.JSP Model 2JSP Model 2
24.JSP: expression language 2JSP: expression language 2
25.JSP Basics: Dynamic Page Creation for Data Presentation 2JSP Basics: Dynamic Page Creation for Data Presentation 2
26.JSP Directives: your page
27.JSP Directives
28.JSP Basics ch02 JSP Basics ch02
29.JSP Basics: Generalized Templating and Server Scripting 1JSP Basics: Generalized Templating and Server Scripting 1
30.JSP Basics: Generalized Templating and Server Scripting 2JSP Basics: Generalized Templating and Server Scripting 2
31.JSP Basics: Generalized Templating and Server Scripting 3JSP Basics: Generalized Templating and Server Scripting 3
32.CSS, JavaScript, VBScript, and JSP 1CSS, JavaScript, VBScript, and JSP 1
33.CSS, JavaScript, VBScript, and JSP 2CSS, JavaScript, VBScript, and JSP 2
34.Advanced Dynamic Web Content Generation. 1Advanced Dynamic Web Content Generation. 1
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.