1

In my JSP Page i have one tag .the URL of this tag i am setting in java script which calls servlet.so basically all the parameters are passing by GET request.

The above wroks fine as it generates pdf of current form data so in URL user can see all parameters.

Now the problem is that i have added one more parameter for sending to servlet get request which is quite a long.so it gives error."TOO LONG URI REQUEST".the data which i am seding is javascript variable.

I can not change it to post as i want some data also to be passed in URL.and the parameter which i am adding(the large one) can be by hidden variable or so..???

so can you suggest what should i do??

 <div class="pdflink">
 <a id="pdfLinkForGroup" href="" onclick="getPDF('<%=reportID%>','',reportTitle)"> <img src="/images/PdfIcon.jpg" class="pdflink"></img></a></div>

getPDFfunction:

aTag=document.getElementById("pdfLinkForSingle");
var queryString = "?"+qry+qString+"&offset=" + offset + "&limit=1000"+"&imgwidth="+imgWidth+"&imgheight="+imgHeight+lastorderby+lastordertype+"&path=/tmp/pdf.xml&svgData="+encodeURIComponent(svgData);
var url = conPath+"/pdf/"+encodeURIComponent(reportName)+".pdf" + queryString + searchQuery;
aTag.target="blank";
aTag.href=url;
tereško
  • 58,060
  • 25
  • 98
  • 150
Asha Koshti
  • 2,763
  • 4
  • 22
  • 30

2 Answers2

0

It is because DOS is enabled on the sever. Try increasing the MAX URI REQUEST SIZE value in server DOS configuration.

Ramesh PVK
  • 15,200
  • 2
  • 46
  • 50
0

I think you could found an answer in the following URL which is talking about the max URL length you can put in your browser.

The issue seems that you put a long URL, and there are 2 solutions: - modify you parameters in the url, minify them! - Use POST to send the parameters to your server

What is the maximum length of a URL in different browsers?

Enjoy :)

Community
  • 1
  • 1
user3774109
  • 1,978
  • 1
  • 12
  • 13