• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Running 3rd party API as servlets in Tomcat

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear All,

I am new to web programming. I need a help in executing a servlet using tomcat in "LINUX". I am using a 3rd party API called Srb JAVA API to connect to an DATA GRID Software. To Compile my Java program that uses this API i added srbJavaAPI.jar to the class path. For runnig my Java program i was asked to set the following in the Environment variable(.bashrc)
*****************************
SRB_HOME="<set SRB home directory>"

SRB_CLASSPATH= "<you local directory where new classes are compiled>"
SRB_CLASSPATH= "${SRB_CLASSPATH }:${SRB_HOME} /lib"
SRB_CLASSPATH= "${SRB_CLASSPATH }:${SRB_HOME} /lib/srbJavaAPI. jar"
****************************

and then while excuting the program using JAVA command i was asked to add two arguments like to below

*********************************

java -classpath "${SRB_CLASSPATH} " -Dsrb.home.path= "${SRB_HOME} "
<compiledJavaClassN ame> <compiledJavaClassA rguments>
**********************************

I did and i was able to connect to the Data Grid Software. But i developed a servlet version of my Java program to run inside tomcat it did not work . Where should i set the Environment Variable and how Tomcat will use the extra arguments to run my servlet. Kindly help.
Thanks and Regards
V.K.M.RAJA
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Put the srbJavaAPI.jar into the lib directory of your web application.
(myapp/WEB-INF/lib)
 
Ranch Hand
Posts: 2308
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can look into cataline.bat or catalina.sh in case of linux for setting env varialbes.Look in that file for OPTS_ARGUMENTS , or something similar for setting some extra env variables.

If you have any jar specific to your own web application then put that in the lib folder of WEB-INF.
reply
    Bookmark Topic Watch Topic
  • New Topic