Pages

Monday, 24 November 2014

package javax.servlet does not exist

add this dependency to the pom.xml file

<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.0.1</version>
</dependency>

if it normal java project then add this jar to the project.

servlet-api.jar




Sunday, 23 November 2014

hibernate mediumblob annotation

Use at:
"@LOB"

@Column(name = "image")
@Lob
private byte[] image;


For saving mediumblob  image to the data base

Data truncation: Data too long for column 'image'

com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'image' 


TINYBLOB   :     maximum length of 255 bytes  
BLOB       :     maximum length of 65,535 bytes  
MEDIUMBLOB :     maximum length of 16,777,215 bytes  
LONGBLOB   :     maximum length of 4,294,967,295 bytes  



hibernate mediumblob annotation


Friday, 21 November 2014

How to detect os is of 36 bit or 64 bit

How to detect os is of 36 bit or 64 bit

Got to command prompt and enter this:

wmic os get osarchitecture










GWT tab key press event

Tuesday, 11 November 2014

GWT tab key press event

GWT tab key press event

KeyDownHandler handler = new KeyDownHandler() {
  @Override
  public void onKeyDown(KeyDownEvent event) {
    if (event.getNativeKeyCode() == 9) {
      event.preventDefault();
      event.stopPropagation();
    }
  }
}