gurunath pai

Greenhorn
+ Follow
since Dec 10, 2012
gurunath likes ...
Android Hibernate Java
Merit badge: grant badges
For More
Navi Mumbai
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by gurunath pai

Ulf : Ofcourse this helps to solve my problem, but I noticed i need to alter table to maintain timestamp like last modified etc. So is there any way to achieve the same without altering the table and update only those records which are recently added.
I am having an index file which contains the data from mysql database, I created this index file using dataimporthandler of solr. My requirement is, suppose if i add a new row to database, I want to update that row in my existing index file of solr. I dont have any idea how to add the new record from database to solr ? Do I need to re-index the index file again or even single record update is possible.
Please check this link for a glimpse of servlet 3.0 http://java.dzone.com/articles/checking-out-what-new-servlet
11 years ago
It is a interface, it is implemented for protocol specific. eg : HttpServlet fro HTTP protocal.
11 years ago
Its your call to decide which technology you want to use to develop a application, most of the things are supported in most of the technologies.
11 years ago
better to retrieve the records on set of batch's so that, so that when the client scroll down the later records are retrieved.
11 years ago
Can you just tell me, why do you want to store such a huge data in Context ? Cache works much better for these.
11 years ago
Here ServletName is nothing but the URL-pattern, which you have defined in web.xml of application. Container internally calls the Servlet which is mapped to URL-pattern. You need go through some J2EE tutorial, best book would be Head first servlets and Jsp.

http://localhost:8080/servlet/provaservlet/ServletName
11 years ago
Application context again uses the same heap of JVM, as we know heap memory is limited, I don't think you can store such a huge set of data in a context. It is not a good practice as well. So the last option is to use some caching mechanism at server side, so that you can avoid DB hit or just go with NoSql technology.
11 years ago
Check whether the package of each and every class belonging to written correctly, there may be typo error as well. Please describe the error ?, paste error log if possible.
11 years ago
you have to use Java Caching System(http://jakarta.apache.org/jcs/index.html) or http://ehcache.org/ to store data in cache, Inversion of Control in Spring also helps in some way but not sure whether it would help to store 1 million data in heap, as heap memory is limited.
11 years ago

@Bear Bibeault : It is correct what you said, I just gave him a alternate solution to his problem.
11 years ago
Here stmt = con.createStatement(); the con object is having the value null, you can check this by debugging your application. At run time it happens something like this null.createStatement() which is false. I can help if you attached all the Files related to it (LoginDAO.java , LoginAction.java).


String connectionURL = "jdbc:postgresql://localhost:5432/cities";
// Change the connection string according to your db, ip, username and password
String username="postgres";
String password="admin@123";

Class.forName("org.postgresql.Driver");
// If you are using any other database then load the right driver here.

//Create the connection using the static getConnection method
con = DriverManager.getConnection (connectionURL,username,password);

add this lines before

con.createStatement();

11 years ago