Note that there are some explanatory texts on larger screens.

plurals
  1. POIs there any maximum limit on number of cookies in java
    primarykey
    data
    text
    <pre><code>if (!foundCookie) { logger.info("cooookies Not found --- "); ResourceBundle appName = ResourceBundle.getBundle( "conf/filename", Locale.getDefault()); Enumeration bundleKeys = appName.getKeys(); Cookie[] cookieToBeAdded = new Cookie[9000]; int i =0 ; while (bundleKeys.hasMoreElements()) { logger.error((String) bundleKeys.nextElement()); String key = (String) bundleKeys.nextElement(); String value = appName.getString(key); cookieToBeAdded[i] = new Cookie(("station" + i),(key+":"+ value)); cookieToBeAdded[i].setMaxAge(24*60*60); logger.error(cookieToBeAdded[i]+"cookieToBeAdded[i]"); // logger.info("cooookies adding to response --- " + cookieToBeAdded[i].getName() + ":" + cookieToBeAdded[i].getValue()); response.addCookie(cookieToBeAdded[i]); pw.write("&lt;Source&gt;"); pw.write("&lt;name&gt;"+value+"&lt;/name&gt;"); pw.write("&lt;id&gt;"+key+"&lt;/id&gt;"); pw.write("&lt;/Source&gt;"); i++; } } </code></pre> <p>I am trying to run the above code and I am getting the following error:</p> <pre><code>java.lang.ArrayIndexOutOfBoundsException at java.lang.System.arraycopy(Native Method) at org.apache.coyote.http11.InternalOutputBuffer.write(InternalOutputBuffer.java:680) at org.apache.coyote.http11.InternalOutputBuffer.sendStatus(InternalOutputBuffer.java:419) at org.apache.coyote.http11.Http11Processor.prepareResponse(Http11Processor.java:1588) at org.apache.coyote.http11.Http11Processor.action(Http11Processor.java:934) at org.apache.coyote.Response.action(Response.java:183) at org.apache.coyote.Response.sendHeaders(Response.java:379) at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:305) at org.apache.catalina.connector.OutputBuffer.close(OutputBuffer.java:273) at org.apache.catalina.connector.Response.finishResponse(Response.java:486) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446) at java.lang.Thread.run(Thread.java:636) </code></pre> <p>When I try to catch this exception, it does not come into the catch loop. I am adding about 8999 values to cookies. Is there any limit on cookie size?</p> <p>I am using JBoss and this is written in servlet(Java).</p> <p>Please help?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload