Thursday, April 14, 2016

My Datamining Research for tourism:

When ever we travel we make sure that there must be an adventurious trip ahead,but when that tour get lots of hurdles then we may be unsatisfied or may be frustrated instead of refreshment, so to avoid that every travel agencies make use of ratings. If we consider ratings of unknown then there may be fraud or fake ratings, so thats the thing we make use of only tour users who choose packages and have travelled through that agency.
     
     For that reason I have developed two models. one is SATT (Season Area Tourist Topic) where tourist will give two topics area and season, according to that selection deserved packages will be shown so taht you can take decision easily where to travel, and the second model is SARTT (Season Area Relational Tourist Topic) Now after getting booked with package travel agency will look after the mass group where if they take all at once, then there may be arguements among themeselves, so to avoid that we have developed this Model so that according to age groups tourist will be arranged and will be taken to spots.

So below is the Topic name and link of my research....

A Decision Making System for Tourist Using Collaborative Approach


for more updates and research, follow this blogspot.     

Thursday, April 7, 2016

Get Number of Website Visitors and Their Details:

Index.jsp:

<%@page import="java.sql.*"%>
<%@page import="java.io.*, java.util.Date"%>

<!DOCTYPE html>
<html lang="hi">
<head>  
    <title>Grab Visitor detail</title>
   <meta charset="utf-8"> //below are the bootstrap included path.
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
  <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
 
  <link rel="stylesheet" href="css/ezomart.css" type="text/css">
 <link rel="icon" type="image/png" href="images/favicon.png" sizes="160x160">

// jsp code to get Ip of user and current date and time when user opens this page.

<%
    Integer hitsCount = (Integer) application.getAttribute("hitCounter"); 
    if( hitsCount ==null || hitsCount == 0 ){    
       /* First visit */    // setting counter (1...n) it will increase when ever a new visit to page happens
             hitsCount = 1;
    }else{
       /* return visit */
              hitsCount += 1;
    }
// setting count attribute and getting IP, HOST of user.
    application.setAttribute("hitCounter", hitsCount);
   String ipAddress = request.getRemoteAddr();
   String host=request.getRemoteHost();
  application.setAttribute("IP", ipAddress);
  application.setAttribute("host", host);

  Date d=new Date();  // Getting date
  String datee=d.toString();  // converting date to string
    Connection con=null;
Statement st=null;
ResultSet rs=null;   
 // start opening DB and insert count IP and date into DB for saving visitor record.  
         try{                           
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");   
         con=DriverManager.getConnection("jdbc:odbc:DB_NAME");
   st=con.createStatement();
 // storing visitor record to DB
 String sql="insert into visits values ('"+hitsCount+"','"+ipAddress+"','"+datee+"')";         
    
    int x=st.executeUpdate(sql);
   if(x!=0)
    {
                 
   }
                       else{
 response.sendRedirect("load_error.jsp"); // below is load_error.jsp
                       }

             con.close();
        st.close();}
         catch(SQLException e)
                                 { 
         response.sendRedirect("load_error.jsp");
         }
    %>

</head>
<body>

Akshay Morkhandikar Welcome's you.
have nice day.

</body>
</html>

load_error.jsp:


<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>
        <h1>Error 500</h1>
        <p>please try again <a href="index.jsp">Home</a></p>
    </body>
</html>

Saturday, April 2, 2016

SQLException: General Error



If you get any error for sql using ms-access or oracle

then do check with

con.commit();
con.close();
st.close();  

if still problem persists then plz have look at this link  --> Java database operations     

you will have a great information over there...


thank you,
have a nice day..... :)