Tagged Questions
148
votes
8answers
74k 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 ...
46
votes
14answers
88k 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. ...
37
votes
6answers
34k views
35
votes
8answers
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 ...
35
votes
5answers
9k 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?
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 ...
26
votes
7answers
43k 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 ...
25
votes
3answers
82k 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
...
25
votes
10answers
12k 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 ...
21
votes
2answers
34k 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 ...
21
votes
3answers
15k 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 ...
20
votes
8answers
44k 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 ...
19
votes
2answers
33k views
How to annotate MYSQL autoincrement field with JPA annotations
Straight to the point, problem is saving the object Operator into MySQL DB.
Prior to save, I try to select from this table and it works, so is connection to db.
I think there is some configuration ...
19
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 ...
19
votes
4answers
5k views
Using Solr search index as a database - is this “wrong”?
My team is working with a third party CMS that uses Solr as a search index. I've noticed that it seems like the authors are using Solr as a database of sorts in that each document returned contains ...