Configure the <mime-mapping> download file type in the web. xml file
Tomcat downloads .rar files as text, so that IE opens rarfiles as garbled characters. In this case, you do not have to consider it a browser problem, most browsers should not expose binary files as text. Generally, the server opens binary files for any browser. solution:
Open CONF/Web. xml and add the following code.
<Mime-mapping>
<Extension> doc </extension>
<Mime-type> application/MSWord </mime-type>
</Mime-mapping>
<Mime-mapping>
<Extension> XLS </extension>
<Mime-type> application/MSExcel </mime-type>
</Mime-mapping>
<Mime-mapping>
<Extension> pdf </extension>
<Mime-type> application/pdf </mime-type>
</Mime-mapping>
<Mime-mapping>
<Extension> zip </extension>
<Mime-type> application/zip </mime-type>
</Mime-mapping>
<Mime-mapping>
<Extension> RAR </extension>
<Mime-type> application/RAR </mime-type>
</Mime-mapping>
<Mime-mapping>
<Extension> TXT </extension>
<Mime-type> application/TXT </mime-type>
</Mime-mapping>
<Mime-mapping>
<Extension> CHM </extension>
<Mime-type> application/mshelp </mime-type>
</Mime-mapping>
<Mime-mapping>
<Extension> MP3 </extension>
<Mime-type> audio/X-mPEG </mime-type>
</Mime-mapping>
Restart tomcat, clear ie cache, and download RAR files normally.