kiad_198's Profile User Rating: -----

Reputation: 3 Apprentice
Group:
Active Members
Active Posts:
119 (0.06 per day)
Joined:
19-November 08
Profile Views:
5,319
Last Active:
User is offline Apr 11 2014 09:04 AM
Currently:
Offline

Previous Fields

Dream Kudos:
0

Latest Visitors

Icon   kiad_198 has not set their status

Posts I've Made

  1. In Topic: Save/Retrieve FingerPrint using OPOS UareU 5160?

    Posted 7 Apr 2014

    yes, in that case, I really need help in my problem.

    How can I get the template id for that?
    So that I can save it to database.



    Thanks,

    kiad
  2. In Topic: Save/Retrieve FingerPrint using OPOS UareU 5160?

    Posted 4 Apr 2014

    The way to register in Digital Persona webportal is through invitation. They only invite those who purchase there SDK. But I brought mine locally.
  3. In Topic: Image Display in the folder

    Posted 22 Mar 2014

    I successfully display all 3 different images with the corresponding rs("img") in column. But I've added 5 Image Object in form and array it. No luck in previous code above.
    Posted Image
    Here's the code:
    Dim i
     
    connection
        rs.Open "select * from tbl_user", con, 3, 3
            
            Do Until rs.EOF
            For i = 0 To rs.RecordCount - 1
                If rs("status") = "Active" Then
                    Image1(i).Picture = LoadPicture(App.Path + "\profile_pic\" & rs("img"))
                End If
                rs.MoveNext
            Next i
            Loop
    
    rs.Close: Set rs = Nothing
    con.Close: Set con = Nothing
    
    


    Now, I add a condition where if the status is "Active" it will display only. 1 of the user is "Inactive". So, the 2 image display successfully. But the problem is the image start at index 1 instead of index 0 :

    Here's the image:
    Posted Image

    Please help me!

    Very much appreciated.



    Thanks,

    -kiad-
  4. In Topic: Image Display in the folder

    Posted 22 Mar 2014

    View PostMinimalist, on 22 March 2014 - 02:41 AM, said:

    In line 6 try
    For i = 0 To rs.RecordCount -1



    it work! thanks,
  5. In Topic: Browser Back Button or My Code in Servlet

    Posted 31 Aug 2013

    I've found this code and its working using session but still when I press back button the session not end.
    What to add in this code?

    Login.html
    <!DOCTYPE html>
    <html>
    <head>
    <meta charset="ISO-8859-1">
    <title>Login Form</title>
    </head>
    <body>
    <div align="center">
    <form id="loginform" action="Validate" method="post">
    <div style="font-size:40px; font-weight:bolder;">Login Page</div>
    <table>
     <tr>
     <td><label for="loginid">UserId</label></td>
     <td><input type="text" name="uid" /></td>
     </tr>
     <tr>
     <td><label for="pass">Password</label></td>
     <td><input type="password" name="pid" /></td>
     </tr>
     <tr>
     <td></td>
     <td><input type="submit" value="logn" /></td>
     </tr>
    </table>
    </form></div>
    </body>
    </html>
    
    


    Logout.java
    package my.packages;
    
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    
    public class Logout extends HttpServlet {
    
    	private static final long serialVersionUID = 1L;
    
    protected void doGet(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException {
            
     response.setContentType("text/html;charset=UTF-8");
     PrintWriter out = response.getWriter();
     try {
     HttpSession session=request.getSession();
     session.invalidate();
     out.println("<div style='float:left;font-size:25px;'>"+"click here to "
           +"<a href='Login.html'>login</a></div>");
     out.println("<h1 align='center'>"+"Logout Sucessfully..."+"</h1>");
     }finally {            
     out.close();
     }
     }
    }
    
    


    Validate.java
    package my.packages;
    
    import java.sql.*;
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    
    public class Validate extends HttpServlet {
    
    	private static final long serialVersionUID = 1L;
    
    public void doPost(HttpServletRequest request,HttpServletResponse 
     response) 
          throws ServletException,IOException
    {
      response.setContentType("text/html;charset=UTF-8");
      PrintWriter out = response.getWriter();
      try{
        String name=request.getParameter("uid");
        String pass=request.getParameter("pid");
        Class.forName("com.mysql.jdbc.Driver");
        Connection con= DriverManager.getConnection("jdbc:mysql://localhost:3306/login","root","");
     Statement s=con.createStatement();
    ResultSet rs=s.executeQuery("select * from log where user='"+name+"' ");
    
       if(rs.next())
          {
                   
     if( (name.trim().equals(rs.getString(1).trim())) && (   
           pass.trim().equals(rs.getString(2).trim()) )  )
        {
    
    //New session creation
      HttpSession session=request.getSession(true);
      //setting attribute on session
      session.setAttribute("user",name);
     //send request to Welcome.jsp page
    
    RequestDispatcher view =   
          request.getRequestDispatcher("Welcome.jsp");
           
    view.forward(request, response);
                    
       }
      else
        {
     out.println("<div style='font-size:30px; color:red'>"
              +"Userid and password does not matched "+"</div>");
     RequestDispatcher view =
        request.getRequestDispatcher("Login.html");
        
    view.include(request, response);
             }
          }
     else
      {
     out.println("<div style='font-size:30px; color:red'> Please fill userid and password </div>");
     RequestDispatcher view=request.getRequestDispatcher("Login.html");
        view.include(request, response);
       }
         }catch(Exception e){}
         finally{
         out.close();
     }
     }
    }
    
    
    


    Welcome.jsp
    <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
        pageEncoding="ISO-8859-1"%>
    <%@ page import="java.util.*" %>
    <%@ page import="javax.servlet.*" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>Insert title here</title>
    </head>
    <body>
    
    <% String name=(String)session.getAttribute("user"); %>
    <% java.util.Date cr=new java.util.Date (session.getCreationTime()); %>
    <% java.util.Date lr=new java.util.Date (session.getLastAccessedTime()); %>
    <div style="font-size:25px;">Click here to <a href="Logout">Logout</a></div>
    <center>
    <div style="font-size:30px;">
    <div>Hello <%=name %></div>
    <div>Login time:<%=cr %></div>
    <div>Last Accessed Time:<%=lr %></div>
    </div></center>
    
    </body>
    </html>
    
    


    Thanks guys,

My Information

Member Title:
D.I.C Head
Age:
Age Unknown
Birthday:
Birthday Unknown
Gender:

Contact Information

E-mail:
Private

Friends

kiad_198 hasn't added any friends yet.

Comments

kiad_198 has no profile comments yet. Why not say hello?