Eclipse solves the issue of garbled code in osgi
If garbled characters occur, modify
Tomcat-server.xml file:
<Connector port="8080"protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" URIEncoding="UTF-8"/>
Add the red color to solve the problem.
The modified tomcat-server.xml document is as follows:
<?xml version='1.0' encoding='utf-8'?><!-- Licensed to the Apache Software Foundation(ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional informationregarding copyright ownership. The ASF licenses this file to You under theApache License, Version 2.0 (the "License"); you may not usethis file except in compliance with the License. You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreedto in writing, software distributed under the License is distributedon an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,either express or implied. See the License for the specific languagegoverning permissions and limitations under the License.--><Serverport="8005" shutdown="SHUTDOWN"> <Listener className="org.apache.catalina.core.AprLifecycleListener"SSLEngine="on" /> <ListenerclassName="org.apache.catalina.core.JasperListener" /> <ListenerclassName="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"/> <Listener className="org.eclipse.virgo.web.tomcat.support.ServerLifecycleLoggingListener"/> <Service name="Catalina"> <Connectorport="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443"URIEncoding="UTF-8"/> <Connector port="8443"protocol="HTTP/1.1" SSLEnabled="true" maxThreads="150" scheme="https"secure="true" clientAuth="false" sslProtocol="TLS" keystoreFile="config/keystore" keystorePass="changeit"/> <Connector port="8009"protocol="AJP/1.3" redirectPort="8443" /> <Engine name="Catalina" defaultHost="localhost"> <Realm className="org.apache.catalina.realm.JAASRealm"appName="virgo-kernel" userClassNames="org.eclipse.virgo.kernel.authentication.User" roleClassNames="org.eclipse.virgo.kernel.authentication.Role"/> <Host name="localhost" appBase="webapps" unpackWARs="false"autoDeploy="false" deployOnStartup="false"createDirs="false"> <Valve className="org.apache.catalina.valves.AccessLogValve"directory="serviceability/logs/access" prefix="localhost_access_log."suffix=".txt" pattern="common"resolveHosts="false"/> <ValveclassName="org.eclipse.virgo.web.tomcat.support.ApplicationNameTrackingValve"/> </Host> </Engine> </Service></Server>