• 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Launching tomcat with jsvc

Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've already posted this question on the jakarta commons mailing list, but I thought I'd try here, as well.

I'm running tomcat 5.0.28 on FreeBSD and want to run tomcat as a daemon. I'm using a PERL script to start it and everything runs fine... until I try to change one of my JSP pages, then tomcat can't find the java compiler.

I'll list the script below, but I'm reasonably sure I'm specifying JAVA_HOME correctly. I did some google research and found what I think is a plausible explaination, but I don't know how to apply their windows solution to my unix happenstance.

They said that when launching tomcat as a daemon, it launches a different executable that sets it's own JAVA_HOME and keeps it at a particular registery entry and that you only have to correct this to fix the issue. With Unix neither the registery or the listed executable are relavant.




$ENV{'JAVA_HOME'} = '/usr/local/jdk1.4.2';
$ENV{'PATH'} =

`/usr/local/tomcat/bin/jsvc -user appadmin -cp
/usr/local/tomcat/bin/bootstrap.jar -outfile
/usr/local/tomcat/logs/catalina.out -errfile /usr/local/tomcat/logs
/catalina.err -pidfile /usr/local/tomcat/logs/CATALINA_PID
org.apache.catalina.startup.Bootstrap start`
Jim Babcock
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No takers on this? Just thought I'd float it back to the top for another attempt to get help on this one.
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I use jsvc on Debian, can't remember where I got my tomcat start script, but in mine it includes additional jars in the classpath. I think you need tools.jar for tomcat to be able to compile jsps.

jsvc -cp $CLASSPATH ...
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic