请给出一个JSTL的helloWorld的最简单例子

2021-07-15 18:00:02 浏览数 (1)

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.csdn.net/qq_44594371/article/details/103183681

jsp

0 人点赞