Working with JSP Sessions
* getCreationTime —returns value of time in milliseconds. * getLastAccessedTime—returns the value of time in milliseconds. * getId—method of session object is used to return the unique identifier...
View Articlehow to find carriage return in string using java
Just like you would identify any other character in a string: look for “\r\n” or “\n” (system dependent).
View ArticleBasic JPEG image resizing in Java
/* JpegResizerDemo.java */ import java.io.FileInputStream; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.FileNotFoundException; import java.io.IOException; import...
View ArticleLoad an image, scale it to thumbnail size and save it as JPEG in Java
import com.sun.image.codec.jpeg.*; import java.awt.*; import java.awt.image.*; import java.io.*; /** * Thumbnail.java (requires Java 1.2+) * Load an image, scale it down and save it as a JPEG file. *...
View Articlejava.lang.OutOfMemoryError: Java heap space
Problem: The error ‘java.lang.OutOfMemoryError: Java heap space’ is caused when the JVM (Java Virtual Machine) runs out of available memory during processing. This can be caused by: a large number of...
View Articlejava.lang.IllegalStateException in Java Servlet
When response.sendRedirect() is not the last statement in Servlet to be executed and its embedded in between your business logic i.e after response.sendRedirect(), if some function or business logic is...
View ArticleServing Image from Absolute Path in Java/J2EE
import java.io.*; import java.net.URLDecoder; import javax.servlet.*; import javax.servlet.http.*; /** * Serving Image from Absolute Path. */ public class ImageServAbsolutePath extends HttpServlet {...
View ArticleThe request doesn’t contain a multipart/form-data or multipart/mixed stream,...
org.apache.commons.fileupload.FileUploadBase$InvalidContentTypeException: the request doesn’t contain a multipart/form-data or multipart/mixed stream, content type header is null If you are iterating...
View ArticleCharacter Conversions from Browser to Database in JAVA
Character Conversions from Browser to Database in JAVA Characters in route to their final storage destination on the World Wide Web, move through various layers of programming interfaces and can cross...
View ArticleHow to Increase Heap Size for Tomcat + Windows
Tomcat can be installed in two different ways and below is the information about how to increase or set the heap size for tomcat server in both scenarios - 1. Folder installation – Create one new...
View Article
More Pages to Explore .....