Parameters:invalid Chunk ' ignored.

Source: Internet
Author: User

Different versions of the reasons, all over the study:

There are several reasons for these problems:
1, visit/test.jsp?&p1=1&p2=2 ...
2, visit/test.jsp?p1=1&p2=&p3=3 ...
3. Visit/test.jsp?p1=1&&p2=2 ...
4, visit/test.jsp? Action=save&
5, the form submission, there are <input name= "" value= "* * *"/> Such a domain

In short, code-writing is not a specification that can easily lead to such problems.

Reason Analysis: You submit the following (*.jsp?param1=1&param2=2&&param3=3) parameters followed by too many && symbols,
More than two, tomcat5.5 and versions it may not recognize the parameters you give, think that your argument is illegal invalid have large chunks, and can ignore redundant, just as a warning you have illegal character parameter transfer, generally will not affect your application program running, But we recommend that we try to avoid the appearance of this extra parameter. This is the Apache in the version upgrade, increase the application function of the checksum, some of the illegal parameter input format will be prompted to warn you, some reason may be considered to be your incoming parameters, in the corresponding page does not request.getparameter ("param") to use this parameter, Now that you're in, but you're not using it, the warning prompts you to get rid of the extra parameters.

Two reasons: The JDK version is different from the application server configuration changes, together with the parameter function check settings.

That is to say, the parameters of the transfer as far as possible standardization, can not write, you may not think of the exception or warning.

As an example: Url?&key=value
The & here represents an invalid parameter. The right one should be url?key1=value1&key2=value2.
or Url?key=value.

This warning should not cause the thread to hang up, it is likely that Tomcat or your application itself has a performance bottleneck. The server will filter this invalid parameter, it is not easy to find the source of this warning, but it is not no way. You need to write a URL validation method, and then write a filter that configures the filter to filter for URLs and then prints or writes to the log when the problematic URL is found.

June, 2007 10:34:54 PM org.apache.tomcat.util.http.Parameters processparameters
2 WARNING:Parameters:Invalid Chunk ignored. I believe a lot of people have encountered this problem with Tomcat. I've been upset about it. Now will be the solution to tell you and solve the problem of a little sentiment. After several encounters with this problem not resolved, prompted me to look at the original code, according to the exception information, I found the code snippet to throw the exception. The original code is introduced into the article.
Code highlighting produced by Actipro Codehighlighter (freeware)

--> 1 if (nameend <= namestart) {
2 StringBuilder msg = new StringBuilder ("Parameters:invalid chunk");
3//No name eg &=xx& 'll trigger this
4 if (valend >= namestart) {
5 msg.append ('/');
6 try {
7 Msg.append (New String (bytes, Namestart,
8 Valend-namestart, default_encoding));
9} catch (Unsupportedencodingexception e) {
Ten//Should never happen
One log.error ("Unable to convert bytes", e);
Msg.append ("'");
Msg.append ("ignored.");
Log.warn (msg);
//Invalid chunk-it ' s better to ignore
19} I don't know if you noticed, I added the underline on line 3rd of the code above, I believe you know what you should do when you see this sentence. By the right, you guessed right. This exception is triggered when there is no parameter name (for example, &=xx&aa=11), and there is no parameter name after each &.
Note: This also tells us a problem. For open source projects, if you're searching for existing data that doesn't solve the problem, you can try to look at the original code and maybe find a way to solve the problem.


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: 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.