Vamsi Pavan’s Place

When curiousity outbursts …..

Entries Tagged as 'Jsp/servlets'

java.sql.SQLException: Io exception: Invalid Packet Lenght

March 9th, 2009 · 1 Comment · Java, Jsp/servlets, Programming

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. java.sql.SQLException: Closed Statement
8. java.sql.SQLException: Refcursor value is invalid
9. java.sql.SQLException: Io exception: Size Data Unit (SDU) mismatch
10. java.sql.SQLException: Must be logged on to […]

Bookmark it! These icons link to social bookmarking sites where readers can share and discover new web pages.
  • bodytext
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Live
  • StumbleUpon
  • BlinkList
  • YahooMyWeb
  • NewsVine
  • blogtercimlap
  • Netvouz
  • Technorati
  • Slashdot
  • Print this article!

[Read more →]

Tags:

java.io.UTFDataFormatException: 5-byte UTF8 encoding not supported.

March 9th, 2009 · 1 Comment · Java, Jsp/servlets, Programming

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 parse an xml string using byte array from the xml string, and give that array as input to xml […]

Bookmark it! These icons link to social bookmarking sites where readers can share and discover new web pages.
  • bodytext
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Live
  • StumbleUpon
  • BlinkList
  • YahooMyWeb
  • NewsVine
  • blogtercimlap
  • Netvouz
  • Technorati
  • Slashdot
  • Print this article!

[Read more →]

Tags:

File upload code in Jsp : using apache’s commons-upload.jar

April 13th, 2007 · 4 Comments · Jsp/servlets, Source Code

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 following code and any static HTML page for initial page.
The code here goes:

<%@ page import=”org.apache.commons.fileupload.*,
org.apache.commons.fileupload.servlet.ServletFileUpload,
org.apache.commons.fileupload.disk.DiskFileItemFactory,
org.apache.commons.io.FilenameUtils,
java.util.*,
java.io.File,
java.lang.Exception,
java.io.*,
java.net.*,
org.apache.poi.hssf.usermodel.*” %>
<h1>Data Received at the […]

Bookmark it! These icons link to social bookmarking sites where readers can share and discover new web pages.
  • bodytext
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Live
  • StumbleUpon
  • BlinkList
  • YahooMyWeb
  • NewsVine
  • blogtercimlap
  • Netvouz
  • Technorati
  • Slashdot
  • Print this article!

[Read more →]

Tags:

File upload code in Jsp : other methods ….

April 11th, 2007 · No Comments · Jsp/servlets

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 button for a file select box on the browser together with a text field that takes the file […]

Bookmark it! These icons link to social bookmarking sites where readers can share and discover new web pages.
  • bodytext
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Live
  • StumbleUpon
  • BlinkList
  • YahooMyWeb
  • NewsVine
  • blogtercimlap
  • Netvouz
  • Technorati
  • Slashdot
  • Print this article!

[Read more →]

Tags: