i have made a dynamic blog engine, where multiple authors can publish articles.
the author goes to a page where he inputs the 'article' 'description' and 'the whole article' in three <textarea>
Then i store all the values in 3 variables and store it in the database via an ajax based request.
The Problem: The HttpServerRequest is too large and it gives a 413 FULL Head error, and the request doesnt get through.
The Code:
The HTML:
<div class="container">
<h4 class="text-left">Title:</h4>
<textarea id="title" rows="2" cols="" ></textarea>
<br />
<h4 class="text-left">Description:</h4>
<textarea id="description" rows="5" cols="" ></textarea>
<br />
<h4 class="text-left">Article:</h4>
<textarea id="article" rows="40" cols="" onkeyup="replaceWordChars(this.value)"></textarea>
<br />
<div class="publish btn">Publish</div>
<br />
<br />
</div>
The Script:
<script>
$(function(){
$('.publish').click(function(){
title = $('#title').val();
description = $('#description').val();
article = $('#article').val();
$.ajax({
type: "get",
url: "/articles",
data: {action:'add', title:title, description:description, article:article},
success: function(code)
{
alert("published");
window.location="dashboard.jsp";
}
}).error(function(){ alert("error"); })
.complete(function(){ alert("complete"); });
});
});
</script>
The ERROR:
"NetworkError: 413 FULL head - http:///articles?action=add&title=blah&..........gs.%0A%0A&userId=1"
The Question:
Is there an alternate way to send a big server request?? I also read on google that we can change the size, to match huge requests?
Answers are preferred in java, HTML, javascript (or) jQuery
EDIT I read here that we can set the size limit of post request in header? How can i do it in GAE?