Automatically set application context in IntelliJ Idea

社会主义新天地 提交于 2019-12-25 06:08:08

问题


I've been developing web applications in Eclipse and recently decided to give a shot to IntelliJ Idea. My webserver has about 15 artifacts and in Eclipse they were automatically assigned application context based on their names. Now in Idea it defaults them all to "/" which is obviously incorrect. Can I somehow set it to automatically define application context based on artifact name or do I have to enter them all manually? Sorry if that's a newbie question, I tried googling it and searching inside various settings for Idea but couldn't find the answer.


回答1:


This depends on the web server you're using. For Tomcat, you have to either manually set the context path of the deployed artifacts (in Deployment tab of Tomcat Server) or configure your web server's specific settings, like server.xml for Tomcat (see an example here)

For other servers, like JBoss for example, each artifact is deployed with web context named as the artifact itself.



来源:https://stackoverflow.com/questions/32777131/automatically-set-application-context-in-intellij-idea

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!