在server.xml中加入一行:
<Context path="/exercise" reloadable="true" docBase="D:\tools\eclipse\workspace\exercise" workDir="D:\tools\eclipse\workspace\exercise\work\org\apache\jsp" />上面具体内容根据自己需要更改

解决方案 »

  1.   

    同情你,我刚刚从这个坑里爬出来。
    如果你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>
      

  2.   

    怎么和我陪的不同呢?
    server.xml
    在那?
      

  3.   

    server.xml和web.xml,我也没弄明白。
    应该在你自己的web-inf目录下面,加上我给你的web.xml,就可以用jsp了。