On 28/05/2021 10:13, Carsten Klein wrote:

Mark,

On 28/05/2021 10:35, Mark Thomas wrote:

</not quoting anything>

No doubt that UTF-8 is the better encoding for messages and language files. And yes, my Eclipse actually does not use the version built by Ant. I use the start-tomcat.launch configuration file for starting Tomcat. Actually it only takes a startup-class name. So, it must obviously use the JARs built by Eclipse.

The trick is, that in the build.xml file, you are actually converting message files:

<!-- Convert the message files from UTF-8 to ASCII. This can be removed
after upgrading to Java 9+ as the minimum JRE and specifying the encoding when loading the ResourceBundles -->

Simple. However, you do that after having them copied. While copying, you use filtering-copy and specify ISO-8859-1 as the file's encoding:

<!-- Copy static resource files -->
<copy todir="${tomcat.classes}" encoding="ISO-8859-1">
   <filterset refid="version.filters"/>
   <fileset dir="java">
     <include name="**/*.properties"/>
     <exclude name="**/LocalStrings*.properties"/>
     [...]

Should be UTF-8 now?

Strictly, yes. Practically, it makes no difference because the filters that are applied do find and replacement with ASCII strings and are highly unlikely to ever be anything other than ASCII.

I'll get that updated.

Back to the Eclipse. I guess there is not much difference between calling Ant from the console and using Eclipse's Ant support (Run As -> Ant build). But, how to start that with support for debugging in Eclipse (may be a dumb questing, I know)?

Start Tomcat with:
catalina jpda run
(or start but I typically use run as I nearly always want to see what is logged to the console)

In Eclipse go to Debug > Debug Configurations > Remote Java Application > New Configuration. Browse to the project and then click Debug. Tomcat's default jpda config matches Eclipse's so so should then have a remote debug session set up with your Tomcat instance.

Mark


Carsten

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to