0

I hava a situation.
I have one .war file say APP-1 which expose SOAP service for ex. getAccountTxn and I have another .war file say APP-2 which consume this web service.
Now I want to create one more .war file say APP-3 which expose REST webservice which can be consumed by any client. I want to deploy APP-2 & APP-3 on the same server (i.e. Apache Tomcat).
Now the question is
"How can I access getAcccountTxn from APP-3 and consider APP-2 doesn't expose any web API?" or
"How to call APP-2 from APP-3 without any web API?".

Replies are Appreciated.

pritesh
  • 82
  • 1
  • 7

1 Answers1

0

Set CATALINA_BASE to the appropriate directory, before launching the second instance:

export CATALINA_BASE=/path/to/tomcatInstance2

Update

"export" is a unix command. On Windows you need to call "set". Change you batch files like this:

@echo off
set CATALINA_BASE="D:/RiverMA/javadevenviroment/Stage1/apache-tomca/tomcat-instance1"
pushd %CATALINA_BASE%\bin
call startup.bat
exit
Community
  • 1
  • 1
Stefan
  • 12,108
  • 5
  • 47
  • 66
  • "it didn't work for me !!" ... thats bad, what did you do wrong? – Stefan Apr 18 '16 at 20:45
  • I created two startup.bat file and made change in startup-instance1.bat "export CATALINA_BASE=D:/RiverMA/javadevenviroment/Stage1/apache-tomcat/tomcat-instance1 cd $CATALINA_HOME/bin ./startup.bat" and similarly in startup-instance2.bat, and it didn't work – pritesh Apr 19 '16 at 05:12