Tuesday, April 14, 2015

How to increase POST DATA SIZE Limit in JBoss and Tomcat.


If you are facing problem as your form is very big or it is merged with large size data, In this case, you might see HTTP 500 error on form submission. If you inspect the server logs, you will see this exception – “Template is not specified”.
On jboss/tomcat server, POST size limit is 2MB default. You can increase the POST size limit.
  • Go to <jboss_dir>/server/<server_name>/deploy/jbossweb.sar directory and look for server.xml and for the tomcat go to /<tomcat_dir>/conf/server.xml.
  • There is a <Connector> specified for “HTTP/1.1″ protocol like this
<Connector protocol=”HTTP/1.1″ port=”8080″ ….>
  • Add an attribute “maxPostSize” to this if not already added. Specify its value as per the requirement. ‘0’ means there is no limit on POST size.
After changing the settings, just restart the server to affect these changes.

Thursday, October 1, 2009

adding watermarks in html textbox

Just copy and paste the following to your page

input type="text" class="hint" value="Search..."
onfocus="if (this.className=='hint') { this.className = ''; this.value = ''; }"
onblur="if (this.value == '') { this.className = 'hint';
this.value = 'Search...'; }

You can add and remove a special CSS class and modify the input value
onfocus/onblur with JS:

Then specify a hint class with the styling you want in your CSS for example:

input.hint {
: grey;