In javascript, do not use, document.getElementById("ID"); to get value from the input elements. It works in IE but not in FF.
so use like
var value = doucment.forms[0].txtName.value;
Tuesday, August 19, 2008
Thursday, August 14, 2008
Using Kaptcha in JSP page within WEB-INF folder
Since our JSP page in inside WEB-INF folder, we need to give path starting from the context path.
in JSP page
in JSP page
instead of <img=kaptcha/>
place
<img=<%request.getContextPath()%>/kaptcha/>
Java ClassPath Problem
If NoClassDefFoundError occurs when we execute a class, it might be a classpath error.
It can be solved by placing .; before each path
where '.' refers that classpath is accessible from any folder
It can be solved by placing .; before each path
where '.' refers that classpath is accessible from any folder
load-on-startup (load-on-startup tag) in Servlet
Used to decide whether servlet will be " lazily " or " eagerly " loaded.
Specified in web.xml file. If the value is not specified or is a Number < 0 then it means " lazy loading "
What " lazy loading " means is that servlet is NOT loaded by container on startup Servlet in this case is loaded on the first client request - so the first client can experience poor performance
" Eager " loading means that the servlet is initialised on container startup If there are two servelts A & B with values 0 & 1 than it means that Servlet A ( having value = 0 ) will be loaded first So if there are more than one servlet this element specifies the order of loading - lower integer values ( including zero ) are loaded first
If you specify this element but do not provide the value - even then the servlet will be the first servlet that gets loaded
To ensure that servlet follows " lazy loading " - do not provide this entry at all in web.xml file OR provide a negative number
Specified in web.xml file. If the value is not specified or is a Number < 0 then it means " lazy loading "
What " lazy loading " means is that servlet is NOT loaded by container on startup Servlet in this case is loaded on the first client request - so the first client can experience poor performance
" Eager " loading means that the servlet is initialised on container startup If there are two servelts A & B with values 0 & 1 than it means that Servlet A ( having value = 0 ) will be loaded first So if there are more than one servlet this element specifies the order of loading - lower integer values ( including zero ) are loaded first
If you specify this element but do not provide the value - even then the servlet will be the first servlet that gets loaded
To ensure that servlet follows " lazy loading " - do not provide this entry at all in web.xml file OR provide a negative number
Monday, August 11, 2008
IllegalStateException : Error: Attempt to clear a buffer that is already been flushed
Sometimes <logic:forward/> give IllegalStateException: including error message like
This is related to the buffer overflow error. To solve this error, you can just set the page directive parameter autoflush to true or increase the buffer size by setting the buffer parameter.
By default the buffer size is 8K, and all the HTML output is stored in this buffer before JSPWriter flushes it to the output. If the content size exceeds this default size, then there will be an exception, like the one you are getting.
If the value of "autoflush" parameter is true, then whenever the buffer is full then the contents of this buffer will be automatically flushed.
Error: Attempt to clear a buffer that is already been flushed
This is related to the buffer overflow error. To solve this error, you can just set the page directive parameter autoflush to true or increase the buffer size by setting the buffer parameter.
By default the buffer size is 8K, and all the HTML output is stored in this buffer before JSPWriter flushes it to the output. If the content size exceeds this default size, then there will be an exception, like the one you are getting.
If the value of "autoflush" parameter is true, then whenever the buffer is full then the contents of this buffer will be automatically flushed.