这个是tomcat
server.xml
里加
<Context path="/myjsp" docBase="d:\myjsp"
debug="0" privileged="true"/>
server.xml
里加
<Context path="/myjsp" docBase="d:\myjsp"
debug="0" privileged="true"/>
解决方案 »
- 网上图书
- 帮忙推荐本 hibernate 的课外书! 谢谢了。
- MD5.encode 加密问题,请教!
- Struts+mysql + Tomcat 出现 503 错误
- org.gjt.mm.mysql.Driver和 com.mysql.jdbc.Driver有很么不区别?
- 各位大虾 遇到个 jboss 连sybase ASE 12 的问题.
- 发现用java写WEB产品的时候,在美工方面真的很麻烦.><
- 如何取得ResultSet的总记录条数
- activiti 工作流初始化失败了,错误信息在下边!
- 今天在配置redis的时候出现以下报错,找了好久都找不到神问题
- 如何做到只刷新页面的一部分
- 我用jsp做 了一个bbs,想要控制session和cookies的时间?
打
http://localhost:8080/admin进管理界面,然后再localhost下新加一个content就是了
其实就是图形界面修改,和上面的效果是一样的.
面的
<Context path="" docBase="d:\myjsp"
debug="0" privileged="true"/>
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
改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你这样访问一下吧
面的
<Context path="/myjsp " docBase="d:/myjsp " debug="0" reloadable="true">
</Context>这个应该具体加到sever.xml的那一行。谢谢
放到它下面就可以
面的
<Context path="/myjsp " docBase="d:/myjsp " debug="0" reloadable="true">
</Context>不是加,是改tomcat默认是
<Context path="" docBase="ROOT" debug="0">
要是加的话要把你连接数据库的部分也要加上
下面就是我得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>