0
votes

I need to debug a web application under Tomcat 6 and Intellij Idea 12.1.4 Ultimate.

When I try to deploy my web app as an exploded WAR file, I get following exception:

java.lang.NoClassDefFoundError: ru/mycompany/MyClass

I looked into the directory with the exploded WAR (File -> Project structure -> Artifacts -> MyApp exploded -> Output directory equal to C:\dev\myapp\exploded) and found MyClass.class file in the C:\dev\myapp\exploded\ru\mycompany directory.

Since I'm getting the aforementioned error, this location is wrong.

Where should the MyClass.class be located inside the exploded WAR directory in order for Tomcat 6 to find it?

1
You can usually find class files within a WAR file in: /WEB-INF/classeshagbard
@hagbard I modified my project so that the class files are put into WEB-INF/classes directory, but it didn't help.Dmitrii Pisarenko

1 Answers

0
votes

IntelliJ Idea automatically puts the element at the correct position in the tree, if you double click it in the Available Elements pane in the Project structure dialog.