3DES and Tomcat deployment

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.