Home » Developer & Programmer » JDeveloper, Java & XML » java.io.UnsupportedEncodingException
java.io.UnsupportedEncodingException [message #91489] Tue, 08 October 2002 03:32 Go to next message
Burak Heper
Messages: 2
Registered: October 2002
Junior Member
Hi,
I've successfully loaded javamail classes to my 8.1.7 db,installed java code and created sql package but when i run the procedure i get the following exception;

javax.mail.SendFailedException: Sending failed;
nested exception is:
class javax.mail.MessagingException: IOException while sending message;
nested exception is:
java.io.UnsupportedEncodingException: ISO-8859-1
javax.mail.MessagingException: IOException while sending message;
nested exception is:
java.io.UnsupportedEncodingException: ISO-8859-1

can anyone help me ?
thx.
Re: java.io.UnsupportedEncodingException [message #91490 is a reply to message #91489] Tue, 08 October 2002 05:11 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
from the docs
In order to get Java Server Pages to display and
process data in character sets other than the default
ISO-8859-1, two issues must be handled:  
- correct display of data in the desired character set  
- correct handling of the encoding of request 
Parameters submitted   to the Java Server Page input
fields  To handle the first issue, the character
encoding of the Java Server Page needs to be set to 
The desired character set. This is achieved by using 
the contentType parameter with the page directive, as 
follows:  
<%@ page ... contentType="MIMETYPE; charset=CHARACTERSET" ... %>  
MIMETYPE will in most cases be text/html CHARACTERSET 
Should be the IANA code for the desired character set  
Thus, for Windows Greek, a suitable page directive 
would be:  
<%@ page language="java" contentType="text/html; charset=WINDOWS-1253" %>  
To handle the second issue, one must keep in mind that 
character encoding of request parameters is not 
necessarily the same as for the page itself and 
depends on the implementation of the servlet container 
in which the Java Server Pages run, e.g. Oracle HTTP 
Server Apache/JServ.  Most containers, including 
Oracle HTTP Server Apache/JServ, encode request 
parameters using the default encoding ISO-8859-1, 
regardless of the encoding set for the Java Server 
Pages using the page directive's contentType 
parameter.  For this reason, the JSP provides the 
translate_params configuration parameter. This is set 
in the servlet container's configuration file, 
e.g. for Oracle HTTP Server Apache/JServ in the zone.properties file, as follows:
  
servlet.oracle.jsp.JspServlet.initArgs=translate_params=true  
The combination of the above two settings, one in the 
JSP itself and the other in the configuration file of 
the servlet container in which the JSPs run, allow the 
correct running of Java Server Pages with non ISO-8859-
1 data. 

Re: java.io.UnsupportedEncodingException-udpated [message #91491 is a reply to message #91489] Tue, 08 October 2002 05:17 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
from the docs---- and '< >' over the tags are replace with
'{}'
In order to get Java Server Pages to display and
process data in character sets other than the default
ISO-8859-1, two issues must be handled:  
- correct display of data in the desired character set  
- correct handling of the encoding of request 
Parameters submitted   to the Java Server Page input
fields  To handle the first issue, the character
encoding of the Java Server Page needs to be set to 
The desired character set. This is achieved by using 
the contentType parameter with the page directive, as 
follows:  
{%@ page ... contentType="MIMETYPE; charset=CHARACTERSET" ... %}  
MIMETYPE will in most cases be text/html CHARACTERSET 
Should be the IANA code for the desired character set  
Thus, for Windows Greek, a suitable page directive 
would be:  
{%@ page language="java" contentType="text/html; charset=WINDOWS-1253" % } 
To handle the second issue, one must keep in mind that 
character encoding of request parameters is not 
necessarily the same as for the page itself and 
depends on the implementation of the servlet container 
in which the Java Server Pages run, e.g. Oracle HTTP 
Server Apache/JServ.  Most containers, including 
Oracle HTTP Server Apache/JServ, encode request 
parameters using the default encoding ISO-8859-1, 
regardless of the encoding set for the Java Server 
Pages using the page directive's contentType 
parameter.  For this reason, the JSP provides the 
translate_params configuration parameter. This is set 
in the servlet container's configuration file, 
e.g. for Oracle HTTP Server Apache/JServ in the zone.properties file, as follows:
  
servlet.oracle.jsp.JspServlet.initArgs=translate_params=true  
The combination of the above two settings, one in the 
JSP itself and the other in the configuration file of 
the servlet container in which the JSPs run, allow the 
correct running of Java Server Pages with non ISO-8859-
1 data. 

update on prob desc [message #91492 is a reply to message #91489] Tue, 08 October 2002 05:43 Go to previous message
Burak Heper
Messages: 2
Registered: October 2002
Junior Member
thx Mahesh but my prob is not related with java server pages, sorry for the lack of info about it.

I am trying to send mail with attachements using java stored procedures and i implemented the sample code given on the oracle site.
The rest is as my first post.
Previous Topic: Oracle Forms 6i Documentation
Next Topic: Pro * C to Java
Goto Forum:
  


Current Time: Thu Mar 28 18:41:46 CDT 2024