这个是tomcat
server.xml
里加
  <Context  path="/myjsp"  docBase="d:\myjsp"    
                 debug="0"  privileged="true"/>

解决方案 »

  1.   

    最简单的

    http://localhost:8080/admin进管理界面,然后再localhost下新加一个content就是了
    其实就是图形界面修改,和上面的效果是一样的.
      

  2.   

    请问大哥是不是在</host>      </service>下加了该语句就行了。但是我加了后还是不行。请你在加一点note,thanks
      

  3.   

    按我说的方法在tomcat管理界面加吧
      

  4.   

    改tomcat下\conf\server.xml
    面的
      <Context  path=""  docBase="d:\myjsp"    
                     debug="0"  privileged="true"/>
      

  5.   

    最好的方式就是在tomcat的管理界面加啦
      

  6.   

    我按tomcat的管理界面加,但是加不上。http://localhost:8080/manager/html/install
    Install directory or WAR file located on server 
    Context Path (optional):    
    XML Configuration file URL:    
    WAR or Directory URL:    
         
     
    请问这三项正确应该怎样填,假设我想加jsp文件目录为d:\myjsp,我得jswdk目录为d:\jswdk
      

  7.   


    改tomcat下\conf\server.xml
    面的
      
    <Context path="/myjsp " docBase="d:/myjsp " debug="0" reloadable="true">
    </Context>这里的path 指的是你在地址栏需要打的地址  而docBase是你的跟目录
    如果 你想写  http://localhost:8080/manager/html/install这个地址
    那么就是
    <Context path="/manager" docBase="d:/myjsp " debug="0" reloadable="true">
    </Context>
    这样写了 而你地址中的html是在你 myjsp里的一个包 install 是你的JSP文件 http://localhost:8080/manager/html/install.jsp你这样访问一下吧
      

  8.   

    改tomcat下\conf\server.xml
    面的
      
    <Context path="/myjsp " docBase="d:/myjsp " debug="0" reloadable="true">
    </Context>这个应该具体加到sever.xml的那一行。谢谢
      

  9.   

    加到最底下它自身有个Context 
    放到它下面就可以
      

  10.   

    改tomcat下\conf\server.xml
    面的
      
    <Context path="/myjsp " docBase="d:/myjsp " debug="0" reloadable="true">
    </Context>不是加,是改tomcat默认是
    <Context path="" docBase="ROOT" debug="0">
    要是加的话要把你连接数据库的部分也要加上
      

  11.   


    下面就是我得server.xml文件。请问他到底应该放到那儿?谢谢
    <?xml version="1.0"?>
    <Server port="8005" shutdown="SHUTDOWN" debug="0">  <!-- Enable JMX MBeans Support -->
      <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener"
                debug="0"/>
      <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"
                debug="0"/>  <!-- Global JNDI resources -->
      <GlobalNamingResources>    <!-- Test entry for demonstration purposes -->
        <Environment name="simpleValue" type="java.lang.Integer" value="30"/>    <Environment name="jwsdp.home"
           description="Absolute Pathname of the JWSDP Installation"
                  type="java.lang.String"
                 value="d:\jswdk"/>    <!-- Editable user database that can also be used by
             UserDatabaseRealm to authenticate users -->
        <Resource name="UserDatabase" auth="Container"
                  type="org.apache.catalina.UserDatabase"
           description="User database that can be updated and saved">
        </Resource>
        <ResourceParams name="UserDatabase">
          <parameter>
            <name>factory</name>
            <value>org.apache.catalina.users.MemoryUserDatabaseFactory</value>
          </parameter>
          <parameter>
            <name>pathname</name>
            <value>conf/tomcat-users.xml</value>
          </parameter>
        </ResourceParams>    <!-- Users and Groups Database -->  </GlobalNamingResources>  <Service name="Java Web Services Developer Pack">    <!-- Define a non-SSL Coyote HTTP/1.1 Connector on port 8080 -->
        <Connector className="org.apache.coyote.tomcat5.CoyoteConnector"
                   port="8080" minProcessors="5" maxProcessors="100"
                   enableLookups="true" redirectPort="8443" acceptCount="100"
                   debug="0" connectionTimeout="20000" 
                   disableUploadTimeout="true" />    <!--
             By default, an SSL HTTP/1.1 Connector is not enabled. You can
             enable an SSL HTTP/1.1 Connector on port 8443 by following the
             steps below and uncommenting the Connector that follows these
             steps. SSL support requires the following steps (see the SSL Config
             HOWTO in the Tomcat 4.0 documentation bundle for more detailed
             instructions):         * Execute the following command:
                 %JAVA_HOME%\bin\keytool -genkey -alias tomcat -keyalg RSA (Windows)
                 $JAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg RSA  (Unix)
               with a password value of "changeit" for both the certificate and
               the keystore itself.
        -->
        <!-- Define a SSL Coyote HTTP/1.1 Connector on port 8443 -->
        <!--
        <Connector className="org.apache.coyote.tomcat5.CoyoteConnector"
                   port="8443" minProcessors="5" maxProcessors="75"
                   enableLookups="true" disableUploadTimeout="true"
           acceptCount="100" debug="0" scheme="https" secure="true">
          <Factory className="org.apache.coyote.tomcat5.CoyoteServerSocketFactory"
                   clientAuth="false" protocol="TLS" />
        </Connector>
        -->    <!-- Define the top level container in our container hierarchy -->
        <Engine name="Catalina" defaultHost="localhost" debug="0">      <!-- Pack-Wide Access Logger -->
          <Valve   className="org.apache.catalina.valves.AccessLogValve"
                   directory="logs" prefix="access_log." suffix=".txt"
                   resolveHosts="false"/>      <!-- Pack-Wide Message Logger -->
          <Logger  className="org.apache.catalina.logger.FileLogger"
                   directory="logs" timestamp="true"
                   prefix="jwsdp_log." suffix=".txt"/>      <!-- Pack-Wide Realm -->
          <Realm   className="org.apache.catalina.realm.UserDatabaseRealm"
                resourceName="UserDatabase"
                       debug="0"/>      <!-- Define the default virtual host -->
          <Host name="localhost" debug="0" appBase="webapps"
           unpackWARs="false" autoDeploy="true">
                   </Host>
              <Context path="/myjsp " docBase="d:/myjsp" debug="0" reloadable="true">
               </Context>
              </Engine>  </Service>  <!--
      <Service name="InternalServices">
      -->    <!-- Define a non-SSL Coyote HTTP/1.1 Connector on port 8081 -->
        <!--
        <Connector className="org.apache.coyote.tomcat5.CoyoteConnector"
                   port="8081" minProcessors="5" maxProcessors="100"
                   enableLookups="true" redirectPort="8443" acceptCount="100"
                   debug="0" connectionTimeout="20000" 
                   disableUploadTimeout="true" />
        -->    <!-- Define the top level container in our container hierarchy -->
        <!--
        <Engine name="ServicesEngine" defaultHost="jwsdp-services" debug="0">
        -->      <!-- Pack-Wide Message Logger -->
        <!--
          <Logger  className="org.apache.catalina.logger.FileLogger"
                   directory="logs" timestamp="true"
                   prefix="services_log." suffix=".txt"/>
        -->      <!-- Pack-Wide Realm -->
        <!--
          <Realm   className="org.apache.catalina.realm.UserDatabaseRealm"
                resourceName="UserDatabase"
                       debug="0"/>    -->
          <!-- Define the default virtual host -->
        <!--
          <Host name="jwsdp-services" debug="0" appBase="jaxm-1.1.1/services"
           unpackWARs="false" autoDeploy="true">      </Host> 
          
        </Engine>
          </Service>
        --></Server>
      

  12.   

    我马上要揭帖了。请你们尽快我我得server.xml改一下。谢谢