I am getting java.lang.nullpointer exception for this code plzz help me out all database linked programs are creating same error

import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
import java.sql.*;

public class retser extends HttpServlet {
    Connection c;
    Statement st;
    ResultSet rs;
    ServletConfig config;

    public void init() {
        config = getServletConfig();
        try {
            c = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:XE", "system", "tiger");
            Statement st = c.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);
            rs = st.executeQuery("select * from book");
        } catch (Exception e) {
    }//end init

    public void service(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
        PrintWriter pw = res.getWriter();
        try {
            int x = Integer.parseInt(req.getParameter("t1"));
//+"  "+rs.getString(2)+"  "+rs.getInt(3)		
        } catch (Exception e) {

and what are you getting a nullpointer on? since we don't have your complete code, nor access to the resources you are using, you don't think we'll be able to reproduce your error, do you?