14

In my IntelliJ web app, I have set the application context to myapp as shown below

enter image description here

When I set the Application context, it doesn't seem to have any effect. I was expecting the app to be deployed to myapp, or at least the generated context.xml file to set my app's context to myapp. Any thoughts on why this doesn't work (does it have something to do with the fact that this is an exploded war)?

7
  • Can't reproduce, works just fine with a brand new project created with a wizard and vanilla Tomcat 7 installation, when context is specified in Deployment the app is available at http://localhost:8080/myapp/ after running it from IDEA. Can you share a sample project that doesn't work properly? Please also specify your IDEA and Tomcat versions.
    – CrazyCoder
    Dec 11, 2012 at 2:28
  • Let me try to reproduce a sample one, sure. Dec 11, 2012 at 4:18
  • @CrazyCoder, did you set the output directory of the exploded war to be <tomcat-install>/webapps? Dec 11, 2012 at 4:19
  • No, IDEA deployment works differently.
    – CrazyCoder
    Dec 11, 2012 at 13:00
  • 1
    No need to close, you can accept the provided answer which may help other users having the same problem.
    – CrazyCoder
    Dec 11, 2012 at 23:49

1 Answer 1

11

Overriding CATALINA_BASE in Tomcat startup script may break IDEA deployment as it works by supplying custom CATALINA_BASE location where the modified configuration is placed so that Tomcat loads artifacts directly from the location specified as the artifact output directory.

See the related question:

1
  • This should be printed in GIANT BLINKING LETTERS in IDEA's 'edit configuration' dialog box. Total misery can lead from what seems like a rational decision to pass along CATALINA_BASE as environment variable.
    – Hal50000
    Aug 19, 2014 at 17:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.