I wanted to set up remote debugging from Eclipse. Tomcat is running as a service on windows.
That bit is fine, a quick google pointed me towards the correct settings to add to wrapper.conf to enable this. There were entries already in wrapper.conf, so I copy/pasted the last entry and modified 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
It didn’t work, because the quotes are around everything, and the stripquotes only applies to linux systems.
Theoretically the 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
The second example doesn’t need quotes – no spaces to break it up. The first example does – because of ‘Program Files’ Am I correct in this assessment?
If so, how/why is the application working as is? There are several parameters ostensibly being set like this (nested in qutoes), which I believe actually have no effect.
For instance min/max memory settings.
I found an example here that has the same thing, ostensibly being a config for windows and linux.
My questions: Will these quotes stop the config commands going through?
Why is the app working if that is the case?
AFter a bit more playing around and trolling through debug logs, I think I have isolated the issue. The problem was the mix of 1 – Being lazy and putting two configuration items on the same line. (In my defense I copied it as one line from the Tomcat FAQ 2 – Using quotes
The combination of these two was causing the issue.
Like this it generates a command line:
It treats that entire string as one argument – rather than the two as I intended.
Without the quotes wrapper.java.additional.9=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=9135,suspend=n wrapper.java.additional.9.stripquotes=TRUE It generates:
Seeing as there are no quotes to screw things up, it processes the two -X parameters as I would want it to. Even better (and probably the intended use) as two seperate entries
There are quotes around each one, and it treats them individually. The existing entries are all fine, because they only set one item per line.
So I’ll just put this down to a learning experience (sigh) and realise that I now know a whole lot more about wrapper.conf that I didn’t know before.
Cheers, evnafets