Aswini
Aswini

Reputation: 31

Web application not found src/main/webapp

I am currently using intellij for my java code. When i try to run the Project, it throws the below error.

2016-06-21 09:19:46.691::INFO:  jetty-6.1.14
2016-06-21 09:19:46.843::WARN:  Web application not found src/main/webapp
2016-06-21 09:19:46.843::WARN:  Failed startup of context org.mortbay.jetty.webapp.WebAppContext@359d136a{/admin,src/main/webapp}
java.io.FileNotFoundException: src/main/webapp

Upvotes: 3

Views: 3149

Answers (2)

Luis Candelario
Luis Candelario

Reputation: 27

In RUN >> Edit Configurations, Working directory $MODULE_WORKING_DIR$

Example

Upvotes: 3

vegaasen
vegaasen

Reputation: 1032

Did you add the folder "webapp" to your classpath/resources-folder?

I guess you have something like:

applicationContext.setBaseResource(Resource.newClassPathResource("webapp", true, true));

In your WebAppContext-configuration - so, just add a folder named "webapp" under "src/main/resources/." and I guess it should be working as intended.

Upvotes: 0

Related Questions