[英]What is the difference between <% and <%i in JSP?
Sometimes I see codes come with "i", and sometimes without it. 有时我看到代码带有“ i”,有时没有。 What is the difference between
<% %>
and <%i %>
? <% %>
和<%i %>
什么区别?
Looks like there is no such char sequence in JSR-000245 JavaServerTM Pages 2.3 Maintenance Release 2 for Evaluation 看起来JSR-000245 JavaServerTM Pages 2.3 Maintenance Release 2中没有这样的char序列,用于评估
Only: Directive elements have a syntax of the form <%@ directive...%> . 仅:指令元素的语法形式为<%@指令...%>。
There are three language-based types of scripting elements: declarations, scriptlets, and expressions. 脚本元素有三种基于语言的类型:声明,scriptlet和表达式。 Declarations follow the syntax <%!
声明遵循语法<%! ... %>.
...%>。 Script- lets follow the syntax <% ... %> .
脚本-遵循语法<%...%>。 Expressions follow the syntax <%= ... %> .
表达式遵循语法<%= ...%>。
Maybe you saw " ! " not " i " character? 也许您看到的是“ ! ”字符而不是“ i ”字符?
Where did you saw it? 你在哪里看到的?
I think you mean <%! 我想你的意思是<%! instead of <%i ?
代替<%i吗?
<%! <%! %> is a JSP declaration and is used to declare variables and methods.
%>是JSP声明,用于声明变量和方法。
A link that might help: http://docs.oracle.com/javaee/5/tutorial/doc/bnaos.html 可能有用的链接: http : //docs.oracle.com/javaee/5/tutorial/doc/bnaos.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.