Anil Bhaskar
Anil Bhaskar

Reputation: 3978

Trying to make a spring application to web mvc

I had a working spring jdbc project in eclipse. I am trying to make it mvc, so I have added web.xml and other spring mvc configuration files, including web-mvc dependency in pom.xml.

My project structure looks like this: enter image description here

I am having trouble is: I am not getting option to run it on server. I have tried added tomcat in run configuration, but is giving

java.lang.ClassNotFoundException: org.apache.catalina.startup.Catalina
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.apache.catalina.startup.Bootstrap.init(Bootstrap.java:265)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:455)

Could someone please help, what am I missing here?

Upvotes: 0

Views: 80

Answers (1)

Vincent
Vincent

Reputation: 151

Go to project properties -> project facets,

check whether the Dyanamic Web module is enabled. When we are creating a web project, this is enabled by our IDE. Check whether it helps

ProjectFacets

Now Check whether your deployment assembly points the correct webapps folder which contains the web.xml

deployment assembly

Upvotes: 1

Related Questions