HTTP Status 404 - /Hello.jsp--------------------------------------------------------------------------------type Status reportmessage /Hello.jspdescription The requested resource (/Hello.jsp) is not available.
--------------------------------------------------------------------------------Apache Tomcat/5.0.16
以上是我安装配置完tomcat后运行一个测试程序Hello.jsp时出现的问题。程序正常应输出Hello.jsp
--------------------------------------------------------------------------------Apache Tomcat/5.0.16
以上是我安装配置完tomcat后运行一个测试程序Hello.jsp时出现的问题。程序正常应输出Hello.jsp
2、404很明显,就是你输入的url不正确,不能找到Hello.jsp,看看你的Hello.jsp再哪个路径下
(/TomJsp/Hello.jsp) is not available.
请问WEB-INF里的web.xml用改动些什么吗?默认的对吗?
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
version="2.4">
</web-app>
这个问题我前年就发现了。
<%@ page contentType="text/html; charset=GBK" %>
而不是
<%@ page contentType="text/html; charset=iso-8859-1" %>
请问Tomcat5.0.16如果不加Contex path的话,那么应该把编写好的jsp文件放在哪个文件夹下,是放在webapps/root下面吗?
http://127.0.0.1:8080/TomJsp/Jsp文件名.jsp最好不要把你的JSP文件放在ROOT下面,而你出现的错误404应该是找不到这个页面
HTTP Status 500 - --------------------------------------------------------------------------------type Exception reportmessage description The server encountered an internal error () that prevented it from fulfilling this request.exception org.apache.jasper.JasperException: Unable to compile class for JSPAn error occurred at line: -1 in the jsp file: nullGenerated servlet error:
[javac] Compiling 1 source file at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:85)
at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:248)
at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:315)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:328)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:427)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:142)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:240)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java
环境我配置了很多次-还是一样!
可能是5。0和JDK1.5的问题!
换5。5就没问题了
这个问题我也遇到过,不知道怎么解决?
org.apache.jasper.JasperException: Unable to compile class for JSP
这次的错误应该是你的jsp有问题了,把代码贴出来看看吧