Tagged Questions
139
votes
8answers
68k views
How to get UTF-8 working in java webapps?
I need to get UTF-8 working in my Java webapp (servlets + JSP, no framework used) to support äöå etc. for regular Finnish text and Cyrillic alphabets like ЦжФ for special cases.
My setup is the ...
36
votes
13answers
60k views
How to check whether a string is not null & empty?
In my web app, I have a search field where I get some string and a combo box. So, I am sending two arguments to the remote function.
I want to check that the user input is not null and not empty. ...
35
votes
9answers
17k views
LINQ for Java tool [closed]
Would a LINQ for java be a useful tool? I have been working on a tool that will allow a Java object to map to a row in a database.
Would this be useful for Java
programmers?
What features would ...
33
votes
12answers
1k views
Suggest what user could buy if he already has something in the cart
I am developing e-shop where I will sell food. I want to have a suggestion box where I would suggest what else my user could buy based on what he's already have in cart. If he has beer, I want him to ...
30
votes
5answers
8k views
How can I protect MySQL username and password from decompiling?
Java .class files can be decompiled fairly easily. How can I protect my database if I have to use the login data in the code?
28
votes
5answers
27k views
25
votes
7answers
37k views
How do you make websites with Java? [closed]
This might be a really trivial question, but I've been writing Java programs at my school. But I just found out that I can create websites with Java as well. How can I do that? Any good ...
23
votes
3answers
71k views
Hibernate: Automatically creating/updating the db tables based on entity classes
I have the following entity class (in Groovy):
import javax.persistence.Entity
import javax.persistence.Id
import javax.persistence.GeneratedValue
import javax.persistence.GenerationType
@Entity
...
23
votes
9answers
11k views
Is there a more efficient way of making pagination in Hibernate than executing select and count queries?
Usually pagination queries look like this. Is there a better way instead of making two almost equal methods, one of which executing "select *..." and the other one "count *..."?
public ...
19
votes
3answers
13k views
How to stop a running mysql query
How do I stop a running mysql query programmatically?
The problem I'm facing is that a query is constructed using user supplied data, and may occasionally take a very long time to execute (large ...
18
votes
1answer
4k views
Could somebody explain SOLR requestHandlers and responseWriters in detail?
Firstly, many parts of the solr wiki is not very useful for somebody who just learned how to index and search fields. It seems it is written for experts! It uses terms that is RELATIVE to solr, so ...
18
votes
7answers
37k views
MySQL-JDBC: Communications Link Failure
My program that connects to a MySQL database was working fine. Then, without changing any code used to set up the connection, I get this exception:
...
17
votes
2answers
28k views
Mysql & Java - Get id of the last inserted value (JDBC) [duplicate]
Possible Duplicate:
How to get the insert ID in JDBC?
Hi, Im using JDBC to connect on database through out java.
Now, I do some insert query, and I need to get the id of last inserted ...
17
votes
8answers
32k views
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
I'm working on getting my database to talk to my Java programs. What do I need to get started?
Having already read through (and been thoroughly confused, something that does not happen often) with ...
16
votes
9answers
20k views
Using Hibernate's ScrollableResults to slowly read 90 million records
I simply need to read each row in a table in my MySQL database using Hibernate and write a file based on it. But there are 90 million rows and they are pretty big. So it seemed like the following ...