Intellij IDEA多个项目部署tomcat设置session共享
程序员文章站
2024-03-25 14:27:04
...
Intellij IDEA多个项目部署tomcat设置session共享
1.tomcat中sever.xml配置
用Intellij IDEA开发Java代码过程中的配置,需要基于以上tomcat/conf/server.xml文件,因此在server.xml中的Host标签中写好Context配置,假定此时向tomcat中发布两个war包:skye_client.war 和 skye_cnmy.war如图所示
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true">
<!-- SingleSignOn valve, share authentication between web applications
Documentation at: /docs/config/valve.html -->
<!--
<Valve className="org.apache.catalina.authenticator.SingleSignOn" />
-->
<!-- Access log processes all example.
Documentation at: /docs/config/valve.html
Note: The pattern used is equivalent to using pattern="common" -->
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="localhost_access_log" suffix=".txt"
pattern="%h %l %u %t "%r" %s %b" />
<Context path="/skye_client" crossContext="true" docBase="./skye_client" debug="0" reloadable="true" />
<Context path="/cnmy" crossContext="true" docBase="./skye_cnmy" debug="0" reloadable="true" />
</Host>
2 修改发布路径
将Intellij IDEA编译后的工程发布到tomcat/webapps目录下,所以需要修改Intellij IDEA的Output directory属性。请打开Project Structure -> Aritifacts,操作界面如下
到此就结束了,亲测没有问题!
推荐阅读
-
Intellij IDEA多个项目部署tomcat设置session共享
-
IntelliJ IDEA 配置 Tomcat 7,部署,发布项目 博客分类: JavaEEapp ideatomcat配置部署发布
-
IntelliJ IDEA部署web项目,Tomcat没有出现Artifacts
-
【IDEA使用技巧】(5) —— IntelliJ IDEA集成Tomcat部署Maven Web项目
-
intellij idea 使用Tomcat部署的项目位置在哪
-
IntelliJ IDEA部署web项目,Tomcat没有出现Artifacts
-
【IDEA使用技巧】(5) —— IntelliJ IDEA集成Tomcat部署Maven Web项目
-
intellij idea 使用Tomcat部署的项目位置在哪