test1代码<%@ page contentType="text/html;charset=gb2312"%>
<html>
<head>
<title>使用include
</title></head>
<body>
<center><font size=10 color=red>IT在中国</font>
<br>
<%@ include file="C:/tomcat 6.0/webapps/JSP/test2.jsp"%>
<br>
<font size=10 color=blue>IT在中国</font>
</center>
</body>
</html>
test2代码
<%@page contentType="text/html;charset=gb2312"%>
<html>
<head><title>网站导航连接</title>
</head>
<body>
<li><a href="http://www.itzcn.com" target="_blank" title="IT社区">IT在中国</a></li>
<li><a href="http://www.itzcn.com/bbs" target="_blank" title="论坛">IT论坛</a></li>
<li><a href="http://www.itying.net" target="blank" tittle="技术">IT技术营</a></li></body></html>两个文件代码都存放在tomcat6.0/JSP文件下。编译test1时总出现错误"File "/C:/tomcat 6.0/webapps/JSP/test2.jsp" not found“或者"org.apache.jasper.JasperException: Unable to load class for JSP”我感觉是file="C:/tomcat 6.0/webapps/JSP/test2.jsp"这里写的文件路径方式错误,但也不能编译。希望大家帮帮忙。谢谢!
<html>
<head>
<title>使用include
</title></head>
<body>
<center><font size=10 color=red>IT在中国</font>
<br>
<%@ include file="C:/tomcat 6.0/webapps/JSP/test2.jsp"%>
<br>
<font size=10 color=blue>IT在中国</font>
</center>
</body>
</html>
test2代码
<%@page contentType="text/html;charset=gb2312"%>
<html>
<head><title>网站导航连接</title>
</head>
<body>
<li><a href="http://www.itzcn.com" target="_blank" title="IT社区">IT在中国</a></li>
<li><a href="http://www.itzcn.com/bbs" target="_blank" title="论坛">IT论坛</a></li>
<li><a href="http://www.itying.net" target="blank" tittle="技术">IT技术营</a></li></body></html>两个文件代码都存放在tomcat6.0/JSP文件下。编译test1时总出现错误"File "/C:/tomcat 6.0/webapps/JSP/test2.jsp" not found“或者"org.apache.jasper.JasperException: Unable to load class for JSP”我感觉是file="C:/tomcat 6.0/webapps/JSP/test2.jsp"这里写的文件路径方式错误,但也不能编译。希望大家帮帮忙。谢谢!
解决方案 »
- "||"这个符号在js中是什么意思啊?
- struts2使用token的时候无法获取参数
- 崩溃了,这个错误遇到数次,再也没有办法继续项目了,谢谢前辈指教!
- Tomcat问题:Document base does not exist or is not a readable directory
- XP能装mysql吗?
- 一个菜鸟的问题,大家帮帮我!!!!!!!!!!
- 【求助】spring MVC 返回元页面和exception处理
- 你相信java编译器对于循环的编译优化吗?
- 我用jsp+java+mysql写了一个bbs程序,不知道大家喜欢吗?如果喜欢的话,我愿意奉献所有代码!!
- 请问如何用jsp 在ie中打开office文档?
- 入门异常未解决!java.lang.NullPointerException!Struts+Hibernate
- (b/s架构)家谱树结构的数据库数据读取问题
这样是不对的,可以写路径,但是不能写这个,可以写 项目名/test2.jsp
滑触线
学韩语
翻译公司
法语学习
拓展训练
德语
西班牙语
变压器
生产线
节能灯
席梦思
焊管
无缝管
流水线
水泵
水泵
显微镜
干燥设备
电子警察
机票查询
gps
水泵
塑料粉碎机
注册香港公司
香港公司注册
注册香港公司
香港公司注册
注册公司
公司注册
焊机
电焊机
影视广告公司
影视制作公司
企业宣传片
企业宣传片制作
粉碎机
磁力泵
排污泵
油泵
自吸泵
消防泵
塑料泵
柴油发电机
柴油发电机组
柴油发电机组