1)helloWorld:
注 意当做下面的项目时,需要导入两个包:jstl.jar和standard.jar。其它的就是单个单个的jsp了,比较简单。
例 2.2.1
hello.jsp:
<%@ page contentType="text/html; charset=GBK" %>
<!--why here is http://java.sun.com/jsp/jstl/core,because lib/standard.jar/c.tld has a statement,
<uri>http://java.sun.com/jsp/jstl/core</uri>, you change there, then here you can also change.
I tried before. in internal tomcat you can not cahnge, but in the external tomcat,
you can change the content of c.tld.
-->
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ page import="java.util.*"%>
<html>
<body>
<c:out value="你好,马克-to-win!"/><br>
</body>
</html>
更多请看:https://blog.youkuaiyun.com/qq_44594371/article/details/103183681
本文详细介绍了在JSP中使用JSTL进行页面元素输出的方法,包括必要的jar包导入及示例代码展示,如helloWorld示例,通过<c:out>标签输出中文字符。
163

被折叠的 条评论
为什么被折叠?



