Tomcat service: quotes in wrapper.conf file

I wanted to configure remote debugging from Eclipse. Tomcat works as a windows service.

This bit is fine, a quick google pointed me to the correct settings to add to wrapper.conf to enable this. There were entries already in the wrapper.conf file, so I copied / pasted the last entry and changed it:

wrapper.java.additional.8="-Djava.endorsed.dirs=C:/Program Files/OurApp/tomcat/common/endorsed"
wrapper.java.additional.8.stripquotes=TRUE
wrapper.java.additional.9="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=9135,suspend=n"
wrapper.java.additional.9.stripquotes=TRUE

This did not work because the quotes around everything and stripquotes only apply to Linux systems.

Theoretically correct entries should be:

wrapper.java.additional.8=-Djava.endorsed.dirs="C:/Program Files/OurApp/tomcat/common/endorsed"
wrapper.java.additional.8.stripquotes=TRUE
wrapper.java.additional.9=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=9135,suspend=n

In the second example, quotation marks are not needed - there are no spaces to break it. The first example is due to the "Program Files" Am I correct in this assessment?

, / ? , ( qutoes), , , .
, min/max.

, , Linux.

: ?
, ?

+3
3

, , . 1 - . ( FAQ Tomcat 2 -

.

wrapper.java.additional.9="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=9135,suspend=n"
wrapper.java.additional.9.stripquotes=TRUE

, :

java "-Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=9135,suspend=n" ...

, , .

  wrapper.java.additional.9 = -Xdebug -Xrunjdwp: transport = dt_socket, server = y, address = 9135, suspend = n   wrapper.java.additional.9.stripquotes = TRUE, :

java -Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=9135,suspend=n ...

, , , -X, . (, , ),

    wrapper.java.additional.9="-Xdebug" 
    wrapper.java.additional.9.stripquotes=TRUE
    wrapper.java.additional.10="-Xrunjdwp:transport=dt_socket,server=y,address=9135,suspend=n"
    wrapper.java.additional.10.stripquotes=TRUE

java "-Xdebug" "-Xrunjdwp:transport=dt_socket,server=y,address=9135,suspend=n" ...

, . , .

, () , wrapper.conf, .

Cheers, evnafets

+3

Eclipse *.bat . , .

:

  • tomcat zip bin
  • debug.bat ,

    JPDA_ADDRESS = 8000

    JPDA_TRANSPORT = dt_socket

    catalina.bat jpda start

, , 8000 (8001, 8002 ..).

Eclipse:

  • Java ( Connect: Host - localhost IP-, - 8000; "": (, , Java, )
  • Push Debug
  • Eclipse Tomcat
+1

If you are still looking for another solution, I would shoot tomcat6w.exe, a dialog application for configuring the Windows service (available in the bin tomcats directory). I believe there are some options for setting jvm options, as you said. These settings will go to the registry by configuring the service.

0
source

Source: https://habr.com/ru/post/1704249/


All Articles