我有两个文件。choose.jsp
和little.jspf
选择.jsp
<c:import url="little.jspf">
<c:param name="his" value="${param.choice}"></c:param>
</c:import>
little.jspf
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<br />
this is little.jsp <br />
I just heard that somebody here said ${param.his} is important.
输出
输出是I just heard that somebody here said ${param.his} is important.
但是,当我将.jspf更改为.jsp时,它可以正常编译。无法将参数传递给.jspf文件吗?
应该将一个.jspf文件静态地(包含该<%@include %>
指令)包含在另一个JSP中。没有动态包含或导入。
我会创建一个JSP标记文件,而不是使用c:import
。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句