在server.xml中加入一行:
<Context path="/exercise" reloadable="true" docBase="D:\tools\eclipse\workspace\exercise" workDir="D:\tools\eclipse\workspace\exercise\work\org\apache\jsp" />上面具体内容根据自己需要更改
<Context path="/exercise" reloadable="true" docBase="D:\tools\eclipse\workspace\exercise" workDir="D:\tools\eclipse\workspace\exercise\work\org\apache\jsp" />上面具体内容根据自己需要更改
如果你Examples的例子能运行,那就应该是你的web-inf目录里的web.xml文件有问题。
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>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list></web-app>
server.xml
在那?
应该在你自己的web-inf目录下面,加上我给你的web.xml,就可以用jsp了。