![]() |
|
|
|
| ||||||
|
Welcome to the The ProgrammersTalk Community forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
| Tags: |
![]() |
![]() | | LinkBack | Thread Tools | Display Modes | ![]() |
| |||
| [SOLVED] how to include servlet file into jsp program? here i'm sending my jsp program and serclet program servlert program: import javax.servlet.*; import javax.servlet.http.*; import java.io.*; import java.sql.*; import java.lang.*; public class Assodb extends HttpServlet { Connection con; public void init() throws ServletException { try { Class.forName("oracle.jdbc.driver.OracleDriver"); con = DriverManager.getConnection("jdbc:oracle:thin:@tra inee:1521:testdb","sri","sri"); } catch(ClassNotFoundException cfe) { System.out.println("Driver class not found"); System.out.println(cfe); } catch(SQLException se) { System.out.println("Unable to get connected to the database"); System.out.println(se); } }//init() public void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException,IOException { try { String asname=req.getParameter("aname"); int asid=Integer.parseInt(req.getParameter("aid")); |
| |
![]() |
| Thread Tools | |
| Display Modes | |
| |