初学者在jsp 使用include出现的问题

fangbiwen 2015-11-04 08:27:58
以下是我include.jsp代码

<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<%@
include file="header.html";
%>
</body>
</html>
以下是我header.htm
<div>
this is header.
</div>
很简单的代码 ,在学include指令
出现报错The server encountered an internal error that prevented it from fulfilling this request.
该怎么解决谢谢哈

...全文
106 3 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
  • 打赏
  • 举报
回复
楼上都说的很对 案例:
<%@include file="/WEB-INF/jsp/zh/include/menu.jsp" %>
番茄鲨鱼面 2015-11-04
  • 打赏
  • 举报
回复
<%@ include file="header.html"; %> 这个include后面不需要分号吧?
rumlee 2015-11-04
  • 打赏
  • 举报
回复
header.html文件改成header.jsp

81,122

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧