求助:linux下jsp页面无法显示?
用的是fedora7的系统,tomcat5,java,mysql5等都是系统自动安装,jsp代码在windows下运行是正确的,在linux下报错
org.apache.jasper.JasperException: Unable to compile class for JSP:
error occurred at line: 1 in the jsp file: 文件名.jsp
The method write(String) is undefined for the type JspWriter
1: <%@ page contentType= "text/html; charset=UTF-8 " language= "java " import= "java.sql.* " import= "java.io.Writer.write "
errorPage= " " %>
2: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN " "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
这是为什么呀?
------解决方案--------------------tomcat启动了吗,能访问吗?在浏览器中输入http://localhost:8080看能不能访问
------解决方案-------------------- <%@ page contentType= "text/html; charset=UTF-8 " language= "java " import= "java.sql.* " import= "java.io.* " errorPage= " " %>
试试
------解决方案--------------------看字面意思是缺少对write方法的定义吧。
是不是这个包有问题?
java.io.Writer.write
------解决方案--------------------jdk路径设置不正确?先测试一下?
------解决方案--------------------是不是安装了,但没设置环境变量啊?
------解决方案--------------------设置一下JAVA_HOME,你去查一下,jdk在linux下的环境变量设置吧。
我的异常网推荐解决方案:org.apache.jasper.JasperException: Unable to compile class,http://www.aiyiweb.com/j2ee/2308.html