1.3DES problem
3DES is an encryption algorithm, its encryption and decryption algorithm is public, the encryption is the purpose of encryption key, when the data through the 3DES encryption, the incoming key to encrypt. Decryption is the same key that is passed in and can be decrypted.
Generally use 3DES for encryption and decryption, you need to use Base64 for the corresponding conversion. If you encrypt a string "abc", you need to pass in "ABC" at this time. GetBytes (), after encryption is still a byte array, it needs to be base64, the byte array into a string, decrypted, You need to use Base64 to convert a string to a byte array for decryption, and then output a byte array, and then make a new string (BYTESABC) to restore.
2.webAppRootKey problem
When deploying two or more projects under Tomcat, it is best to define the Webapprootkey parameter in the Web. xml file and, if undefined, default to "Webapp.root", as follows:
<!--application Path--
<context-param>
<param-name>webapprootkey</param-name>
<param-value>webapp.root</param-value>
</context-param>
Best newspaper The parameter values for each item are different to avoid conflicting items
Severity: Exception sending context initialized event to listener instance of class Org.springframework.web.util.Log4jConfigLis Tener
Java.lang.IllegalStateException:Web App root system property already set to different value: ' Webapp.root ' = [C:\Program Files (x86) \apache software Foundation\tomcat 6.0\webapps\drmproject\] instead of [C:\Program Files (x86) \apache Software Foundation\tomcat 6.0\webapps\drmsn\]-Choose unique values for the ' Webapprootkey ' Context-param in your WEB.XM L files!
3DES and Tomcat deployment