Liny_@NotePad

沉迷ACG中

MyEclipse 修改项目部署路径

YOYO posted @ 2012年5月15日 16:45 in 【工具/OS】 with tags MyEclipse Tomcat , 12471 阅读

就Tomcat来说,MyEclipse默认是使用安装目录下的webapps目录作为部署路径,

因为不想将软体和工作区间混在一起,因此想将它的部署路径改掉。

百度得解,笔记下。

MyEclipse配置

选择Servers按钮旁边的Deploy按钮,弹出Manage Deployments窗体。

在Project块中选择要部署的项目,

在Deployment块中单击Add按钮,Server选择Custom Location,就可以自定义Deploy Location了。

配置好后,在Servers面板会出现一个新的<Custom Location>项,打开来可以看到我们部署的项目。

右键“Run Configurations”菜单,便可选定Server进行配置,这里可以自定义Server的名字,勾选上"add as server"的选框,之后在Servers面板便能对这个自定义Server进行管理(Run/Debug/..)。

这边只是修改掉部署路径,但是在服务器端还需要配置新的webApp目录。

Tomcat配置

在tomcat这边,可以配置新的Service、Host(虚拟主机)或是Context(应用目录),

Context好像只能管理单个应用的样子;Host则是需要设定不同的域名——需要在局域网内使用;因此配置了一个新的Service,并修改其中Host的appBase值为之前自定义的部署目录,

以通过不同端口访问这个目录下的应用:

 <Service name="myeclipse">
    <Connector port="8090" maxHttpHeaderSize="8192" maxThreads="150" minSpareThreads="25" maxSpareThreads="75" enableLookups="false" redirectPort="8453" acceptCount="100" connectionTimeout="20000" disableUploadTimeout="true" />
    <Connector port="8019" enableLookups="false" redirectPort="8453" protocol="AJP/1.3" />
    <Engine name="myeclipse" defaultHost="localhost">
        <Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase"/>
        <Host name="localhost" appBase="E:/Workspace/myeclipse" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false">
        </Host>
    </Engine>
 </Service>

要注意各个端口号都要改动,避免与默认的Service冲突。

若将默认webapps目录下的文件夾(ROOT、manager等)拷贝过去,便可以在web中观察该Service的状态了。

Uttarakhand Intermed 说:
2022年8月24日 21:14

Students taking the class 11 exams administered by the Uttarakhand Board may review the important model question paper from 2023 for better preparation. On the official website, you may obtain the 11th Important Model Question Paper for 2023 for the Science, Commerce, and Arts streams. However, the Board will shortly publish the condensed Important Model Question Paper 2023 for the upcoming academic year. Uttarakhand Intermediate Question Paper 2023 Students may verify the marking scheme and the Important Model Question Paper 2023 using this UK Board 11th Practice exam. The 11th Significant Model Question Paper from the Uttarakhand Board for 2023 also lists important themes for each subject, such as English, Economics, Geography, and Mathematics, unit by unit.


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter