0

Ofbiz newbie here.

What is the best way to deploy an existing spring-mvc based web application (runs under tomcat) under Ofbiz?

What I have tried so far (without luck) -

  • Create hotdeploy/myapp/ofbiz-component.xml

  • Expand the .war file into hotdeploy/myapp/webapp/myapp (such that web-inf is under hotdeploy/myapp/webapp/myapp)

ofbiz-component.xml contents -

<ofbiz-component name="cms"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";

xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/ofbiz-component.xsd";>

<resource-loader name="main" type="component" />
<webapp name="myapp"
        title="myapp"
        server="default-server"
        location="webapp/myapp"
        mount-point="/myapp"/>

</ofbiz-component>

I also tried create-component route as described here (based on some other SO answer) but that introduced Ofbiz controllers, etc (that i don't yet understand) and prevents the spring-mvc dispatcher servlet from working as expected.

Amol Katdare
  • 6,740
  • 2
  • 33
  • 36

2 Answers2

1

See if there were errors loading this ofbiz-component.xml file. I see a couple of extraneous semicolons (lines 2 and 4 the way it is formatted here). Also the name attribute should be "myapp", but "cms" may be unique and if so should work.

Also make sure it is in "hot-deploy" and not "hotdeploy".

Yes, no point using the create-component ant target, it creates a bunch of stuff you won't want for this scenario.

David E. Jones
  • 1,721
  • 1
  • 9
  • 8
1

This depends on the version of ofbiz you are using.

With the latest release they stopped supporting to deploy as external server

Bhargav Rao
  • 50,140
  • 28
  • 121
  • 140