jsp基础问题!!
请各位帮忙解决
!
环境变两配置:
JAVA_HOME=G:\Program Files\jdk1.5.0_04
CARALINE_HOME=G:\Program Files\Tomcat 5.0
CATALINE_BASE=G:\Program Files\Tomcat 5.0
classpath=.,G:\Program Files\jdk1.5.0_04\lib\dt.jar;
G:\Program Files\jdk1.5.0_04\lib\tools.jar;
G:\Program Files\Tomcat 5.0\common\lib\servlet-api.jar
Path=G:\Program Files\jdk1.5.0_04\bin
myapp/WEB-INF/Web.xml 编码
<?xml version= "1.0 " encoding= "ISO-8859-1 "?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN "
"http://java.sun.com/dtd/web-app_2_3.dtd ">
<web-app>
<display-name> My Web Application </display-name>
<description>
Application for test
</description>
<servlet>
<servlet-name> org.apache.jsp.index_jsp </servlet-name>
<servlet-class> org.apache.jsp.index_jsp </servlet-class>
</servlet>
<servlet-mapping>
<servlet-name> org.apache.jsp.index_jsp </servlet-name>
<url-pattern> /index.jsp </url-pattern>
</servlet-mapping>
</web-app>
myapp/index.jsp编码:
<!doctype html public "-//w3c//dtd html 4.0 transitional//en " "http://www.w3.org/TR/REC-html40/strict.dtd ">
<%@ page session= "false " %>
<html> <body> <center>
Now time is: <%=new java.util.Date()%>
</center> </body> </html>
浏览器输入http://laocalhost:8080/myapp/index/jsp 后错误提示信息:
HTTP Status 404 - /myapp/index.jsp
--------------------------------------------
type Status report
message /myapp/index.jsp
description The requested resource (/myapp/index.jsp) is not available.
--------------------------------------------
Apache Tomcat/5.0.28
请问这是那里的问题
------解决方案--------------------搞的这么复杂干什么
<web-app>
<display-name> My Web Application </display-name>
<description>
Application for test
</description>
</web-app>
------解决方案--------------------什么垃圾东西,怎么不能发新帖?
------解决方案-------------------- <url-pattern> /index.jsp </url-pattern>
写成 index.jsp即可。
------解决方案--------------------