Error deploying webapp: "Neither exploded directory nor jar file are configured..."

I've just spent a couple of hours experimenting with this, and I can't find a way to get it to work. When I try to start a Tomcat session, IDEA pops up an error dialog saying "Neither exploded directory nor jar file are configured for the web module".

I shouldn't need either, as the module content is already set up in exploded dir format. I've tried making my source 'context root' (the directory containing WEB-INF in my source tree) the content root for the module; I've tried making a parent directory the content root and set the appropriate sub-directory as a Resource Directory mapped to '/' under Web Module Settings.

I've also tried setting the Web Module War File and Exploded Directory paths under J233 Build Settings (setting them each individually, or both together). IDEA can build me a duplicate exploded directory or WAR file where I tell it to, but still tells me neither option is set when I try to launch Tomcat.

I've tried everything I can think of, up down and sideways, and just can't for the life of me figure out what's going on.

Here's my project structure (in summary):

base
+ lib --libs needed to compile/test
+ src
+ java --main application src files
+ resources --additional resources
+ tests --Java src for unit tests
+ webapp
+ images --static content,
+ jsps --jsp files, etc
+ WEB-INF
+ lib --runtime libs
+ web.xml --deployment descriptor



I would expect to be able to create a Web module in 'webapp' and have it 'just work', without any exploded directories or WAR files configured. I certainly expect it to work if I do configure either of those.

So, what on earth am I doing wrong here??

Thanks for any help!

L.

4 comments

I vaguely remember this. I can't remember what to do exactly, but
follow these steps and you should be good to go.

Close IntelliJ. Delete the caches (e.g.
.IntelliJIdea50/system/caches compiler and any tomcat or jasper
directories you see)
Open IntelliJ. Open your run settings. Set it to display settings
before running/debugging (lower left corner).

Try to run it and see what happens.



Laurie Harper wrote:

I've just spent a couple of hours experimenting with this, and I can't find a way to get it to work. When I try to start a Tomcat session, IDEA pops up an error dialog saying "Neither exploded directory nor jar file are configured for the web module".

>

I shouldn't need either, as the module content is already set up in exploded dir format. I've tried making my source 'context root' (the directory containing WEB-INF in my source tree) the content root for the module; I've tried making a parent directory the content root and set the appropriate sub-directory as a Resource Directory mapped to '/' under Web Module Settings.

>

I've also tried setting the Web Module War File and Exploded Directory paths under J233 Build Settings (setting them each individually, or both together). IDEA can build me a duplicate exploded directory or WAR file where I tell it to, but still tells me neither option is set when I try to launch Tomcat.

>

I've tried everything I can think of, up down and sideways, and just can't for the life of me figure out what's going on.

>

Here's my project structure (in summary):

>

base
+ lib --libs needed to compile/test
+ src
+ java --main application src files
+ resources --additional resources
+ tests --Java src for unit tests
+ webapp
+ images --static content,
+ jsps --jsp files, etc
+ WEB-INF
+ lib --runtime libs
+ web.xml --deployment descriptor

>

>

I would expect to be able to create a Web module in 'webapp' and have it 'just work', without any exploded directories or WAR files configured. I certainly expect it to work if I do configure either of those.

>

So, what on earth am I doing wrong here??

>

Thanks for any help!

>

L.


0

Ignore my post. This is a different problem.

Laurie Harper wrote:

I've just spent a couple of hours experimenting with this, and I can't find a way to get it to work. When I try to start a Tomcat session, IDEA pops up an error dialog saying "Neither exploded directory nor jar file are configured for the web module".

>

I shouldn't need either, as the module content is already set up in exploded dir format. I've tried making my source 'context root' (the directory containing WEB-INF in my source tree) the content root for the module; I've tried making a parent directory the content root and set the appropriate sub-directory as a Resource Directory mapped to '/' under Web Module Settings.

>

I've also tried setting the Web Module War File and Exploded Directory paths under J233 Build Settings (setting them each individually, or both together). IDEA can build me a duplicate exploded directory or WAR file where I tell it to, but still tells me neither option is set when I try to launch Tomcat.

>

I've tried everything I can think of, up down and sideways, and just can't for the life of me figure out what's going on.

>

Here's my project structure (in summary):

>

base
+ lib --libs needed to compile/test
+ src
+ java --main application src files
+ resources --additional resources
+ tests --Java src for unit tests
+ webapp
+ images --static content,
+ jsps --jsp files, etc
+ WEB-INF
+ lib --runtime libs
+ web.xml --deployment descriptor

>

>

I would expect to be able to create a Web module in 'webapp' and have it 'just work', without any exploded directories or WAR files configured. I certainly expect it to work if I do configure either of those.

>

So, what on earth am I doing wrong here??

>

Thanks for any help!

>

L.

0

Thanks anyway though :) I did figure this out in the end. It turns out that, in addition to setting up an exploded directory or WAR file in the J2EE Build Settings, you also have to dig deeper into the configuration options for the Tomcat runtime. Burried in there is a section where you configure how the application is actually deployed. As part of that, you have to select whether you want to exploded directory or the WAR file to be deployed, even if you only have one of them configured.

A clear error message could have made this a totally painless experience. IDEA is a terrific product, so I hope this gets cleaned up for a future release.

0

Hi,

How did you figured it out?
I'm trying to deploy webapp without a exploded or .war

can you help me out..

0

Please sign in to leave a comment.