Pradeep Kumar Mishra
Pradeep Kumar Mishra

Reputation: 10829

Running Standard spring mvc War file in Virgo Server

As per Virgo documentation we can deploy a standard war file without any change. But I am not finding it that way.I created a simple HelloWorld application in spring mvc using maven archetype provided. When I deploy the war helloworld.war on tomcat7 it is working absolutely fine. But when I deploy the same mvc in pickup directory of virgo tomcat server I am getting exception during bundle starting which is java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener.

So I am curious to know if there is anything need to be done before one deploy standard spring war on Virgo like creating a MANIFEST-INF folder parallel to WEB-INF folder and adding Manifest.mf file in it. If this is true that means I also need to import required bundles and packages. But then this means Documentation that one can deploy same war in standard tomcat and Virgo both without any change is not correct. Please advise.

few more data points. After I got this exception while starting bundle I added a manifest file myself having following details...

Manifest-Version: 1.0
Bundle-Version: 1.0.0
Tool: Bundlor 1.0.0.RELEASE
Bundle-ManifestVersion: 2
Import-Library: org.springframework.spring
Bundle-SymbolicName: abc

After this I am getting 404 for all requests without any exception.

Upvotes: 0

Views: 1157

Answers (1)

Illya Kysil
Illya Kysil

Reputation: 1756

You have to specify the value for Web-ContextPath manifest header in order for your bundle to be recognized as Web Application Bundle according to Virgo Documentation.

Upvotes: 1

Related Questions