我的jsp环境已经配好且能正常运行,但是现在我想对d:\myjsp 目录文件的访问

howie530_88 2003-11-26 04:58:27
上次我从这上得到的正确edit方法,但是我的机子已经重新做系统了。我们的csdn forum更新太快了。请那位大哥在帮我一下。现在我搜索也搜不了了
...全文
56 14 打赏 收藏 转发到动态 举报
写回复
用AI写文章
14 条回复
切换为时间正序
请发表友善的回复…
发表回复
howie530_88 2003-11-27
  • 打赏
  • 举报
回复
我马上要揭帖了。请你们尽快我我得server.xml改一下。谢谢
howie530_88 2003-11-27
  • 打赏
  • 举报
回复
我记得上次按照他们说得做了一下,然后就好了。这次不知是怎搞的。我这人太笨了
howie530_88 2003-11-27
  • 打赏
  • 举报
回复

下面就是我得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>
cricketlj 2003-11-27
  • 打赏
  • 举报
回复
改tomcat下\conf\server.xml
面的

<Context path="/myjsp " docBase="d:/myjsp " debug="0" reloadable="true">
</Context>

不是加,是改tomcat默认是
<Context path="" docBase="ROOT" debug="0">
要是加的话要把你连接数据库的部分也要加上
xinshou1979330 2003-11-27
  • 打赏
  • 举报
回复
加到最底下

它自身有个Context
放到它下面就可以
howie530_88 2003-11-27
  • 打赏
  • 举报
回复
改tomcat下\conf\server.xml
面的

<Context path="/myjsp " docBase="d:/myjsp " debug="0" reloadable="true">
</Context>

这个应该具体加到sever.xml的那一行。谢谢
xinshou1979330 2003-11-27
  • 打赏
  • 举报
回复

改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

你这样访问一下吧
howie530_88 2003-11-27
  • 打赏
  • 举报
回复
我按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
Azraelfan 2003-11-27
  • 打赏
  • 举报
回复
最好的方式就是在tomcat的管理界面加啦
renjx 2003-11-27
  • 打赏
  • 举报
回复
改tomcat下\conf\server.xml
面的
<Context path="" docBase="d:\myjsp"
debug="0" privileged="true"/>
foolfish 2003-11-27
  • 打赏
  • 举报
回复
按我说的方法在tomcat管理界面加吧
howie530_88 2003-11-27
  • 打赏
  • 举报
回复
请问大哥是不是在</host> </service>下加了该语句就行了。但是我加了后还是不行。请你在加一点note,thanks
foolfish 2003-11-26
  • 打赏
  • 举报
回复
最简单的

http://localhost:8080/admin

进管理界面,然后再localhost下新加一个content就是了
其实就是图形界面修改,和上面的效果是一样的.
xqi8 2003-11-26
  • 打赏
  • 举报
回复
这个是tomcat


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

81,091

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧