欢迎来到Doc100.Net免费学习资源知识分享平台!
您的位置:首页 > 程序异常 >

请问jsp文件page指令报错的有关问题

更新时间: 2014-05-18 12:45:55 责任编辑: Author_N8

 

请教jsp文件page指令报错的问题
我写的一个jsp文件的前面的page指令是:
  
<% @ page language="java" errorPage="error.jsp" contentType="text/html ;charset=gbk"%>


但是浏览器针对这一行报了这么多错:

An error occurred at line: 1 in the jsp file: /Divide.jsp
Syntax error on token "language", VariableDeclaratorId expected after this token
1: <% @ page language="java" errorPage="error.jsp" contentType="text/html ;charset=gbk"%>
2: <html><title>Divide</title>
3: <body>
4: <%


An error occurred at line: 1 in the jsp file: /Divide.jsp
language cannot be resolved to a type
1: <% @ page language="java" errorPage="error.jsp" contentType="text/html ;charset=gbk"%>
2: <html><title>Divide</title>
3: <body>
4: <%


An error occurred at line: 1 in the jsp file: /Divide.jsp
Syntax error, insert ";" to complete LocalVariableDeclarationStatement
1: <% @ page language="java" errorPage="error.jsp" contentType="text/html ;charset=gbk"%>
2: <html><title>Divide</title>
3: <body>
4: <%


An error occurred at line: 1 in the jsp file: /Divide.jsp
errorPage cannot be resolved
1: <% @ page language="java" errorPage="error.jsp" contentType="text/html ;charset=gbk"%>
2: <html><title>Divide</title>
3: <body>
4: <%


An error occurred at line: 1 in the jsp file: /Divide.jsp
Syntax error, insert ";" to complete Statement
1: <% @ page language="java" errorPage="error.jsp" contentType="text/html ;charset=gbk"%>
2: <html><title>Divide</title>
3: <body>
4: <%


An error occurred at line: 1 in the jsp file: /Divide.jsp
contentType cannot be resolved
1: <% @ page language="java" errorPage="error.jsp" contentType="text/html ;charset=gbk"%>
2: <html><title>Divide</title>
3: <body>
4: <%


An error occurred at line: 1 in the jsp file: /Divide.jsp
Syntax error, insert ";" to complete Statement
1: <% @ page language="java" errorPage="error.jsp" contentType="text/html ;charset=gbk"%>
2: <html><title>Divide</title>
3: <body>
4: <%



我算是彻底崩溃了,似乎浏览器根本就不认识 @ page 标志,哪位大哥也遇到过此类情形,求指教。



--参考方法--
%@ 之间空格去掉
上一篇:上一篇
下一篇:下一篇

 

随机推荐程序问答结果

 

 

如对文章有任何疑问请提交到问题反馈,或者您对内容不满意,请您反馈给我们DOC100.NET论坛发贴求解。
DOC100.NET资源网,机器学习分类整理更新日期::2014-05-18 12:45:55
如需转载,请注明文章出处和来源网址:http://www.doc100.net/bugs/t/906878/
本文WWW.DOC100.NET DOC100.NET版权所有。