". Specified information can also be output anywhere on the page."> What does the syntax of expressions in jsp begin with?-javaTutorial-php.cn
Home> Java> javaTutorial> body text

What does the syntax of expressions in jsp begin with?

(*-*)浩
Release: 2020-09-19 11:14:17
Original
3915 people have browsed it

JSP expression is used to output information to the page. Its syntax format is as follows:

What does the syntax of expressions in jsp begin with?

##<%= Expression%>,Starts with "<%=" and ends with "%>"

Parameter description:

Expression: It can be a complete expression of any Java voice. The final result of the expression will be converted to a string.

Here are some simple examples:

<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>     测试JSP表达式的使用 
<% String manager = "小李"; %> 管理员:<%=manager%> <%="管理员:" + manager%> <%=1 + 2%> <% int x = 10; out.println(x); %> <% String url = "test.png"; %>
<%=new Date()%> <% for (int i = 0; i < 5; i++) { %>

http://blog.csdn.net/u010142437

<% } %>
Copy after login
Related learning recommendations:

java basic tutorial

The above is the detailed content of What does the syntax of expressions in jsp begin with?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
jsp
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!