Dear sir as we know that the function which produce checked exception you most be the catch in catch exception but upto in core
java i know.
well as far as
jsp is concerned like see following coding
<%@ page language="java"%>
<%@ page import="java.sql.*"%>
<html>
<body>
<%
try{
String str1="select ename from emp where empno=?" ;
String str2=request.getParameter("text");
int n=Integer.parseInt(str2.trim());
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con=DriverManager.getConnection ("jdbc:odbc:MyDataSource","scott","tiger");
PreparedStatement ps=con.prepareStatement(str1);
ps.setInt(1,n);
ResultSet rs=ps.executeQuery();
rs.next();
String str3=rs.getString("ename");
out.println("Employee name is ");
out.println(str3);
}
catch(Exception e){
e.printStackTrace();
}
%>
</body>
</html>
since above statment is not working even no error
will it work , or if i will ad a another page which is concerned with exception like with function exception.getClass() and if i will remove catch statment from this page then what happen.and if work then why.
okay finally i would like to know that what happen if i will not catch checked exception in same page and if work then why it is breking rules of core java.
with regard
Arun kumar maalik