User Profile

Collapse

Profile Sidebar

Collapse
gauravagam
gauravagam
Last Activity: Aug 19 '15, 07:40 AM
Joined: Nov 13 '12
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • gauravagam
    started a topic Include html,htmlf,jsp,jspf file in servlet
    in Java

    Include html,htmlf,jsp,jspf file in servlet

    Here is code to include html,htmlf,jsp & jspf files in servlet. Just change the path & file name in getRequestDispa tcher().
    Code:
     RequestDispatcher dispatcher = getServletContext().
    getRequestDispatcher("/htmlfragment/header.htmlf");  
                dispatcher.include(request, response);
    See more | Go to post

  • gauravagam
    started a topic JavaBean to create db connection
    in Java

    JavaBean to create db connection

    This is javabean code to create database connection.
    You can use this code in any java application.
    Code:
    import java.sql.*;
    
    public class DBConnect {
    
        private Connection con;
        private String connstring;
        private PreparedStatement ps;
        private ResultSet rs;
        private String tablename;
    
        public String getTablename() {
            return tablename;
    ...
    See more | Go to post
No activity results to display
Show More
Working...