Topic
  • 1182 replies
  • Latest Post - ‏2013-04-10T09:05:26Z by RageshAntony
SandeepDattaraju
SandeepDattaraju
664 Posts

Pinned topic Any HELP from my side regarding TGMC Project 2011

‏2011-08-13T20:37:32Z |
 Hi, I'm Sandeep. And ive participated in TGMC 2008 and 2009, and our project has been selected for the second round of evaluation. I did RAD, DB2 and TIVOLI Certifications. I do have some good knoledge about doing a dynamic web project with these softwares and i want to help any student who wants to do the project. So i request you to reply this topic if u have any queries regarding anything.
 
Thanks
Updated on 2013-04-10T09:05:26Z at 2013-04-10T09:05:26Z by RageshAntony
  • MananJ
    MananJ
    3 Posts

    Re: Any HELP from my side regarding TGMC Project 2011

    ‏2011-08-14T11:16:55Z  
     Hello Sandeep,
    This is Manan from VJTI, Mumbai. I want to participaye in TGMC this year. I am also planning to use the same tools that you have already worked on. It would be great if you could help me out for DB2 connection with the JSP Project in RAD. 
     
    Secondly, I would also like to go with EJB but I do not have any idea regarding that because I worked on .net only. This is my first attempt to work with web based Java Technology. I searched tutorials on internet but they were of little help only. It would be great if you could help me. 
     
     
    Regards, 
    Manan J. 
  • SandeepDattaraju
    SandeepDattaraju
    664 Posts

    Re: Any HELP from my side regarding TGMC Project 2011

    ‏2011-08-14T18:10:20Z  
    • MananJ
    • ‏2011-08-14T11:16:55Z
     Hello Sandeep,
    This is Manan from VJTI, Mumbai. I want to participaye in TGMC this year. I am also planning to use the same tools that you have already worked on. It would be great if you could help me out for DB2 connection with the JSP Project in RAD. 
     
    Secondly, I would also like to go with EJB but I do not have any idea regarding that because I worked on .net only. This is my first attempt to work with web based Java Technology. I searched tutorials on internet but they were of little help only. It would be great if you could help me. 
     
     
    Regards, 
    Manan J. 
     Hello Madan,
                             Its good to hear from you, i'll surely help with your requirement. Yes indeed, on internet you wont get much info on JSP and DB2 connections. I do have the codes.
     
    I'm now giving you an login example of JSP page connecting to DB2:
     
     The table in DB2 is LOGIN table, which consists of the following colums:
    USERID (PK) - Auto generated - BIG INT
    USERNAME - VARCHAR
    PASSWORD - VARCHAR
     
     
    Now you need these pages:
     
    index.jsp - where the login form is coded.
    login.jsp - it contains the action code which connects to JavaBenas
    LoginBean.java - contains login beans (Strings)
    DataRequest.java - actual javabean which contains method to connect to DB2
    home.jsp - homepage of user
    ajax.js - javascript to pass the username and password values from jsp
     
     
     
    1) index.jsp -------------------- paste this under <body>
     
    <form method="post"
        action="javascript:checkLogin();"
        id="login_form">

    <table cellspacing="0">
        <tbody>
            <tr>
                <td class="html7magic"><label for="email">User Name</label></td>
                <td class="html7magic"><label for="pass">Password</label></td>
            </tr>
            <tr>
                <td><input class="inputtext" name="email" id="email"
                    tabindex="1" type="text"></td>
                <td><input class="inputtext" name="pass" id="password" tabindex="2"
                    type="password"></td>
                <td><label class="uiButton uiButtonConfirm" for="u468627_3"><input
                    value="Log In" tabindex="4" id="u468627_3" type="submit"></label></td>
                    <td><div id="message" class="message">
                            </div></td>
            </tr>
            <tr>
                <td class="login_form_label_field"><input class="inputcheckbox"
                    value="1" id="persistent" name="persistent" tabindex="3"
                    type="checkbox"><input name="default_persistent" value="0"
                    type="hidden"><label id="label_persistent" for="persistent">Keep
                me logged in</label></td>
                <td class="login_form_label_field"><a
                    href="#" rel="nofollow">Forgot
                your password?</a></td>
            </tr>
        </tbody>
    </table>
    </form>
     
     
    2) ajax.js -----------------------------
     
     
    function checkLogin(){
        document.getElementById('message').style.visibility="visible";
        var username=encodeURI(document.getElementById('email').value);
        var password=encodeURI(document.getElementById('password').value);
      
        document.getElementById('message').innerHTML = "Just a second...";
     
        http.open('post', 'login.jsp?username='+username+'&password='+password+'&nocache='+nocache+'',false);
        http.setRequestHeader("Content-Type", "application/x-www-form-urlencoded,charset=UTF-8")
        http.send(null);
        if(http.readyState == 4){
        var response = http.responseText;
        var response1=response.split("g");
        if(response1[0]==1)
        {
            document.getElementById('message').innerHTML ="Success";
            window.location='home.jsp?';
           
        }
        else { document.getElementById('message').innerHTML =response; }
    }
    }
     
     
     
     
     
     
    3) login.jsp ------------------------------
     
     
    <%@page import="java.sql.*" %>
    <%@page import="login.*"%>
      

    <%
           
            String username="",password="",usertype="";
           
            username = request.getParameter("username");
            password = request.getParameter("password");
           
            System.out.println(username);
            System.out.println(password);
           
            int passavail=0;
           
            Datarequest dbObj = new Datarequest();
           
            int avail = dbObj.isUserAvail(username);
            System.out.println("Username :"+avail);
           
            int pass= dbObj.isPassAvail(password);
            System.out.println("Password :"+pass);
           
            Loginbean bean = (Loginbean)dbObj.getDetails(username, password);
            System.out.println("after getDetails :"+passavail);
           
            if(avail==1)
            {
            if (pass==1)
             {passavail=1;}
            }
            System.out.println("Password :"+passavail);
            if(passavail==1){
       
           
     
        session.setAttribute("userid", bean.getUserid());
        System.out.println(bean.getUserid());
        session.setAttribute("username", bean.getUsername());
        session.setAttribute("password", bean.getPassword());               
        session.setAttribute("loginstatus", "1");   
        System.out.println(username+" "+password);
       
           
            out.println(passavail+"g");
              }     
                         else { out.println("Wrong username or password!");                        
                          
    }
    %>
     
     
     
     
     
     
    4) LoginBean.java ----------------
     
     
    package login;

    public class Loginbean {

       
        String username, usertype, password, userid;

        public String getUsername() {
            return username;
        }

        public void setUsername(String username) {
            this.username = username;
        }

       
        public String getPassword() {
            return password;
        }

        public void setPassword(String password) {
            this.password = password;
        }

        public String getUserid() {
            return userid;
        }

        public void setUserid(String userid) {
            this.userid = userid;
        }
       
       
    }
     
     
     
     
    5) DataRequest.java -------------- (here write your respective schema and database names)
     
     
    package login;


    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.sql.Statement;

    public class DataRequest {
       
           
        public int isUserAvail(String username)
        {
            Connection con = null;
           
            Statement state=null;
            int available = 0;
            System.out.println(username);
            System.out.println("in method");
            System.out.println("isUseravail try");
            System.out.println("isUseravail sql");



            try {
                String sql = "SELECT * FROM SCHEMA.LOGIN WHERE USERNAME = '" + username +"'";
                System.out.println(sql);

                try {
                    Class.forName("com.ibm.db2.jcc.DB2Driver");
                } catch (ClassNotFoundException e) {
                    e.printStackTrace();
                }
                con = DriverManager.getConnection("jdbc:db2:databasename");
                System.out.println(sql);
                System.out.println("isUseravail sql");

               
                state=con.createStatement();
                ResultSet rs = state.executeQuery(sql);
           
                while(rs.next())
                {
                    if(username.equals(rs.getString("USERNAME"))){
                        available = 1;
                        System.out.println("isUseravail success");

                    }
                }
               
            } catch (SQLException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
           
            return available;
        }
       
       
       
       
       
       
       
        public int isPassAvail(String password)
        {
            Connection con = null;
           
            Statement state=null;
            int available = 0;
            System.out.println(password);
            System.out.println("password method");

            try {
                String sql = "SELECT PASSWORD FROM SCHEMA.LOGIN WHERE PASSWORD = '" + password +"'";
                try {
                    Class.forName("com.ibm.db2.jcc.DB2Driver");
                } catch (ClassNotFoundException e) {
                    e.printStackTrace();
                }
                con = DriverManager.getConnection("jdbc:db2:databasename");
               
                state=con.createStatement();
                ResultSet rs = state.executeQuery(sql);
           
                while(rs.next())
                {
                    if(password.equals(rs.getString("PASSWORD"))){
                        available = 1;
                        System.out.println("isPasswordavail success");

                    }
                }
               
            } catch (SQLException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
           
            return available;
        }

       
       
       
       
       
    public Loginbean getDetails(String username, String password) {
        Connection con = null;
        ResultSet res=null;
        Statement state=null;
        Loginbean bean = new Loginbean();
        System.out.println(username);
        System.out.println(password);
        System.out.println("in login method");


        String sql = "SELECT * FROM SCHEMA.LOGIN WHERE username = '" + username + "'AND password = '" +password +"'";
       
        try {
            try {
                Class.forName("com.ibm.db2.jcc.DB2Driver");
            } catch (ClassNotFoundException e) {
                e.printStackTrace();
            }
            con = DriverManager.getConnection("jdbc:db2:databasename");
            state=con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);
            res=state.executeQuery(sql);
           
            while(res.next()) {
                bean.setUserid(res.getString("userid"));
                bean.setUsername(res.getString("username"));   
                bean.setPassword(res.getString("password"));
           
            }
            con.close();
        } catch (SQLException e) {
            // TODO Auto-generated catch block
            System.out.println("Exception encountered");
            e.printStackTrace();
        }
        return bean;
    }
    }
     
     
     
     
     
     
     
     
     
    6)home.jsp --------------
     
    <body>
    Login Success !!
    </body>
     
     
     
     
     
     Try these codes, if it doesn't work then reply again.
    Thanks,
    Sandeep
  • SandeepDattaraju
    SandeepDattaraju
    664 Posts

    Re: Any HELP from my side regarding TGMC Project 2011

    ‏2011-08-14T18:13:46Z  
    • MananJ
    • ‏2011-08-14T11:16:55Z
     Hello Sandeep,
    This is Manan from VJTI, Mumbai. I want to participaye in TGMC this year. I am also planning to use the same tools that you have already worked on. It would be great if you could help me out for DB2 connection with the JSP Project in RAD. 
     
    Secondly, I would also like to go with EJB but I do not have any idea regarding that because I worked on .net only. This is my first attempt to work with web based Java Technology. I searched tutorials on internet but they were of little help only. It would be great if you could help me. 
     
     
    Regards, 
    Manan J. 
     And hey, all the pages should be webcontent folder. The java files should be "src" folder with "login" as package name. The javascript user should be in "WebContent/js" folder.
     
    And in index.jsp, add this:
     <head>
    <script type="text/javascript" src="js/ajax_insert.js"></script>
    </head>
     
    Thanks,
    Sandeep
  • MananJ
    MananJ
    3 Posts

    Re: Any HELP from my side regarding TGMC Project 2011

    ‏2011-08-14T18:16:11Z  
     And hey, all the pages should be webcontent folder. The java files should be "src" folder with "login" as package name. The javascript user should be in "WebContent/js" folder.
     
    And in index.jsp, add this:
     <head>
    <script type="text/javascript" src="js/ajax_insert.js"></script>
    </head>
     
    Thanks,
    Sandeep
     Hello Sandeep,
    Thank you very much for the code... Now as soon as I get the installers from college I ll work on your code. You were of great help. If anything goes wrong I ll let you know... 
    Thanks again.
     
    Regards, 
    Manan J. 
  • SandeepDattaraju
    SandeepDattaraju
    664 Posts

    Re: Any HELP from my side regarding TGMC Project 2011

    ‏2011-08-14T18:29:51Z  
    • MananJ
    • ‏2011-08-14T18:16:11Z
     Hello Sandeep,
    Thank you very much for the code... Now as soon as I get the installers from college I ll work on your code. You were of great help. If anything goes wrong I ll let you know... 
    Thanks again.
     
    Regards, 
    Manan J. 
     Hello Madan,
     
    Its okay, if u come with any other issues, let me know.
     
    Thanks,
    Sandeep
  • MananJ
    MananJ
    3 Posts

    Re: Any HELP from my side regarding TGMC Project 2011

    ‏2011-08-14T18:33:01Z  
     Hello Madan,
     
    Its okay, if u come with any other issues, let me know.
     
    Thanks,
    Sandeep
     yeah thanks....
     
    and by the way its Manan ...... 
     
     
    Regards, 
    Manan J... 
  • venkatgopi
    venkatgopi
    2 Posts

    Re: Any HELP from my side regarding TGMC Project 2011

    ‏2011-08-15T16:59:26Z  
     hie can u share me the topics of DB2 nd material im new to dis wanna learn DB2.....
     
    send me to tokalavenkatagopi@gmail.com 
  • SandeepDattaraju
    SandeepDattaraju
    664 Posts

    Re: Any HELP from my side regarding TGMC Project 2011

    ‏2011-08-16T18:07:01Z  
     hie can u share me the topics of DB2 nd material im new to dis wanna learn DB2.....
     
    send me to tokalavenkatagopi@gmail.com 
     sure i'll send you, give me some time...
  • piduri Venkata Santhosh
    5 Posts

    about tgmc project softwares

    ‏2011-08-28T09:39:25Z  
    i am santhosh i am in btech 2year actually i dont know about any software that used in this tgmc project  
    now i am learning db2 and i am using windows 7 64 bit in my os some softwares  are not working 
    can u send me details of software   used in tgmc project and where we have to download  
    and mainly websphere application server community edison ................ 
    pls send me the links  
  • piduri Venkata Santhosh
    5 Posts

    and also send me some materials to pvenkatasanthosh@gmail.com

    ‏2011-08-28T09:41:31Z  
    and also send me some materials to pvenkatasanthosh@gmail.com
  • SandeepDattaraju
    SandeepDattaraju
    664 Posts

    Re: and also send me some materials to pvenkatasanthosh@gmail.com

    ‏2011-08-28T10:43:34Z  
    and also send me some materials to pvenkatasanthosh@gmail.com
     Hi Santosh,
     
    The softwares used in the development of the web application for TGMC are:
     
    DB2,
    Rational Application Developer ver 8.0 or later,
    Websphere Application Server 8.0 or later.
     
    These three are the important softwares needed. Other than this you may need:
     
    Rational Software Management or Rational Software Architect for UML designing.
     
     
    You will get all these softwares in ibm.in website. DB2 sofware is for free download. You can get this under download software section. But all other softwares are trial versions. So for this, tell your project guide or lecturer to register as Academic Initiative in the IBM website. And request for full version of all the softwares. Then your lecturer can download full versions or better ask the complete software DVD kit. By sending an email, you'll get the DVD kit.
     
    Regards,
    Sandeep
  • SandeepDattaraju
    SandeepDattaraju
    664 Posts

    Re: and also send me some materials to pvenkatasanthosh@gmail.com

    ‏2011-08-28T10:44:25Z  
    and also send me some materials to pvenkatasanthosh@gmail.com
     And i'll mail you all the study books soon
  • piduri Venkata Santhosh
    5 Posts

    Re: and also send me some materials to pvenkatasanthosh@gmail.com

    ‏2011-08-29T09:35:08Z  
     Hi Santosh,
     
    The softwares used in the development of the web application for TGMC are:
     
    DB2,
    Rational Application Developer ver 8.0 or later,
    Websphere Application Server 8.0 or later.
     
    These three are the important softwares needed. Other than this you may need:
     
    Rational Software Management or Rational Software Architect for UML designing.
     
     
    You will get all these softwares in ibm.in website. DB2 sofware is for free download. You can get this under download software section. But all other softwares are trial versions. So for this, tell your project guide or lecturer to register as Academic Initiative in the IBM website. And request for full version of all the softwares. Then your lecturer can download full versions or better ask the complete software DVD kit. By sending an email, you'll get the DVD kit.
     
    Regards,
    Sandeep
     thanks sandeep
     
  • dmyk
    dmyk
    3 Posts

    Re: Any HELP from my side regarding TGMC Project 2011

    ‏2011-08-29T18:02:47Z  
     Hey really good work Sandeep.
    Could you also tell us how to start the project(essential steps) & start-up tips from your experience. 
    And please send me those study books too 
    dmk1913@gmail.com 
    Thanks..
     
  • SandeepDattaraju
    SandeepDattaraju
    664 Posts

    Re: Any HELP from my side regarding TGMC Project 2011

    ‏2011-08-29T20:24:10Z  
    • dmyk
    • ‏2011-08-29T18:02:47Z
     Hey really good work Sandeep.
    Could you also tell us how to start the project(essential steps) & start-up tips from your experience. 
    And please send me those study books too 
    dmk1913@gmail.com 
    Thanks..
     
     Thanks. I'll send you all the books i have. First of all to start a web project you should be having basic knowledge about a web application, and the technologies involved in it.
     
    Here you are using JSP - Java Server Page ( for Front End Designing). And the tool used for this is Rational Application Developer.
     
    For Database, you'll be using DB2.
     
    As a server, you'll be using Websphere Application Server.
     
    Now, learn basics of JSP and CSS. It helps in front end design.
    As per your project scenario, you need to create your database first. Then go for designing pages. 
    Server will connect your front end and backend.
     
    So select a scenario first. Go through the already published websites in that project scenario. For ex: if choose to develop online library management as a scenario, there are so many websites running on that. By that, you'll come to know what we have to develop and what all the options we have to include in our project.
     
    If you tell me your project scenario, i can tell you more ideas. And i'll surely send you all the necessary book i have for JSP, DB2, RAD, CSS, Java Script, Websphere etc.
     
    I do have some old projects, i'll share them too. You can refer it.
     
    Regards,
    Sandeep
  • SandeepDattaraju
    SandeepDattaraju
    664 Posts

    Re: Any HELP from my side regarding TGMC Project 2011

    ‏2011-08-29T21:01:53Z  
     Hi,
     
    I'm Sandeep,  I can send you books, study materials, slides, old projects of TGMC etc., which would help anyone for TGMC-2011. So please feel free to contact me. I can send you the books via mail. So please mention your email id.
     
    Regards,
    Sandeep
  • CC50_meher_panguluri
    1 Post

    Re: information about languages to learn

    ‏2011-08-30T11:56:54Z  
     hi sandeep,
     this is meher . doing my btech second year .. and i am basically a beginner in java . so can you just tell me about  how to learn java and can i get some material regarding java.
    if possible mail me the materials to my mail meherpanguluri@gmail.com
     
     
    thank you
  • theunsatiated
    theunsatiated
    2 Posts

    Re: Any HELP from my side regarding TGMC Project 2011

    ‏2011-08-30T17:25:16Z  
     Hey this is a noble job you're doing
    We just registered for TGMC 2011.
     
     Can you please point me to your older projects, so that I can figure what my final output should looks like.
  • SandeepDattaraju
    SandeepDattaraju
    664 Posts

    Re: information about languages to learn

    ‏2011-08-30T17:28:32Z  
     hi sandeep,
     this is meher . doing my btech second year .. and i am basically a beginner in java . so can you just tell me about  how to learn java and can i get some material regarding java.
    if possible mail me the materials to my mail meherpanguluri@gmail.com
     
     
    thank you
     Hi Meher,
     
    I'll surely send all the materials i have regarding Java. The web project is not only based on Java, just learn the basics of Java. And you need to concentrate more on J2EE and Java Beans.
     
    Regards,
    Sandeep
  • SandeepDattaraju
    SandeepDattaraju
    664 Posts

    Re: Any HELP from my side regarding TGMC Project 2011

    ‏2011-08-30T18:15:36Z  
     Hey this is a noble job you're doing
    We just registered for TGMC 2011.
     
     Can you please point me to your older projects, so that I can figure what my final output should looks like.
     Hello,
     
    Sure i'll send all the old projects.
  • SandeepDattaraju
    SandeepDattaraju
    664 Posts

    Re: Any HELP from my side regarding TGMC Project 2011

    ‏2011-08-30T18:21:00Z  
     Hey this is a noble job you're doing
    We just registered for TGMC 2011.
     
     Can you please point me to your older projects, so that I can figure what my final output should looks like.
     Please give me your email address.
     
    Sandeep
  • theunsatiated
    theunsatiated
    2 Posts

    Re: Any HELP from my side regarding TGMC Project 2011

    ‏2011-08-30T18:40:30Z  
     Please give me your email address.
     
    Sandeep
     lance679-ibm@yahoo.co.in
    Thanks in advance 
    Updated on 2011-08-30T18:40:30Z at 2011-08-30T18:40:30Z by theunsatiated
  • piduri Venkata Santhosh
    5 Posts

    Re: Any HELP from my side regarding TGMC Project 2011

    ‏2011-08-31T12:17:14Z  
     Please give me your email address.
     
    Sandeep
    hi sandeep
    this is santhosh,can u send me java material needed for tgmc project.....
    and also j2ee
    to my mail
    pvenkatasanthosh@gmail.com         
  • ashokchakravarthi
    ashokchakravarthi
    39 Posts

    Re: Any HELP from my side regarding TGMC Project 2011

    ‏2011-08-31T17:18:11Z  
     sounds good to see these posts,  thanks to one and all.
     
    i have registered TGMC 11, please tell me all  steps to  complete MY PROJECT  one by one..
     
    and please send me your previous year projects .   so i will have some idea about TGMC.. 
     
    my   mail id is : ashokchakravarthics@gmail.com
     
    thanks in advance..