Results 1 to 3 of 3

Thread: tcServer startup parameters in STS 2.8.1

  1. #1

    Default tcServer startup parameters in STS 2.8.1

    Hi,

    I'm trying to launch a (Spring Batch Admin -enabled) webapp in STS, and I need to pass a startup parameter. (According to http://static.springsource.org/sprin...g-started.html I need -DENVIRONMENT=something)

    How do I pass Tomcat a startup parameter if I deploy/run from within STS?

    If I run Tomcat on the command line, I would usually put a custom startup parameter CATALINA_OPTS in CATALINA_{HOME|BASE}/bin/setenv.sh

    I put some debug "touch /tmp/somerrandomtext" or echo statements in all the catalina.sh and setenv.sh I could find in the vfabric folder, with no side effects, and this tells me that STS runs Tomcat in some other way.

    (jinfo on my processes also don't show the new parameter)

    Please advise,

    Thanks,
    Juan
    Last edited by opyate; Dec 6th, 2011 at 04:14 AM.

  2. #2

    Default

    This is NOT a duplicate of http://forum.springsource.org/showth...erver-JVM-args

    I'm especially interested in overriding CATALINA_OPTS, because my variable seems be ignored when following the steps above.
    Last edited by opyate; Dec 5th, 2011 at 12:21 PM.

  3. #3

    Default

    STS launches Tomcat with the parameters specified in the launch configuration. It does not evaluate the regular startup files for setting JVM or command line parameters.

    As Christian pointed out in the other blog post: From the Servers view, double click on the Server to open the Server Editor. In the Server Editor click "Open Launch Configuration" in the left column. This brings up the configuration dialog. Click on the Arguments tab and enter your JVM arguments.

    Have you tried adding your parameter that way?

    Steffen
    Steffen Pingel
    --
    Committer, SpringSource Tool Suite
    Senior Developer, Tasktop

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •