Similar exceptions are : 1. java.io.IOException: Io exception: Unexpected packet 2. java.sql.SQLException: Protocol violation 3. java.sql.SQLException: Io exception: Bad packet type 4. java.sql.SQLException: Bigger type length than Maximum 5. java.sql.SQLException: Io exception: Invalid Packet Lenght 6. java.sql.SQLException: Closed Connection 7.Continue reading… java.sql.SQLException: Io exception: Invalid Packet Lenght
Category: Jsp/servlets
java.io.UTFDataFormatException: 5-byte UTF8 encoding not supported.
An interesting exception faced while parsing xml content. Also, on further analysis on this error caused below similar issues started to raise. Another similar exception is: java.io.UTFDataFormatException: Invalid byte 1 of 1-byte UTF-8 sequence Here, I am trying to parseContinue reading… java.io.UTFDataFormatException: 5-byte UTF8 encoding not supported.
File upload code in Jsp : using apache’s commons-upload.jar
Please follow the below steps before coding the upload script in jsp. 1. Download the commons-upload.jar from Apache’s website. 2. Put that jar file into the classpath, i.e in WEB-INF/lib/ directory. 3. Then create a jsp file with the followingContinue reading… File upload code in Jsp : using apache’s commons-upload.jar
File upload code in Jsp : other methods ….
On the client side, the client’s browser must support form-based upload. Most modern browsers do, but there’s no guarantee. For example, <FORM ENCTYPE=’multipart/form-data’ method=’POST’ action=’/myservlet’> <INPUT TYPE=’file’ NAME=’mptest’> <INPUT TYPE=’submit’ VALUE=’upload’> </FORM> The input type “file” brings up a buttonContinue reading… File upload code in Jsp : other methods ….